Compare commits

..

2 Commits

@ -1,14 +1,22 @@
<template>
<div class="bg-secondary flex h-fit w-full flex-row items-center justify-center p-2">
<div class="flex w-full max-w-3xl items-center justify-between gap-4">
<div class="flex items-center gap-4 hover:cursor-pointer" @click="navigateTo('/notes')">
<Icon class="text-blue-500" name="fa6-solid:book-open" />
<p class="text-xl font-bold"> Notes </p>
</div>
<div class="flex w-fit justify-end">
<Icon class="bg-secondary rounded-full hover:cursor-pointer" @click="navigateTo('/profile')"
name="fa6-solid:circle-user" size="36" />
</div>
</div>
</div>
<div
class="flex h-fit w-full flex-row items-center justify-center border-b border-[var(--el-border-color)] p-2">
<div class="flex w-full max-w-3xl items-center justify-between gap-4">
<div
class="flex items-center gap-4 hover:cursor-pointer"
@click="navigateTo('/notes')">
<Icon
class="text-blue-500"
name="fa6-solid:book-open" />
<p class="text-xl font-bold"> Notes </p>
</div>
<div class="flex w-fit justify-end">
<Icon
class="rounded-full bg-secondary hover:cursor-pointer"
@click="navigateTo('/profile')"
name="fa6-solid:circle-user"
size="36" />
</div>
</div>
</div>
</template>

@ -0,0 +1,20 @@
<template>
<div class="common-layout">
<el-container>
<el-header>
<Header />
</el-header>
<el-main>
<div class="flex flex-col items-center justify-center">
<slot />
</div>
</el-main>
</el-container>
</div>
</template>
<style scoped>
.el-header {
--el-header-padding: 0;
}
</style>

@ -1,52 +1,50 @@
<template>
<App>
<Header />
<el-card>
<div
class="mx-auto my-4 flex h-80 w-96 flex-col items-center justify-center gap-8 rounded-xl p-8">
<div class="flex w-full flex-col gap-2">
<label class="w-full text-[#b3b3b3]"> Email </label>
<el-input
v-model="credential.email"
placeholder="Username"
clearable
class="h-12" />
</div>
<div class="flex w-full flex-col gap-2">
<label class="w-full text-[#b3b3b3]"> Password </label>
<el-input
v-model="credential.password"
type="password"
placeholder="Password"
show-password
class="h-12" />
</div>
<p
class="cursor-pointer text-blue-500 underline"
@click="toggleSignup()">
{{
isSignup
? 'Already have an account? Login'
: "Don't have an account? Sign up"
}}
</p>
<button
class="w-fit rounded-lg bg-blue-500 px-8 py-4"
v-on="
isSignup
? { click: () => signUp() }
: { click: () => signIn() }
">
{{ isSignup ? 'Sign Up' : 'Login' }}
</button>
<el-card class="w-fit">
<div
class="mx-auto my-4 flex h-80 w-96 flex-col items-center justify-center gap-8 rounded-xl p-8">
<div class="flex w-full flex-col gap-2">
<label class="w-full text-[#b3b3b3]"> Email </label>
<el-input
v-model="credential.email"
placeholder="Username"
clearable
class="h-12" />
</div>
</el-card>
</App>
<div class="flex w-full flex-col gap-2">
<label class="w-full text-[#b3b3b3]"> Password </label>
<el-input
v-model="credential.password"
type="password"
placeholder="Password"
show-password
class="h-12" />
</div>
<p
class="cursor-pointer text-blue-500 underline"
@click="toggleSignup()">
{{
isSignup
? 'Already have an account? Login'
: "Don't have an account? Sign up"
}}
</p>
<button
class="w-fit rounded-lg bg-blue-500 px-8 py-4"
v-on="
isSignup
? { click: () => signUp() }
: { click: () => signIn() }
">
{{ isSignup ? 'Sign Up' : 'Login' }}
</button>
</div>
</el-card>
</template>
<script setup lang="ts">
definePageMeta({
middleware: ['auth'],
layout: 'main',
})
const credential = reactive({

Loading…
Cancel
Save