Skip to content

Commit

Permalink
use +keepScrollPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 25, 2024
1 parent 47a5b80 commit 3b7140b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/full/pages/starship/+Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</p>
<br />
<div class="sub-navigation">
<a keep-scroll-position href="/starship">Overview</a>
<a keep-scroll-position href="/starship/reviews">Reviews</a>
<a keep-scroll-position href="/starship/spec">Tech Spec</a>
<a href="/starship">Overview</a>
<a href="/starship/reviews">Reviews</a>
<a href="/starship/spec">Tech Spec</a>
</div>
<div style="margin-top: 20px; border: 1px solid black; padding: 10px 40px">
<slot />
Expand Down
6 changes: 6 additions & 0 deletions examples/full/pages/starship/+config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Config } from 'vike/types'

export default {
// https://vike.dev/keepScrollPosition
keepScrollPosition: true,
} satisfies Config

0 comments on commit 3b7140b

Please sign in to comment.