Skip to content

Commit 20bbbdd

Browse files
author
Gibson Tang
committed
fixed bug where blog is not accessible on mobile browser
1 parent 3875ed9 commit 20bbbdd

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ sw.*
104104

105105
# Vim swap files
106106
*.swp
107+
108+
report*

components/Nav.vue

+19-11
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,25 @@
3838
</svg>
3939
</button>
4040
</div>
41-
42-
<nuxt-link
43-
v-if="showMobileLinks"
44-
v-for="link in links"
45-
:key="`mob-${link.name}`"
46-
class="py-2 block hover:text-red-600 text-center lg:hidden"
47-
:to="localePath(link.name)"
48-
@click.native="showMobileLinks = false"
49-
>
50-
{{ $t(link.display) }}
51-
</nuxt-link>
41+
<template v-for="link in links" v-if="showMobileLinks">
42+
<a
43+
v-if="link.url"
44+
:key="link.name"
45+
class="py-2 block hover:text-red-600 text-center lg:hidden"
46+
:href="link.url"
47+
>
48+
{{ $t(link.display) }}
49+
</a>
50+
<nuxt-link
51+
v-else
52+
:key="`mob-${link.name}`"
53+
class="py-2 block hover:text-red-600 text-center lg:hidden"
54+
:to="localePath(link.name)"
55+
>
56+
{{ $t(link.display) }}
57+
</nuxt-link>
58+
</template>
59+
<!---->
5260
</div>
5361
</nav>
5462
</template>

0 commit comments

Comments
 (0)