typst4ei 2.0.1

The Typst4EI building and serving tool/cli
{% extends "base.html.j2" %}

{% block title %}Startseite{% endblock %}

{% block main %}
<div class="mb-3">
Gruppiere nach:
{% for allowed_group_by in allowed_group_bys -%}
   <a href="index_by_{{ allowed_group_by.key() }}.html"
      {%- if *allowed_group_by == group_by -%}
      class="link-secondary"
      aria-current="page"
      {%- endif %}>
     {{- allowed_group_by.name() -}}
   </a>{%- if !loop.last -%}&nbsp;&bull;&nbsp;{%- endif %}
{%- endfor %}
</div>

{% for table in tables -%}
    {%- if table.title.len() != 0 %}
    <h1 class="h4 mt-2">{{ table.title }}</h1>
    {% endif %}

    {%- if table.documents.len() != 0 -%}
    <div class="table-responsive">
    <table class="table table-striped table-sm">
        <thead>
            <tr>
                <th scope="col">Titel</th>
                {%- if group_by != GroupBy::Category -%}
                    <th scope="col">Kategorie</th>
                {%- endif %}
                {%- if group_by != GroupBy::Author -%}
                    <th scope="col">Autor</th>
                {% endif %}
                <th scope="col" class="d-none d-lg-table-cell">Quelle</th>
		<th scope="col">Lizenz</th>
                <th scope="col" class="d-none d-lg-table-cell">Zuletzt aktualisiert</th>
            </tr>
        </thead>
        <tbody>
            {%- for document in table.documents %}
            <tr>
	        <td><a href="{{ document.filename }}">{{ document.title }}</a></td>
                {%- if group_by != GroupBy::Category -%}
                    <td>{{ document.module.category() }}</td>
                {% endif %}
                {%- if group_by != GroupBy::Author -%}
                    <td>{{ document.authors.join(", ") }}</td>
                {% endif %}
                {%- if document.source.hide_urls -%}
                    <td class="d-none d-lg-table-cell">{{ document.source.provider.to_string() }}</td>
		{%- else -%}
                    <td class="d-none d-lg-table-cell"><a href="{{ document.source.display_url() }}">{{ document.source.provider.to_string() }}</a></td>
                {%- endif %}
		<td><a href="{{ document.license.url }}">{{ document.license.name }}</a></td>
                <td class="d-none d-lg-table-cell">{{ document.modification_time.format("%Y-%m-%d %H:%M:%S") }}</td>
            {%- endfor %}
        </tbody>
    </table>
    </div>
    {% endif %}
{%- endfor %}

{% endblock %}