You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
916 B

{% extends "base.html" %}
{% block title %}{{ SHORT_SITENAME }} - {{ category|striptags }}{% endblock %}
{% block header %}
{{ LONG_SITENAME }}
{%endblock%}
{% block menuheader %}
{% import "_macros/menu.html" as macros %}
{{ macros.render_menu(category.slug) }}
{% endblock menuheader %}
{% block content %}
{% if category == "faq" %}
{% for article in articles|sort(attribute='published_at')|reverse %}
{% if article.category == "faq" %}
<article>
{{ article.content }}
</article>
{% endif %}
{% endfor %}
<script>
$(document).ready(function(){
$('.content').find('h3').each(function() {
let item = $(this);
let uid = item.attr('id');
let title = item.html();
item.replaceWith(`<a class="title" id="${uid}" href="#${uid}">${title}</a>`);
});
});
</script>
{% endif %}
{% endblock %}