fix docs anchor

This commit is contained in:
cmsxbc 2021-12-16 01:15:23 +08:00
parent bda0cc2f76
commit 10cbdcd34f
No known key found for this signature in database
GPG Key ID: A58268D081411C9C
4 changed files with 35 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -289,6 +289,8 @@ $nav-tabs-link-active-border-color: $gray-700;
$navbar-padding-y: 24px;
$navbar-padding-x: 0;
$navbar-nav-height: 46px;
$navbar-height-xl: 80px;
// Cards

View File

@ -52,7 +52,7 @@
&-nav {
align-items: center;
height: 46px;
height: $navbar-nav-height;
}
.nav-item:not(:last-child) {
@ -131,6 +131,35 @@
}
@media screen and (max-width: 399.98px) {
height: 80px;
height: $navbar-height-xl;
}
}
.navbar {
@for $i from 1 through 8 {
&.py-#{$i} {
+ div {
.anchor-fixer {
:target {
@media screen and (min-width: 616px) {
scroll-margin-top: $navbar-nav-height + $spacer * $i * 2;
}
}
}
}
}
}
+ div {
.anchor-fixer {
:target {
@media screen and (max-width: 615.98px) {
scroll-margin-top: 73px;
}
@media screen and (max-width: 399.98px) {
scroll-margin-top: $navbar-height-xl;
}
}
}
}
}

View File

@ -1,4 +1,4 @@
<div id="content-wrapper" class="{% if single_page %}col-md-10{% else %}col-md-8{% endif %} mt-5 p-2 p-md-4">
<div id="content-wrapper" class="anchor-fixer {% if single_page %}col-md-10{% else %}col-md-8{% endif %} mt-5 p-2 p-md-4">
<div id="content">
{% if not single_page %}
{% set ancestors = page.ancestors|reverse|list %}