summaryrefslogtreecommitdiff
path: root/website/templates/page.html
diff options
context:
space:
mode:
authorMo Bitar <76752051+mo8it@users.noreply.github.com>2025-05-23 13:26:52 +0200
committerGitHub <noreply@github.com>2025-05-23 13:26:52 +0200
commit2267f996844475f45a96d9582e0ac0d40b4bce79 (patch)
tree94d0634e928e553ba1071fa405b787efb586e84d /website/templates/page.html
parente36dd7a1207ccf940ba820abc276fa465f45b531 (diff)
parentbf74a3d0a7ae3c0d12ba572fe1c2f1d711c6e530 (diff)
Merge pull request #2247 from rust-lang/website
Website
Diffstat (limited to 'website/templates/page.html')
-rw-r--r--website/templates/page.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/website/templates/page.html b/website/templates/page.html
new file mode 100644
index 0000000..b2f6c01
--- /dev/null
+++ b/website/templates/page.html
@@ -0,0 +1,39 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <article>
+ <h1>{{ page.title }}</h1>
+
+ <div class="py-0.5 px-4 my-3 rounded-xl border-double border-s-4">
+ <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 %}