30 lines
994 B
HTML
30 lines
994 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(plugins, active=none) %}
|
|
{% for category in site.query('/plugin-categories') %}
|
|
<h2><a href="{{ category|url }}">{{ category.name }}</a></h2>
|
|
<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>
|
|
{% endfor %}
|
|
{% endmacro %}
|