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

Commit

Permalink
fix: section links should not be covered by navbar (fix #60)(#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
billyyyyy3320 authored Jan 27, 2020
1 parent ec897da commit 89b08b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default {
position fixed
top 0
width 100vw
height $headerHeight
box-sizing border-box
background-color $headerBgColor
padding 20px 32px 20px
Expand Down
1 change: 1 addition & 0 deletions example/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// $newsletterBgColor = #f8f8f8

// layout
// $headerHeight = 80px
// $contentWidth = 740px

// responsive breakpoints
Expand Down
5 changes: 5 additions & 0 deletions styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ h1, h2, h3, h4, h5, h6
line-height 1.25
font-family PT Serif

{$contentClass}:not(.custom) > &
margin-top 'calc(0.5rem - %s)' % ($headerHeight)
padding-top 'calc(%s + 1rem)' % ($headerHeight)
margin-bottom 0

&:hover .header-anchor
opacity: 1

Expand Down
1 change: 1 addition & 0 deletions styles/palette.styl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ $postTagBgColor = #ededed;
$postTagColor = darken($postTagBgColor,50%)

// layout
$headerHeight = 80px
// $contentWidth = 740px

// responsive breakpoints
Expand Down

0 comments on commit 89b08b6

Please sign in to comment.