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

63 lines
2.4 KiB
HTML

{{ define "title" }}Technical IDs - Snowden Archive{{ end }}
{{ define "content" }}
<header class="list-header">
<p class="crumb"><a href="/explore">&larr; Explore</a></p>
<h1>Technical IDs <small class="count-note">{{ .Shown }} document{{ if ne .Shown 1 }}s{{ end }}</small></h1>
</header>
<p class="muted">
<a href="/explore/ids.txt">Checksums as plain text</a>
<span class="faint">(<code>sha256sum -c</code> in the corpus root)</span>
</p>
<div class="table-scroll">
<table class="data-table id-table">
<colgroup>
<col class="c-id"><col class="c-coll"><col class="c-pages">
<col class="c-pdf"><col class="c-size"><col class="c-sha">
</colgroup>
<thead>
<tr>
<th>Document</th>
<th>Collection</th>
<th class="num">Pages</th>
<th>PDF</th>
<th class="num">Size</th>
<th>SHA-256</th>
</tr>
</thead>
<tbody>
{{ if .RowsHTML }}{{ .RowsHTML }}{{ else }}{{ template "id-rows" . }}{{ end }}
</tbody>
</table>
</div>
{{ end }}
{{ template "base.html" . }}
{{ define "id-rows" }}{{ range .Rows }}
<tr>
<td><a href="/doc/{{ .ID }}">{{ .ID }}</a>
{{- range .Aka }}<br><span class="faint">also published as</span> <code>{{ .ID }}</code>{{ end -}}
</td>
<td>{{ .Collection }}</td>
<td class="num">{{ if .Pages }}{{ .Pages }}{{ end }}</td>
<td><a href="{{ .PDFURL }}" target="_blank" rel="noopener"><code>{{ .PDFFile }}</code></a></td>
<td class="num">{{ .Size }}</td>
<td>{{ with .SHA }}<code class="checksum">{{ . }}</code>{{ else }}<span class="faint">-</span>{{ end }}</td>
</tr>
{{ $id := .ID }}
{{ range .Versions }}
<tr class="id-version">
<td><span class="faint">&#8627;</span> <a href="/doc/{{ $id }}/versions/{{ .Slug }}">versions/{{ .Slug }}</a></td>
<td class="faint">copy</td>
<td class="num">{{ if .Pages }}{{ .Pages }}{{ end }}</td>
<td><a href="{{ .PDFURL }}" target="_blank" rel="noopener"><code>{{ .PDFFile }}</code></a></td>
<td class="num">{{ .Size }}</td>
<td>{{ if .SHA }}<code class="checksum">{{ .SHA }}</code>{{ else }}<span class="faint">-</span>{{ end }}</td>
</tr>
{{ end }}
{{ else }}
<tr><td colspan="6" class="muted">No documents.</td></tr>
{{ end }}{{ end }}