mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Fix overlap of 'All Posts' and ToC; add comments to ToC
The 'All Posts' link used to overlap with the table of contents at the end of a post. This occured because the ToC is sticky to the `main` block, so it scrolled up before the `comments` section. The 'All Post' link, however, is fixed, so it does not scroll up. This commit fixes the issue by moving the comment block to the main block (from the after_main block). This way, the ToC stays visible in the comment section. We also add the comment section to the ToC.
This commit is contained in:
@@ -425,3 +425,7 @@ details summary h3, details summary h4, details summary h5, details summary h6 {
|
|||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toc-comments-link {
|
||||||
|
margin-top: .5rem;
|
||||||
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
</li>{% endfor %}
|
</li>{% endfor %}
|
||||||
</ul>{% endif %}
|
</ul>{% endif %}
|
||||||
</li>{% endfor %}
|
</li>{% endfor %}
|
||||||
|
<li class="toc-comments-link"><a href="#comments">Comments</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
{% endmacro toc %}
|
{% endmacro toc %}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
</li>{% endfor %}
|
</li>{% endfor %}
|
||||||
</ol>{% endif %}
|
</ol>{% endif %}
|
||||||
</li>{% endfor %}
|
</li>{% endfor %}
|
||||||
|
<li class="toc-comments-link"><a href="#comments">Comments</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
@@ -70,9 +71,7 @@
|
|||||||
<h2>Support Me</h2>
|
<h2>Support Me</h2>
|
||||||
{% include "support.html" %}
|
{% include "support.html" %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock main %}
|
|
||||||
|
|
||||||
{% block after_main %}
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="PageNavigation">
|
<div class="PageNavigation">
|
||||||
{% if page.lighter %}
|
{% if page.lighter %}
|
||||||
|
|||||||
Reference in New Issue
Block a user