mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-08-06 22:33:08 +02:00
Remove macros
This commit is contained in:
@ -1,11 +1,39 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{{ page.content | replace(from="<!-- toc -->", to=macros::toc() ) | safe }}
|
||||
<div class="px-4 py-0.5 my-3 border-s-4 rounded-xl border-double">
|
||||
<nav>
|
||||
<ul class="ml-0 list-none">
|
||||
{% for parent in page.toc %}
|
||||
{% if parent.level == 2 %}
|
||||
<li>
|
||||
{#- -#}
|
||||
<a href="{{ parent.permalink | safe }}">{{ parent.title }}</a>
|
||||
{#- -#}
|
||||
{% if parent.children %}
|
||||
<ul class="my-0 ml-5 list-none">
|
||||
{% for child in parent.children %}
|
||||
{% if child.level == 3 %}
|
||||
<li>
|
||||
{#- -#}
|
||||
<a class="text-base" href="{{ child.permalink | safe }}">{{ child.title }}</a>
|
||||
{#- -#}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{#- -#}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user