Skip to content

Commit

Permalink
Fix typo update fooder and active class
Browse files Browse the repository at this point in the history
Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
  • Loading branch information
nurRiyad committed Apr 7, 2024
1 parent 8103f58 commit a2c41c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions components/main/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const path = computed(() => route.fullPath.replace('/', ''))
<div class="px-6 container max-w-5xl mx-auto">
<div class="grid grid-cols-1 md:grid-cols-3">
<FooterSite v-if="path === 'about'" />
<FooterDevloper v-else />
<FooterDeveloper v-else />

<FooterLink />
<FooterConnect />
</div>

<div class="border-t dark:border-gray-800 mt-5 text-center p-2">
© 2020-2023 No Right is reserved. Who cares 🤷‍♂️? It's
© 2020-2024 No Right is reserved. Who cares 🤷‍♂️? It's
<a href="https://github.com/nurriyad/blog" target="_blank" rel="nofollow" class="underline">open source</a>
anyway.
</div>
Expand Down
18 changes: 10 additions & 8 deletions components/main/header.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<script setup lang="ts">
const route = useRoute()
const path = computed(() => route.fullPath.replace('/', ''))
const colorMode = useColorMode()
function onClick(val: string) {
colorMode.preference = val
Expand All @@ -14,23 +10,23 @@ function onClick(val: string) {
<div class="flex px-6 container max-w-5xl justify-between mx-auto items-baseline ">
<ul class="flex items-baseline space-x-5">
<li class="text-base sm:text-2xl font-bold">
<NuxtLink to="/" :class="{ underline: path === '' }">
<NuxtLink to="/">
Riyad's Blog
</NuxtLink>
</li>
</ul>
<ul class="flex items-center space-x-3 sm:space-x-6 text-sm sm:text-lg">
<li>
<NuxtLink to="/blogs" :class="{ underline: path === 'blogs' }">
<NuxtLink to="/blogs">
Blogs
</NuxtLink>
</li>
<li>
<NuxtLink to="/categories" :class="{ underline: path === 'categories' }">
<NuxtLink to="/categories">
Categories
</NuxtLink>
</li>
<li title="About Me" :class="{ underline: path === 'about' }">
<li title="About Me">
<NuxtLink to="/about" aria-label="About me">
About
</NuxtLink>
Expand Down Expand Up @@ -65,3 +61,9 @@ function onClick(val: string) {
</div>
</div>
</template>

<style>
.router-link-active .router-link-exact-active {
@apply underline
}
</style>

0 comments on commit a2c41c7

Please sign in to comment.