mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-15 19:22:21 +01:00
Fix navbar
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@ -19,7 +19,4 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const is_active_page = ref(route.path === props.to);
|
const is_active_page = ref(route.path === props.to);
|
||||||
watch(() => route.path, () => {
|
|
||||||
is_active_page.value = route.path === props.to
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center order-1 md:w-1/2">
|
<div class="flex items-center order-1 md:w-full">
|
||||||
<div class="hidden w-full md:block md:w-auto" id="navbar-main">
|
<div class="hidden w-full md:block md:w-auto" id="navbar-main">
|
||||||
<ul class="flex flex-col py-4 pr-4 mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium bg-transparent">
|
<ul class="flex flex-col py-4 pr-4 mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium bg-transparent">
|
||||||
<NavLink to="/" :label="t('home')"/>
|
<NavLink to="/" :label="t('home')"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user