mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
New element .sidebar-panel-container
This commit is contained in:
parent
5385defde8
commit
885e0b70db
@ -22,19 +22,21 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!--noindex-->
|
||||
<section class="post-toc-wrap sidebar-panel">
|
||||
{%- if display_toc %}
|
||||
<div class="post-toc animated">{{ toc }}</div>
|
||||
{%- endif %}
|
||||
</section>
|
||||
<!--/noindex-->
|
||||
<div class="sidebar-panel-container">
|
||||
<!--noindex-->
|
||||
<section class="post-toc-wrap sidebar-panel">
|
||||
{%- if display_toc %}
|
||||
<div class="post-toc animated">{{ toc }}</div>
|
||||
{%- endif %}
|
||||
</section>
|
||||
<!--/noindex-->
|
||||
|
||||
<section class="site-overview-wrap sidebar-panel">
|
||||
{{ partial('_partials/sidebar/site-overview.njk', {}, {cache: theme.cache.enable}) }}
|
||||
<section class="site-overview-wrap sidebar-panel">
|
||||
{{ partial('_partials/sidebar/site-overview.njk', {}, {cache: theme.cache.enable}) }}
|
||||
|
||||
{{- next_inject('sidebar') }}
|
||||
</section>
|
||||
{{- next_inject('sidebar') }}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{%- if theme.back2top.enable and theme.back2top.sidebar %}
|
||||
<div class="back-to-top animated">
|
||||
|
||||
@ -35,13 +35,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-panel {
|
||||
display: none;
|
||||
.sidebar-panel-container {
|
||||
max-height: var(--sidebar-wrapper-height);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidebar-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-overview-active .site-overview-wrap {
|
||||
// Flexbox layout makes it possible to reorder the child
|
||||
// elements of .site-overview-item through the `order` CSS property
|
||||
|
||||
@ -272,7 +272,7 @@ NexT.utils = {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
// Scrolling to center active TOC element if TOC content is taller then viewport.
|
||||
const tocElement = document.querySelector('.post-toc-wrap');
|
||||
const tocElement = document.querySelector('.sidebar-panel-container');
|
||||
window.anime({
|
||||
targets : tocElement,
|
||||
duration : 200,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user