Files
n0mbers/src/components/AppHeader.vue
T
2023-11-26 11:17:27 +01:00

29 lines
864 B
Vue

<template>
<div class="flex justify-between items-center mx-auto w-full max-w-md">
<RouterLink
:class="{ 'opacity-0': isHome }"
to="/"
class="text-xl hover:text-cyan-500 dark:text-stone-400 transition-opacity duration-200">
<IconHouse />
</RouterLink>
<h1
class="z-20 py-2 font-mono text-3xl text-center bg-stone-300 dark:bg-stone-900">
N<span class="text-cyan-500">0</span>mbers
</h1>
<button @click="isSideMenuVisible = true">
<IconMenu class="text-xl btn" />
</button>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { isSideMenuVisible } from '@/composables/side-menu'
import IconHouse from '~icons/ph/house'
import IconMenu from '~icons/ph/list'
const isHome = computed(() => useRoute().name === 'home')
</script>