mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Remove .container
This commit is contained in:
parent
acc5a74268
commit
9ec4d87ddc
@ -9,37 +9,35 @@
|
|||||||
{{ partial('_scripts/noscript.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_scripts/noscript.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body itemscope itemtype="http://schema.org/WebPage">
|
<body itemscope itemtype="http://schema.org/WebPage"{% if theme.motion.enable %} class="use-motion"{% endif %}>
|
||||||
<div class="container{%- if theme.motion.enable %} use-motion{%- endif %}">
|
<div class="headband"></div>
|
||||||
<div class="headband"></div>
|
|
||||||
|
|
||||||
<main class="main">
|
<main class="main">
|
||||||
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
|
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
|
||||||
<div class="header-inner">{% include '_partials/header/index.njk' %}</div>
|
<div class="header-inner">{% include '_partials/header/index.njk' %}</div>
|
||||||
{%- if theme.sidebar.display !== 'remove' %}
|
{%- if theme.sidebar.display !== 'remove' %}
|
||||||
{% block sidebar %}{% endblock %}
|
{% block sidebar %}{% endblock %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{ partial('_partials/widgets.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_partials/widgets.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
|
|
||||||
<div class="main-inner">
|
<div class="main-inner">
|
||||||
{% include '_partials/header/sub-menu.njk' %}
|
{% include '_partials/header/sub-menu.njk' %}
|
||||||
<div class="content {% block class %}{% endblock %}">
|
<div class="content {% block class %}{% endblock %}">
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</div>
|
|
||||||
{% include '_partials/comments.njk' %}
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
{% include '_partials/comments.njk' %}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="footer-inner">
|
<div class="footer-inner">
|
||||||
{% include '_partials/languages.njk' %}
|
{% include '_partials/languages.njk' %}
|
||||||
{{ partial('_partials/footer.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_partials/footer.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
{{ partial('_third-party/statistics/index.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_third-party/statistics/index.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial('_scripts/index.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_scripts/index.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
{{ partial('_third-party/index.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_third-party/index.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
.container {
|
|
||||||
min-height: 100%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
@import 'header';
|
@import 'header';
|
||||||
@import 'sidebar';
|
@import 'sidebar';
|
||||||
@import 'footer';
|
@import 'footer';
|
||||||
|
|||||||
@ -13,6 +13,8 @@ body {
|
|||||||
font-family: $font-family-base;
|
font-family: $font-family-base;
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
line-height: $line-height-base;
|
line-height: $line-height-base;
|
||||||
|
min-height: 100%;
|
||||||
|
position: relative;
|
||||||
transition: all $transition-ease;
|
transition: all $transition-ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
if (hexo-config('sidebar.position') == 'right') {
|
if (hexo-config('sidebar.position') == 'right') {
|
||||||
.sidebar-active {
|
.sidebar-active {
|
||||||
+desktop() {
|
+desktop() {
|
||||||
padding-right: $sidebar-desktop;
|
margin-right: $sidebar-desktop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ if (hexo-config('sidebar.position') == 'right') {
|
|||||||
} else {
|
} else {
|
||||||
.sidebar-active {
|
.sidebar-active {
|
||||||
+desktop() {
|
+desktop() {
|
||||||
padding-left: $sidebar-desktop;
|
margin-left: $sidebar-desktop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,9 +145,7 @@ NexT.utils = {
|
|||||||
// For init back to top in sidebar if page was scrolled after page refresh.
|
// For init back to top in sidebar if page was scrolled after page refresh.
|
||||||
window.addEventListener('scroll', () => {
|
window.addEventListener('scroll', () => {
|
||||||
if (backToTop || readingProgressBar) {
|
if (backToTop || readingProgressBar) {
|
||||||
const docHeight = document.querySelector('.container').offsetHeight;
|
const contentHeight = document.body.scrollHeight - window.innerHeight;
|
||||||
const winHeight = window.innerHeight;
|
|
||||||
const contentHeight = docHeight > winHeight ? docHeight - winHeight : document.body.scrollHeight - winHeight;
|
|
||||||
const scrollPercent = contentHeight > 0 ? Math.min(100 * window.scrollY / contentHeight, 100) : 0;
|
const scrollPercent = contentHeight > 0 ? Math.min(100 * window.scrollY / contentHeight, 100) : 0;
|
||||||
if (backToTop) {
|
if (backToTop) {
|
||||||
backToTop.classList.toggle('back-to-top-on', Math.round(scrollPercent) >= 5);
|
backToTop.classList.toggle('back-to-top-on', Math.round(scrollPercent) >= 5);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user