1
0
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:
mo8it
2025-05-17 19:53:30 +02:00
parent b4a6b87e24
commit 2f700991f3
6 changed files with 40 additions and 54 deletions

View File

@ -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 %}