first commit

This commit is contained in:
libroot 2026-11-19 04:40:59 +02:00
commit 8c4dcae475
Signed by: libroot
GPG key ID: 2AC68C029EBE9ACE
89 changed files with 24623 additions and 0 deletions

59
templates/version.html Normal file
View file

@ -0,0 +1,59 @@
{{ define "title" }}{{ .Doc.Title }} ({{ .Version.Slug }}) - Snowden Archive{{ end }}
{{ define "content" }}
<header class="list-header">
<p class="crumb"><a href="/doc/{{ .Doc.ID }}">&larr; {{ .Doc.Title }}</a></p>
<h1>{{ .Doc.Title }} <small class="count-note">copy: {{ .Version.Slug }}</small></h1>
<p class="muted">Another published copy of this document that differs from the one on the
<a href="/doc/{{ .Doc.ID }}">document page</a> - for example less redacted, with extra pages, or a different scan.</p>
</header>
<div class="version-actions">
<a href="{{ .PDFURL }}" target="_blank" rel="noopener" class="doc-top-btn doc-pdf-link">Download this copy (PDF)</a>
{{ with .Version.Images }}<a href="/doc/{{ $.Doc.ID }}/versions/{{ $.Version.Slug }}/pages" class="doc-top-btn">All pages ({{ len . }})</a>{{ end }}
</div>
{{ if .Version.ChangedPages }}
<p class="changed-pages-note">Pages that differ from the main document: {{ template "changed-page-links" .Version }}</p>
{{ end }}
<div class="rule-top pub-block">
{{- range $i, $pub := .Publications }}
<div class="pub-entry{{ if $i }} pub-sep{{ end }}">
<div class="pub-title">
{{- with $pub.Publisher }}{{ . }}{{ else }}Unknown publisher{{ end -}}
{{- with $pub.DatePublished }} <span class="muted">{{ . }}</span>{{ end -}}
</div>
{{- if $pub.Title }}
<div class="pub-people"><em>{{ $pub.Title }}</em>{{ with $pub.Link }} <a href="{{ . }}" target="_blank" rel="noopener" class="pub-original">article &nearr;</a>{{ end }}</div>
{{- else if $pub.Link }}
<div class="pub-people"><a href="{{ $pub.Link }}" target="_blank" rel="noopener" class="pub-original">article &nearr;</a></div>
{{- end }}
{{- with $pub.Note }}
<div class="pub-note">{{ . }}</div>
{{- end }}
{{- if or $pub.DocSource $pub.DocURL }}
<div class="pub-copy muted">
{{- with $pub.DocSource }}<a href="{{ . }}" target="_blank" rel="noopener">document page &nearr;</a>{{ end -}}
{{- with $pub.DocURL }}<a href="{{ . }}" target="_blank" rel="noopener">original PDF &nearr;</a>{{ end -}}
</div>
{{- end }}
</div>
{{- else }}
<p class="muted">No publication record points at this copy.</p>
{{- end }}
</div>
{{ if or .Images .Version.HTMLContent }}
<div class="doc-container">
{{ template "doc-viewport" . }}
</div>
{{ else }}
<p class="muted rule-top">This copy has no transcript and no page images - only the PDF above.</p>
{{ end }}
{{ if and .Images (not .Prefs.TextOnly) }}
{{ template "lightbox-overlays" . }}
{{ end }}
{{ end }}
{{ template "base.html" . }}