wiki/_layouts/wiki.html
2020-12-21 23:01:14 -06:00

68 lines
2.0 KiB
HTML

---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.collection | default: "en-US" }}">
{% include head.html%}
<body>
<div class="content">
{% include nav.html %}
<main>
<div class="container-fluid main-content">
{% include language-alert.html %}
<div class="row pt-5">
<div class="col-sm-3">
<div class="rounded-3 border sidebar-container mb-3 p-3">
{% assign items = site[page.collection] | where: "section", page.section | sort: "category" %}
<ul class="list-unstyled">
<!-- First check for index -->
{% for item in items %}
{% if item.url contains "index.html" %}
<li class="{% unless item contains category %}li-bullet{% endunless %} {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endif %}
{% endfor %}
<!-- Then the other pages -->
{% for item in items %}
{% unless item.url contains "index.html" %}
{% if item.category and category != item.category %}
{% if category %}
</ul>
</details>
</li>
{% endif %}
{% assign category = item.category %}
<li>
<details {% if page.category == category %}open{% endif %}>
<summary>{{ category }}</summary>
<ul>
{% endif %}
<li class="{% unless item contains category %}li-bullet{% endunless %} {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endunless %}
{% endfor %}
{% if category %}
</ul>
</details>
</li>
{% endif %}
</ul>
</div>
</div>
<div class="col-sm-9">
<h1>{{ page.title }}</h1>
<hr>
{% include anchor-headings.html html=content anchorBody="<small>#</small>" anchorClass="header-anchor" %}
</div>
</div>
</div>
</main>
</div>
{% include footer.html %}
{% include common-js.html %}
</body>
</html>