tab bug fixed
This commit is contained in:
parent
96888c4bce
commit
0b6780677c
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
$text-font-stack: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default;
|
$text-font-stack: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default;
|
||||||
$code-font-stack: Consolas, Monaco, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", "Lucida Console", "Lucida Sans Typewriter", "Liberation Mono", "Nimbus Mono L", Monaco, Courier, monospace !default;
|
$code-font-stack: Consolas, Monaco, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", "Lucida Console", "Lucida Sans Typewriter", "Liberation Mono", "Nimbus Mono L", Monaco, Courier, monospace !default;
|
||||||
|
$contents-font-stack: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif !default;
|
||||||
|
|
||||||
$z-indexes: ("modal", "navbar", "dropdown", "header", "gtt", "clipboard", "grid", "search-btn", "search", "content", "footer", "taxo", "toc", "gallery-mask", "card-outter", "card-inner");
|
$z-indexes: ("modal", "navbar", "dropdown", "header", "gtt", "clipboard", "grid", "search-btn", "search", "content", "footer", "taxo", "toc", "gallery-mask", "card-outter", "card-inner");
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ dfn {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
figcaption {
|
figcaption {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
|
margin-bottom: 0;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
padding: auto;
|
padding: auto;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
border-top: 30px solid #f1b37e;
|
border-top: 30px solid #f1b37e;
|
||||||
background: #fefaf5;
|
background: #fefaf5;
|
||||||
color: rgba(150, 90, 38, 0.995) !important;
|
color: rgba(150, 90, 38, 0.995) !important;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
|
|
||||||
&:first-child::after {
|
&:first-child::after {
|
||||||
content: 'Info';
|
content: 'Info';
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
border-top: 30px solid #d58181;
|
border-top: 30px solid #d58181;
|
||||||
background: #fbeded;
|
background: #fbeded;
|
||||||
color: rgba(132, 56, 56, 0.995) !important;
|
color: rgba(132, 56, 56, 0.995) !important;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
|
|
||||||
&:first-child::after {
|
&:first-child::after {
|
||||||
content: 'Warning';
|
content: 'Warning';
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
border-top: 30px solid #6bb1e0;
|
border-top: 30px solid #6bb1e0;
|
||||||
background: #e6f3fb;
|
background: #e6f3fb;
|
||||||
color: rgba(47, 103, 141, 0.995) !important;
|
color: rgba(47, 103, 141, 0.995) !important;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
|
|
||||||
&:first-child::after {
|
&:first-child::after {
|
||||||
content: 'Note';
|
content: 'Note';
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
border-top: 30px solid #84c578;
|
border-top: 30px solid #84c578;
|
||||||
background: #e8f7e6;
|
background: #e8f7e6;
|
||||||
color: rgba(72, 125, 63, 0.995) !important;
|
color: rgba(72, 125, 63, 0.995) !important;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
|
|
||||||
&:first-child::after {
|
&:first-child::after {
|
||||||
content: 'Tip';
|
content: 'Tip';
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
&__text {
|
&__text {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
line-height: 1.7rem;
|
line-height: 1.7rem;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__image {
|
&__image {
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
&__desc {
|
&__desc {
|
||||||
width: 65%;
|
width: 65%;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
|
|
||||||
@media only screen and (max-width: 769px) {
|
@media only screen and (max-width: 769px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
&__contents {
|
&__contents {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
width: 65%;
|
width: 65%;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--desc {
|
&--desc {
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
font-weight: italic;
|
font-weight: italic;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
line-height: 1.7rem;
|
line-height: 1.7rem;
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--desc {
|
&--desc {
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0.25rem 0;
|
margin: 0.25rem 0;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
font-family: $title-font;
|
font-family: $title-font;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
|
||||||
@include animation('slide-in-down .2s .3s 1 ease-in both');
|
@include animation('slide-in-down .2s .3s 1 ease-in both');
|
||||||
@include themify($themes) {
|
@include themify($themes) {
|
||||||
|
@ -19,6 +21,7 @@
|
||||||
|
|
||||||
&__meta {
|
&__meta {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
|
||||||
@include flexbox();
|
@include flexbox();
|
||||||
@include align-items(center);
|
@include align-items(center);
|
||||||
|
@ -56,8 +59,8 @@
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
font-size: 1rem;
|
font-size: 17.2px;
|
||||||
font-family: $content-font;
|
font-family: $contents-font-stack;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
width: inheirt;
|
width: inheirt;
|
||||||
|
|
|
@ -194,7 +194,17 @@
|
||||||
var navbar = document.querySelector('.navbar');
|
var navbar = document.querySelector('.navbar');
|
||||||
var tocFlexbox = document.querySelector('.toc__flexbox');
|
var tocFlexbox = document.querySelector('.toc__flexbox');
|
||||||
var tocFlexboxOuter = document.querySelector('.toc__flexbox--outer');
|
var tocFlexboxOuter = document.querySelector('.toc__flexbox--outer');
|
||||||
|
var notAllowedTitleIds = null;
|
||||||
|
|
||||||
|
singleContentsElem && singleContentsElem.querySelectorAll(".tab") ?
|
||||||
|
singleContentsElem.querySelectorAll(".tab").forEach(function (elem) {
|
||||||
|
elem.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(function (element) {
|
||||||
|
notAllowedTitleIds = Array.isArray(notAllowedTitleIds) ?
|
||||||
|
notAllowedTitleIds.concat(element.getAttribute('id')) :
|
||||||
|
[element.getAttribute('id')];
|
||||||
|
});
|
||||||
|
}) : null;
|
||||||
|
|
||||||
window.onscroll = function () {
|
window.onscroll = function () {
|
||||||
scrollFunction();
|
scrollFunction();
|
||||||
|
|
||||||
|
@ -223,6 +233,10 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (document.documentElement.scrollTop >= elem.offsetTop) {
|
if (document.documentElement.scrollTop >= elem.offsetTop) {
|
||||||
if (tableOfContentsElem) {
|
if (tableOfContentsElem) {
|
||||||
var id = elem.getAttribute('id');
|
var id = elem.getAttribute('id');
|
||||||
|
@ -282,6 +296,10 @@
|
||||||
if (toggleTocElem && !toggleTocElem.checked) {
|
if (toggleTocElem && !toggleTocElem.checked) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (document.documentElement.scrollTop >= elem.offsetTop) {
|
if (document.documentElement.scrollTop >= elem.offsetTop) {
|
||||||
if (tableOfContentsElem) {
|
if (tableOfContentsElem) {
|
||||||
|
@ -559,7 +577,7 @@
|
||||||
location: 0,
|
location: 0,
|
||||||
distance: 100,
|
distance: 100,
|
||||||
maxPatternLength: 32,
|
maxPatternLength: 32,
|
||||||
minMatchCharLength: 1,
|
minMatchCharLength: 2,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue