Files
qr-tabellen/app/templates/table.html

46 lines
1.3 KiB
HTML

<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ schema.title }}</title>
<style>{{ css }}</style>
</head>
<body>
<main>
<header class="page-head">
<h1>{{ schema.title }}</h1>
{% if version_label %}<p class="meta">Stand: {{ version_label }}</p>{% endif %}
</header>
<div class="table-wrap">
<table>
<thead>
<tr>
{% for col in columns %}<th class="t-{{ col.type }}">{{ col.label }}</th>{% endfor %}
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
{% for cell in row %}
<td class="t-{{ cell.type }}">
{%- if cell.type == "url" and cell.text -%}
<a href="{{ cell.text }}" class="qr-cell">
<span class="qr">{{ cell.qr | safe }}</span>
<span class="qr-link">{{ cell.short }}</span>
</a>
{%- elif cell.type == "rating_5" and cell.stars -%}
<span class="stars" aria-label="{{ cell.text }} von 5 Sternen">{{ cell.stars }}</span>
{%- else -%}{{ cell.text }}{%- endif -%}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<footer class="page-foot">Erzeugt am {{ generated }} · QR-Tabellen</footer>
</main>
</body>
</html>