Kern-Engine: CSV parsen/validieren, QR-SVGs, HTML-Rendering + Selbsttest
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
45
app/templates/table.html
Normal file
45
app/templates/table.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user