mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-18 11:05:39 -04:00
74 lines
2.9 KiB
HTML
74 lines
2.9 KiB
HTML
---
|
|
layout: compress
|
|
---
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="{{ page.lang | default: "en-US" }}" dir="{% if site.data.rtl contains page.collection %}rtl{% else %}ltr{% endif %}">
|
|
<head>
|
|
{% include head.html %}
|
|
</head>
|
|
<body>
|
|
<div class="content">
|
|
{% include nav.html %}
|
|
|
|
<main>
|
|
<div class="container-fluid main-content">
|
|
{% include language-alert.html %}
|
|
<div class="row mt-3">
|
|
<div class="col-md-3">
|
|
<div class="rounded-3 sidebar-container mb-3 p-3">
|
|
{% comment %} Get category list {% endcomment %}
|
|
{% assign items = site[page.collection] | where: "section", page.section | sort_natural: "title" %}
|
|
{% comment %} First do the index {% endcomment %}
|
|
{% assign item = items | where_exp: "item", "item.url contains 'index.html'" | first %}
|
|
{% if item %}
|
|
<a class="{% if page.title == item.title %}fw-bold{% endif %}" href="{{ item.url | remove: "index.html" }}">{{ item.title }}</a>
|
|
<hr class="mt-2 mb-2">
|
|
{% endif %}
|
|
<ul class="list-unstyled">
|
|
{% comment %} Then the pages not in categories {% endcomment %}
|
|
{% for item in items %}
|
|
{% unless item.url contains "index.html" or item.category %}
|
|
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url | remove: ".html" }}">{{ item.title }}</a></li>
|
|
{% endunless %}
|
|
{% endfor %}
|
|
{% comment %} Finally, the other pages {% endcomment %}
|
|
{% for cat in site.data[page.collection].categories[page.section] %}
|
|
<li>
|
|
<details {% if page.category == cat.key %}open{% endif %}>
|
|
<summary>{{ cat.title }}</summary>
|
|
<ul>
|
|
{% assign filtered = items | where: "category", cat.key %}
|
|
{% for item in filtered %}
|
|
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url | remove: ".html" }}">{{ item.title }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9">
|
|
<h1 class="mb-1">{{ page.long_title | default: page.title }}</h1>
|
|
<hr class="mt-0">
|
|
{% if page.layout == "faq" %}
|
|
{{ content | replace: "<table>", '<div class="table-responsive"><table class="table">' | replace: "</table>", "</table></div>" }}
|
|
{% else %}
|
|
{% assign content = content | replace: "<table>", '<div class="table-responsive"><table class="table">' | replace: "</table>", "</table></div>" %}
|
|
{% include anchor-headings.html html=content anchorBody="<small>#</small>" anchorClass="header-anchor" %}
|
|
{% endif %}
|
|
<div class="alert alert-secondary small-alert" role="alert">
|
|
{{ site.data[page.collection].strings.need-help }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
{% include footer.html %}
|
|
|
|
{% include common-js.html %}
|
|
</body>
|
|
</html> |