Improved navigation with anchors

Anchors are now offset above headings which results in the
visible heading being just below the navbar. For now navigation
by anchor only works with activated toc. A more comprehensive
solution might come in the future.

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2019-06-10 16:35:36 +02:00
parent 68c9036a58
commit 408837f312
2 changed files with 9 additions and 0 deletions

View File

@ -239,3 +239,10 @@ ul.list-unstyled li {
color: #333;
white-space: nowrap;
}
.anchor {
position: relative;
display: block;
top: -$navbarHeight;
visibility: hidden;
}

View File

@ -44,6 +44,8 @@ defaults:
# Build settings
markdown: kramdown
kramdown:
auto_ids: false
include:
- .htaccess
exclude: