snowchive-server/templates/explore_table.html
2026-11-19 04:40:59 +02:00

35 lines
1.1 KiB
HTML

{{ define "title" }}{{ .Metric.Title }} - Snowden Archive{{ end }}
{{ define "content" }}
<p class="crumb"><a href="/explore">&larr; Explore</a></p>
<h1>{{ .Metric.Title }}</h1>
<p class="tab-desc">{{ .Metric.Blurb }}</p>
<p class="muted">Top {{ .Shown }} of {{ .Total }} documents.</p>
<div class="table-scroll">
<table class="cat-table explore-table">
<thead>
<tr>{{ range .Heads }}{{ template "sort-th" . }}{{ end }}</tr>
</thead>
<tbody>
{{ if .RowsHTML }}{{ .RowsHTML }}{{ else }}{{ template "explore-rows" . }}{{ end }} </tbody>
</table>
</div>
{{ end }}
{{ template "base.html" . }}
{{ define "explore-rows" }} {{ range .Rows }}
<tr>
<td class="num-col faint">{{ .Rank }}</td>
<td>
<a href="/doc/{{ .Doc.ID }}">{{ .Doc.Title }}</a>
{{ template "type-badge" .Doc.Type }}
</td>
<td class="explore-date">{{ with .Doc.DocMeta.DateCreated }}{{ . }}{{ else }}<span class="faint">-</span>{{ end }}</td>
{{ range .Vals }}
<td class="num-col">{{ . }}</td>
{{ end }}
</tr>
{{ end }}
{{ end }}