Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 89b08b6

Browse files
fix: section links should not be covered by navbar (fix #60)(#61)
1 parent ec897da commit 89b08b6

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

components/Header.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default {
4040
position fixed
4141
top 0
4242
width 100vw
43+
height $headerHeight
4344
box-sizing border-box
4445
background-color $headerBgColor
4546
padding 20px 32px 20px

example/.vuepress/styles/palette.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// $newsletterBgColor = #f8f8f8
1919

2020
// layout
21+
// $headerHeight = 80px
2122
// $contentWidth = 740px
2223

2324
// responsive breakpoints

styles/index.styl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ h1, h2, h3, h4, h5, h6
7575
line-height 1.25
7676
font-family PT Serif
7777

78+
{$contentClass}:not(.custom) > &
79+
margin-top 'calc(0.5rem - %s)' % ($headerHeight)
80+
padding-top 'calc(%s + 1rem)' % ($headerHeight)
81+
margin-bottom 0
82+
7883
&:hover .header-anchor
7984
opacity: 1
8085

styles/palette.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $postTagBgColor = #ededed;
2121
$postTagColor = darken($postTagBgColor,50%)
2222

2323
// layout
24+
$headerHeight = 80px
2425
// $contentWidth = 740px
2526

2627
// responsive breakpoints

0 commit comments

Comments
 (0)