Skip to content

Commit

Permalink
fix: Fixed jumping problem, use router-link tag instead of a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyBear committed Jan 26, 2023
1 parent d81330a commit 75e797b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/assets/style/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
outline: 2px solid @primary-color;
}
}
html,
body {
min-height: 100vh;
min-height: 100%;
}
li {
list-style: none;
Expand Down
2 changes: 1 addition & 1 deletion src/views/Welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ $t('welcome.desc') }}
</span>
<div class="panel">
<a href="/home">{{ $t("welcome.start") }}</a>
<router-link to="/home">{{ $t("welcome.start") }}</router-link>
</div>
</div>
</main>
Expand Down
8 changes: 4 additions & 4 deletions src/views/global/GlHeader.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<!-- Global header -->
<header>
<a href="/" tabindex="1">
<router-link to="/" tabindex="1">
<img src="/logo.png" alt="Logo" id="logo">
</a>
</router-link>
<nav>
<router-link to="/home"
class="gl-menu"
tabindex="2">{{$t('nav.start')}}</router-link>
<a href="/about"
<router-link to="/about"
class="gl-menu"
tabindex="3">{{$t('nav.about')}}</a>
tabindex="3">{{$t('nav.about')}}</router-link>
<!-- this might be an single component future -->
<span class="gl-sub-menu"
tabindex="4">
Expand Down

0 comments on commit 75e797b

Please sign in to comment.