first commit
This commit is contained in:
commit
8c4dcae475
89 changed files with 24623 additions and 0 deletions
40
templates/pages.html
Normal file
40
templates/pages.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{{ define "title" }}Pages - {{ .Doc.Title }}{{ with .Version }} ({{ .Slug }}){{ end }} - Snowden Archive{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<header class="list-header">
|
||||
<p class="crumb">{{ with .Version }}<a href="/doc/{{ $.Doc.ID }}/versions/{{ .Slug }}">← {{ $.Doc.Title }} (copy: {{ .Slug }})</a>{{ else }}<a href="/doc/{{ .Doc.ID }}">← {{ .Doc.Title }}</a>{{ end }}</p>
|
||||
<h1>All pages <small class="count-note">{{ len .Images }} page{{ if ne (len .Images) 1 }}s{{ end }}</small></h1>
|
||||
{{ with .Version }}{{ if .ChangedPages }}<p class="changed-pages-note">Pages that differ from the main document: {{ template "changed-page-links" . }}</p>{{ end }}{{ end }}
|
||||
</header>
|
||||
|
||||
{{ if and .Images .TextOnly }}
|
||||
<p class="muted textonly-note">Text-only mode is on - page images are not loaded. <a href="/preferences">Preferences</a></p>
|
||||
<ul class="page-link-list">
|
||||
{{ $id := .Doc.ID }}
|
||||
{{ range $i, $img := .Images }}
|
||||
<li><a href="{{ $.ImageBase }}{{ pathEscape $img }}" target="_blank" rel="noopener">Page {{ add $i 1 }}</a>{{ if and $.Version ($.Version.PageChanged (add $i 1)) }} <span class="muted">(differs from the main document)</span>{{ end }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else if .Images }}
|
||||
|
||||
<ul class="page-sheet">
|
||||
{{ $id := .Doc.ID }}
|
||||
{{ range $i, $img := .Images }}
|
||||
<li{{ if and $.Version ($.Version.PageChanged (add $i 1)) }} class="page-changed"{{ end }}>
|
||||
<a href="#lb-{{ add $i 1 }}" title="Open page {{ add $i 1 }} full screen">
|
||||
<img src="{{ $.ImageBase }}{{ pathEscape $img }}"{{ $.ImageSize $i }}
|
||||
alt="Page {{ add $i 1 }}" loading="lazy">
|
||||
<span class="page-num faint">{{ add $i 1 }}</span>{{ if and $.Version ($.Version.PageChanged (add $i 1)) }}<span class="page-changed-badge">differs</span>{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ template "lightbox-overlays" . }}
|
||||
|
||||
{{ else }}
|
||||
<p class="muted">This document has no page images.</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ template "base.html" . }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue