tidy up forrmatting on pages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,6 +8,7 @@ type SnapshotEntry struct {
|
||||
Label string
|
||||
Link string
|
||||
Count int64
|
||||
Group string
|
||||
}
|
||||
|
||||
templ SnapshotHourlyList(entries []SnapshotEntry) {
|
||||
@@ -40,21 +41,43 @@ templ SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) {
|
||||
</section>
|
||||
|
||||
<section class="web2-card">
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<h2 class="text-lg font-semibold">Available Exports </h2>
|
||||
<span class="text-xs uppercase tracking-[0.2em] text-slate-400">{len(entries)} files</span>
|
||||
<div class="flex items-center justify-between gap-3 mb-4 flex-wrap">
|
||||
<h2 class="text-lg font-semibold">Available Exports</h2>
|
||||
<span class="web2-badge">{len(entries)} files</span>
|
||||
</div>
|
||||
<div class="overflow-hidden border border-slate-200 rounded">
|
||||
<table class="web2-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Snapshot</th>
|
||||
<th>Records</th>
|
||||
<th class="text-right">Download</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
for i, entry := range entries {
|
||||
if entry.Group != "" && (i == 0 || entries[i-1].Group != entry.Group) {
|
||||
<tr class="web2-group-row">
|
||||
<td colspan="3" class="font-semibold text-slate-700">{entry.Group}</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-sm font-semibold text-slate-700">{entry.Label}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="web2-badge">{entry.Count} records</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="web2-link" href={entry.Link}>Download XLSX</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<ul class="mt-6 space-y-3 web2-list">
|
||||
for _, entry := range entries {
|
||||
<li class="flex items-center justify-between gap-4">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-sm font-semibold text-slate-700">{entry.Label}</span>
|
||||
<span class="text-xs text-slate-500">{entry.Count} records</span>
|
||||
</div>
|
||||
<a class="web2-link" href={entry.Link}>Download XLSX</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user