lektor-website/templates/macros/plugins.html

26 lines
781 B
HTML

{% macro render_category_nav(active=none) %}
<ul>
{% for category in site.query('/plugin-categories') %}
<li{% if category._id == active %} class="active"{% endif
%}><a href="{{ category|url }}">{{ category.name }}</a></li>
{% endfor %}
</ul>
{% endmacro %}
{% macro render_plugin_list(category) %}
<ul>
{% for plugin in category.children.order_by('-official', 'title') %}
{% if plugin.official %}
<li><a href="{{ plugin|url }}">* {{ plugin.name }}</a></li>
{% if loop.nextitem %}
{% if not loop.nextitem.official %}
---
{% endif %}
{% endif %}
{% else %}
<li><a href="{{ plugin|url }}">{{ plugin.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endmacro %}