update: new header

main
TZGyn 3 years ago
parent 776f93a1d2
commit ea1e8dc565

@ -1,6 +1,6 @@
<template> <template>
<div <div
class="bg-primary flex h-screen w-full flex-col items-center gap-4 px-12 text-white"> class="bg-primary flex h-screen w-full flex-col items-center gap-4 text-white">
<slot /> <slot />
</div> </div>
</template> </template>

@ -1,31 +1,22 @@
<template> <template>
<div <div
class="bg-secondary my-3 flex h-16 w-full max-w-3xl flex-row items-center justify-center rounded-lg"> class="bg-secondary flex h-fit w-full flex-row items-center justify-center p-4">
<div @click="profile"> <div class="flex w-full max-w-3xl items-center justify-between">
<img <div
v-if="props.avatar" class="flex items-center gap-4 hover:cursor-pointer"
class="bg-secondary h-12 w-12 rounded-full hover:cursor-pointer" @click="navigateTo('/notes')">
@click="profile"
:src="props.avatar"
alt="" />
<Icon <Icon
v-else class="text-blue-500"
class="bg-secondary h-12 w-12 rounded-full hover:cursor-pointer" name="fa6-solid:book-open" />
<p class="text-xl font-bold"> Notes </p>
</div>
<div
class="flex w-full justify-end"
@click="navigateTo('/profile')">
<Icon
class="bg-secondary rounded-full hover:cursor-pointer"
name="fa6-solid:circle-user" /> name="fa6-solid:circle-user" />
</div> </div>
</div> </div>
</div>
</template> </template>
<script setup lang="ts">
interface Props {
avatar?: string;
}
const props = defineProps<Props>();
const router = useRouter();
const profile = () => {
router.push('/profile');
};
</script>

Loading…
Cancel
Save