Skip to content

Commit

Permalink
move TOC just below its link in the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
mathroc committed Jul 22, 2023
1 parent 496624f commit a54bd28
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions source/_layouts/psr.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
<li class="sidebar__item">
<a class="sidebar__link {% if related.permalink == '' %}sidebar__link--active{% endif %}"
href="{{ related.permalink }}">{{ related.name }}</a>

{% if related.permalink == '' %}
{% set content = include(page.markdown_source) %}
<div class="sidebar_toc markdown">
{{ content | markdown_toc | raw }}
</div>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>

<div class="columns__column columns__column--4 columns__column--padding_left">
<nav class="sidebar">
<h2 class="sidebar__title">Table of contents:</h2>
{% set content = include(page.markdown_source) %}
{{ content | markdown_toc | raw }}
</nav>
</div>
{% endif %}
</div>
{% endblock %}

0 comments on commit a54bd28

Please sign in to comment.