gaisen/templates/main/index.html.twig

40 lines
984 B
Twig

{% extends 'base.html.twig' %}
{% block title %}{{ path }} | Gaisen{% endblock %}
{% macro render_tree(tree, prefix = '') %}
<ul>
{% for name, subtree in tree %}
<li>
<a href="{{ path('app_index', {
path: prefix ~ name
}) }}">
{{ name }}
</a>
{{ _self.render_tree(subtree, name ~ '/') }}
</li>
{% endfor %}
</ul>
{% endmacro %}
{% block body %}
<div class="bg-neutral-3 border-bottom w-100 p-2 fs-1 ps-3">
Gaisen
</div>
<div class="d-flex flex-row">
<div class="border-end bg-neutral-2 p-3">
{{ _self.render_tree(tree) }}
</div>
<div class="p-3">
{% if contents is not null %}
{{ contents|markdown_to_html }}
{% else %}
<span class="text-muted">Empty</span>
{% endif %}
</div>
</div>
<div class="bg-neutral-3 border-top w-100 p-2">
Version: <span class="text-muted">{{ version }}</span>
</div>
{% endblock %}