first commit
This commit is contained in:
commit
8c4dcae475
89 changed files with 24623 additions and 0 deletions
60
templates/assembly.html
Normal file
60
templates/assembly.html
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{{ define "title" }}{{ .Assembly.Title }} - Snowden Archive{{ end }}
|
||||
|
||||
{{ define "assembly-credit" }}{{ with .Source }}{{ . }} · {{ end }}<a href="{{ .Path }}">{{ .DocTitle }}</a>{{ with .Version }} (copy: {{ . }}){{ end }}, p. {{ .Page }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $a := .Assembly }}{{ $n := len $a.Slides }}
|
||||
<header class="list-header">
|
||||
<p class="crumb"><a href="/explore/assemblies">← Assemblies</a></p>
|
||||
<h1>{{ $a.Title }} <small class="count-note">{{ $n }} slide{{ if ne $n 1 }}s{{ end }}</small></h1>
|
||||
<p class="muted">Put together by this archive from {{ $a.Copies }} separately published cop{{ if eq $a.Copies 1 }}y{{ else }}ies{{ end }}. This is our arrangement, not a document in its own right.</p>
|
||||
{{ with $a.Note }}<p class="assembly-note">{{ . }}</p>{{ end }}
|
||||
</header>
|
||||
|
||||
{{ if .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">
|
||||
{{ range $a.Slides }}
|
||||
<li><a href="{{ .Image }}" target="_blank" rel="noopener">Slide {{ .Pos }}</a> <span class="muted">{{ template "assembly-credit" . }}</span>
|
||||
{{- with .Note }} <span class="muted">- {{ . }}</span>{{ end }}
|
||||
{{- range .Alts }}<br><a href="{{ .Image }}" target="_blank" rel="noopener">Other copy</a> <span class="muted">{{ template "assembly-credit" . }}</span>{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
<ul class="page-sheet assembly-sheet">
|
||||
{{ range $s := $a.Slides }}
|
||||
<li>
|
||||
<a href="#lb-{{ $s.Pos }}" title="Open slide {{ $s.Pos }} full screen">
|
||||
<img src="{{ $s.Image }}"{{ $s.Size.Attr }} alt="Slide {{ $s.Pos }}" loading="lazy">
|
||||
<span class="page-num faint">{{ $s.Pos }}</span>
|
||||
</a>
|
||||
<p class="assembly-cap">{{ template "assembly-credit" $s }}
|
||||
{{- range $k, $alt := $s.Alts }}<br><a href="#lb-a{{ $s.Pos }}-{{ add $k 1 }}">Other copy{{ with $alt.Source }}: {{ . }}{{ end }}</a>{{ end }}
|
||||
</p>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ range $i, $s := $a.Slides }}
|
||||
<div class="lightbox" id="lb-{{ $s.Pos }}" aria-label="Slide {{ $s.Pos }} of {{ $n }}">
|
||||
<a class="lb-backdrop" href="#lb-closed" tabindex="-1" aria-hidden="true"></a>
|
||||
<a class="lb-close" href="#lb-closed" title="Close">×</a>
|
||||
{{ if $i }}<a class="lb-prev" href="#lb-{{ $i }}" title="Previous slide">‹</a>{{ end }}
|
||||
{{ if lt $s.Pos $n }}<a class="lb-next" href="#lb-{{ add $s.Pos 1 }}" title="Next slide">›</a>{{ end }}
|
||||
<img src="{{ $s.Image }}"{{ $s.Size.Attr }} alt="Slide {{ $s.Pos }} of {{ $n }}" loading="lazy" decoding="async">
|
||||
<span class="lb-counter lb-caption">{{ $s.Pos }} / {{ $n }} · {{ template "assembly-credit" $s }}{{ with $s.Note }} · {{ . }}{{ end }}{{ range $k, $alt := $s.Alts }} · <a href="#lb-a{{ $s.Pos }}-{{ add $k 1 }}">Other copy{{ with $alt.Source }}: {{ . }}{{ end }}</a>{{ end }}</span>
|
||||
</div>
|
||||
{{ range $k, $alt := $s.Alts }}
|
||||
<div class="lightbox lb-alt" id="lb-a{{ $s.Pos }}-{{ add $k 1 }}" aria-label="Other copy of slide {{ $s.Pos }}">
|
||||
<a class="lb-backdrop" href="#lb-closed" tabindex="-1" aria-hidden="true"></a>
|
||||
<a class="lb-close" href="#lb-closed" title="Close">×</a>
|
||||
<img src="{{ $alt.Image }}"{{ $alt.Size.Attr }} alt="Other copy of slide {{ $s.Pos }}" loading="lazy" decoding="async">
|
||||
<span class="lb-counter lb-caption">Other copy of slide {{ $s.Pos }} · {{ template "assembly-credit" $alt }} · <a href="#lb-{{ $s.Pos }}">Back to slide {{ $s.Pos }}</a></span>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ template "base.html" . }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue