{% include '_partials/header/index.njk' %}
- {%- if theme.sidebar.display !== 'remove' %}
- {% block sidebar %}{% endblock %}
- {%- endif %}
- {% include '_partials/header/index.njk' %}
+ {%- if theme.sidebar.display !== 'remove' %}
+ {% block sidebar %}{% endblock %}
+ {%- endif %}
+
- {% include '_partials/header/sub-menu.njk' %}
-
+
{{ partial('_scripts/index.njk', {}, {cache: theme.cache.enable}) }}
{{ partial('_third-party/index.njk', {}, {cache: theme.cache.enable}) }}
diff --git a/source/css/_common/outline/outline.styl b/source/css/_common/outline/outline.styl
index 3762767..8c3d532 100644
--- a/source/css/_common/outline/outline.styl
+++ b/source/css/_common/outline/outline.styl
@@ -1,8 +1,3 @@
-.container {
- min-height: 100%;
- position: relative;
-}
-
@import 'header';
@import 'sidebar';
@import 'footer';
diff --git a/source/css/_common/scaffolding/base.styl b/source/css/_common/scaffolding/base.styl
index 118e457..8751730 100644
--- a/source/css/_common/scaffolding/base.styl
+++ b/source/css/_common/scaffolding/base.styl
@@ -13,6 +13,8 @@ body {
font-family: $font-family-base;
font-size: $font-size-base;
line-height: $line-height-base;
+ min-height: 100%;
+ position: relative;
transition: all $transition-ease;
}
diff --git a/source/css/_schemes/Muse/_sidebar.styl b/source/css/_schemes/Muse/_sidebar.styl
index b660a46..2b3a8e9 100644
--- a/source/css/_schemes/Muse/_sidebar.styl
+++ b/source/css/_schemes/Muse/_sidebar.styl
@@ -1,7 +1,7 @@
if (hexo-config('sidebar.position') == 'right') {
.sidebar-active {
+desktop() {
- padding-right: $sidebar-desktop;
+ margin-right: $sidebar-desktop;
}
}
@@ -15,7 +15,7 @@ if (hexo-config('sidebar.position') == 'right') {
} else {
.sidebar-active {
+desktop() {
- padding-left: $sidebar-desktop;
+ margin-left: $sidebar-desktop;
}
}
diff --git a/source/js/utils.js b/source/js/utils.js
index 157232b..0f95a0d 100644
--- a/source/js/utils.js
+++ b/source/js/utils.js
@@ -145,9 +145,7 @@ NexT.utils = {
// For init back to top in sidebar if page was scrolled after page refresh.
window.addEventListener('scroll', () => {
if (backToTop || readingProgressBar) {
- const docHeight = document.querySelector('.container').offsetHeight;
- const winHeight = window.innerHeight;
- const contentHeight = docHeight > winHeight ? docHeight - winHeight : document.body.scrollHeight - winHeight;
+ const contentHeight = document.body.scrollHeight - window.innerHeight;
const scrollPercent = contentHeight > 0 ? Math.min(100 * window.scrollY / contentHeight, 100) : 0;
if (backToTop) {
backToTop.classList.toggle('back-to-top-on', Math.round(scrollPercent) >= 5);
- {% block content %}{% endblock %}
-
- {% include '_partials/comments.njk' %}
+
+ {% include '_partials/header/sub-menu.njk' %}
+
+
-
-
+ {% block content %}{% endblock %}
-
+ {% include '_partials/comments.njk' %}
+