tab bug fixed

This commit is contained in:
zzossig 2020-01-24 16:05:56 +09:00
parent 96888c4bce
commit 0b6780677c
11 changed files with 36 additions and 13 deletions

View File

@ -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;
$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");

View File

@ -118,7 +118,7 @@ dfn {
font-style: italic;
}
figcaption {
figcaption {
font-style: italic;
font-size: 0.9rem;
margin-top: 0.5rem;

View File

@ -1,5 +1,6 @@
.breadcrumb {
margin: 1rem;
margin-bottom: 0;
padding: 0.5rem;
border-radius: 0.25rem;
padding: auto;

View File

@ -27,7 +27,7 @@
border-top: 30px solid #f1b37e;
background: #fefaf5;
color: rgba(150, 90, 38, 0.995) !important;
font-family: $content-font;
font-family: $contents-font-stack;
&:first-child::after {
content: 'Info';
@ -39,7 +39,7 @@
border-top: 30px solid #d58181;
background: #fbeded;
color: rgba(132, 56, 56, 0.995) !important;
font-family: $content-font;
font-family: $contents-font-stack;
&:first-child::after {
content: 'Warning';
@ -51,7 +51,7 @@
border-top: 30px solid #6bb1e0;
background: #e6f3fb;
color: rgba(47, 103, 141, 0.995) !important;
font-family: $content-font;
font-family: $contents-font-stack;
&:first-child::after {
content: 'Note';
@ -63,7 +63,7 @@
border-top: 30px solid #84c578;
background: #e8f7e6;
color: rgba(72, 125, 63, 0.995) !important;
font-family: $content-font;
font-family: $contents-font-stack;
&:first-child::after {
content: 'Tip';

View File

@ -31,7 +31,7 @@
&__text {
margin-top: 1rem;
line-height: 1.7rem;
font-family: $content-font;
font-family: $contents-font-stack;
}
&__image {

View File

@ -68,7 +68,7 @@
&__desc {
width: 65%;
font-family: $content-font;
font-family: $contents-font-stack;
@media only screen and (max-width: 769px) {
width: 100%;

View File

@ -65,7 +65,7 @@
&__contents {
padding: 1rem;
width: 65%;
font-family: $content-font;
font-family: $contents-font-stack;
font-size: 1rem;
text-align: center;
}

View File

@ -27,7 +27,7 @@
}
&--desc {
font-family: $content-font;
font-family: $contents-font-stack;
font-weight: italic;
padding: 1rem;
line-height: 1.7rem;

View File

@ -125,7 +125,7 @@
}
&--desc {
font-family: $content-font;
font-family: $contents-font-stack;
font-size: 0.9rem;
margin: 0.25rem 0;
height: 70px;

View File

@ -10,6 +10,8 @@
font-family: $title-font;
line-height: 3rem;
overflow-wrap: break-word;
margin-top: 1.5rem;
margin-bottom: 0.5rem;
@include animation('slide-in-down .2s .3s 1 ease-in both');
@include themify($themes) {
@ -19,6 +21,7 @@
&__meta {
font-size: 0.8rem;
margin-bottom: 2rem;
@include flexbox();
@include align-items(center);
@ -56,8 +59,8 @@
text-decoration: underline;
}
font-size: 1rem;
font-family: $content-font;
font-size: 17.2px;
font-family: $contents-font-stack;
margin: 1rem 0;
line-height: 1.7;
width: inheirt;

View File

@ -194,7 +194,17 @@
var navbar = document.querySelector('.navbar');
var tocFlexbox = document.querySelector('.toc__flexbox');
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 () {
scrollFunction();
@ -223,6 +233,10 @@
return null;
}
if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
return null;
}
if (document.documentElement.scrollTop >= elem.offsetTop) {
if (tableOfContentsElem) {
var id = elem.getAttribute('id');
@ -282,6 +296,10 @@
if (toggleTocElem && !toggleTocElem.checked) {
return null;
}
if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
return null;
}
if (document.documentElement.scrollTop >= elem.offsetTop) {
if (tableOfContentsElem) {
@ -559,7 +577,7 @@
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
minMatchCharLength: 2,
});
}
else {