mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-19 18:42:34 +00:00
parent
07097c8537
commit
368dc1d8ee
@ -15,8 +15,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
padding-top: 10px;
|
|
||||||
|
|
||||||
// Supported plugins: hexo-renderer-markdown-it hexo-renderer-marked
|
// Supported plugins: hexo-renderer-markdown-it hexo-renderer-marked
|
||||||
.header-anchor, .headerlink {
|
.header-anchor, .headerlink {
|
||||||
border-bottom-style: none;
|
border-bottom-style: none;
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
.post-body {
|
.post-body {
|
||||||
// For headers narrow width.
|
// For headers narrow width.
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
margin: 10px 0 8px;
|
margin: 20px 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rewrite paddings & margins inside tags.
|
// Rewrite paddings & margins inside tags.
|
||||||
|
|||||||
@ -34,7 +34,7 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
font-family: $font-family-headings;
|
font-family: $font-family-headings;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin: 20px 0 15px;
|
margin: 30px 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
for $headline in (1 .. 6) {
|
for $headline in (1 .. 6) {
|
||||||
|
|||||||
@ -181,7 +181,7 @@ NexT.utils = {
|
|||||||
}
|
}
|
||||||
if (!Array.isArray(NexT.utils.sections)) return;
|
if (!Array.isArray(NexT.utils.sections)) return;
|
||||||
let index = NexT.utils.sections.findIndex(element => {
|
let index = NexT.utils.sections.findIndex(element => {
|
||||||
return element && element.getBoundingClientRect().top > 0;
|
return element && element.getBoundingClientRect().top > 10;
|
||||||
});
|
});
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
index = NexT.utils.sections.length - 1;
|
index = NexT.utils.sections.length - 1;
|
||||||
@ -275,7 +275,7 @@ NexT.utils = {
|
|||||||
targets : document.scrollingElement,
|
targets : document.scrollingElement,
|
||||||
duration : 500,
|
duration : 500,
|
||||||
easing : 'linear',
|
easing : 'linear',
|
||||||
scrollTop: offset + 10,
|
scrollTop: offset,
|
||||||
complete : () => {
|
complete : () => {
|
||||||
history.pushState(null, document.title, element.href);
|
history.pushState(null, document.title, element.href);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user