mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-04-22 01:54:38 -06:00
FEAT: OCTOBER UPDATE
This commit is contained in:
+7
-3
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<DisplayHeader v-if="!isCategoryPage" :activeItem="activeItem" />
|
||||
<DisplayHeader v-if="!isSidebarPage" :activeItem="activeItem" />
|
||||
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const isCategoryPage = computed(() => /^\/[^/]+\/[^/]+$/.test(route.path));
|
||||
const sidebarPages = ['/favorites'];
|
||||
const isSidebarPage = computed(() => {
|
||||
const path = route.path;
|
||||
return sidebarPages.some(sidebarPath => path.includes(sidebarPath)) || /^\/[^/]+\/[^/]+$/.test(path);
|
||||
});
|
||||
|
||||
const activeItem = computed(() => {
|
||||
if (route.path === '/') return 'home';
|
||||
|
||||
Reference in New Issue
Block a user