refactor: remove HeaderBar component
This commit is contained in:
parent
9fe918136c
commit
c68c432c8f
2 changed files with 1 additions and 53 deletions
24
src/App.vue
24
src/App.vue
|
@ -1,32 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive } from "vue";
|
||||
|
||||
import { RouterView } from "vue-router";
|
||||
import SiteNavigation from "@/components/SiteNavigation.vue";
|
||||
import NavToggle from "@/components/NavToggle.vue";
|
||||
import HeaderBar from "@/components/HeaderBar.vue";
|
||||
|
||||
interface State {
|
||||
navActive: boolean;
|
||||
}
|
||||
|
||||
const state: State = reactive({
|
||||
navActive: false,
|
||||
});
|
||||
|
||||
const toggleNav = (): void => {
|
||||
state.navActive = !state.navActive;
|
||||
document.body.classList.toggle("scroll-lock");
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SiteNavigation :isActive="state.navActive" @selected="toggleNav" />
|
||||
|
||||
<HeaderBar>
|
||||
<NavToggle @click.prevent="toggleNav" />
|
||||
<template #heading>{{ $route.meta.title }}</template>
|
||||
</HeaderBar>
|
||||
<SiteNavigation />
|
||||
|
||||
<main>
|
||||
<RouterView />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue