Optimized the TOC position.

This commit is contained in:
Cotes Chung 2020-06-11 21:16:44 +08:00
parent 47e5c3a917
commit 618ae9dcbc
2 changed files with 3 additions and 3 deletions

View file

@ -57,16 +57,15 @@
{% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
{% endfor %}
{% endfor %}
</div>
</div>
{% endif %}
</div> <!-- .access -->
{% if page.layout == 'post' and site.toc and page.toc %}
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
<h3 data-toc-skip class="pl-3 pt-2 mb-3">
<h3 data-toc-skip class="pl-3 pt-2 mb-2">
{{- site.data.label.panel.toc -}}
</h3>
<nav id="toc" data-toggle="toc"></nav>

View file

@ -127,6 +127,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
#toc-wrapper {
margin-top: 7rem;
border-left: 1px solid rgba(158, 158, 158, 0.17);
position: -webkit-sticky;
position: sticky;