{% extends "base.html" %}

{% block title %}{{section.title|safe}} &#8211; {{ tr.sitename|safe }}{% endblock title %}

{% block head %}
{% if section.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}

{% block header %}
<span class="langs">
	{{lang}} &#8211;
	
	{% for t in section.translations %}
		{% if t.lang|default(value=config.default_language) != lang %}
			<a href="{{t.permalink|safe}}">{{t.lang|default(value=config.default_language)}}</a>
		{% endif %}
	{% endfor %}
</span>
{% endblock header %}

{% block main %}
<h1>{{section.title | safe}}</h1>

{{section.content | safe}}

<section class="article-list">
	{% for page in section.pages %}
		<article>
			<h2 class="article-list_title">
				{% if page.extra.redirect %}🔗{% endif %}
				<a href="{% if page.extra.redirect %}{{page.extra.redirect|safe}}{% else %}{{page.permalink|safe}}{% endif %}">{{page.title|safe}}</a>
			</h2>
			<small>{{page.date}}</small>
			<p>{{page.description|safe}}</p>
		</article>
	{% endfor %}
</section>
{% endblock main %}
