Compare commits

...

2 Commits

@ -1,14 +1,22 @@
<template> <template>
<div class="bg-secondary flex h-fit w-full flex-row items-center justify-center p-2"> <div
<div class="flex w-full max-w-3xl items-center justify-between gap-4"> class="flex h-fit w-full flex-row items-center justify-center border-b border-[var(--el-border-color)] p-2">
<div class="flex items-center gap-4 hover:cursor-pointer" @click="navigateTo('/notes')"> <div class="flex w-full max-w-3xl items-center justify-between gap-4">
<Icon class="text-blue-500" name="fa6-solid:book-open" /> <div
<p class="text-xl font-bold"> Notes </p> class="flex items-center gap-4 hover:cursor-pointer"
</div> @click="navigateTo('/notes')">
<div class="flex w-fit justify-end"> <Icon
<Icon class="bg-secondary rounded-full hover:cursor-pointer" @click="navigateTo('/profile')" class="text-blue-500"
name="fa6-solid:circle-user" size="36" /> name="fa6-solid:book-open" />
</div> <p class="text-xl font-bold"> Notes </p>
</div> </div>
</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> </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> <template>
<App> <el-card class="w-fit">
<Header /> <div
<el-card> class="mx-auto my-4 flex h-80 w-96 flex-col items-center justify-center gap-8 rounded-xl p-8">
<div <div class="flex w-full flex-col gap-2">
class="mx-auto my-4 flex h-80 w-96 flex-col items-center justify-center gap-8 rounded-xl p-8"> <label class="w-full text-[#b3b3b3]"> Email </label>
<div class="flex w-full flex-col gap-2"> <el-input
<label class="w-full text-[#b3b3b3]"> Email </label> v-model="credential.email"
<el-input placeholder="Username"
v-model="credential.email" clearable
placeholder="Username" class="h-12" />
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>
</div> </div>
</el-card> <div class="flex w-full flex-col gap-2">
</App> <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> </template>
<script setup lang="ts"> <script setup lang="ts">
definePageMeta({ definePageMeta({
middleware: ['auth'], middleware: ['auth'],
layout: 'main',
}) })
const credential = reactive({ const credential = reactive({

Loading…
Cancel
Save