first commit
This commit is contained in:
commit
8c4dcae475
89 changed files with 24623 additions and 0 deletions
59
templates/category.html
Normal file
59
templates/category.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{{ define "title" }}Browse by {{ .Title }} - Snowden Archive{{ end }}
|
||||
{{ define "content" }}
|
||||
|
||||
<h1>Browse by {{ .Title }}</h1>
|
||||
|
||||
{{ with .Blurb }}<p class="tab-desc cat-blurb">{{ . }}</p>{{ end }}
|
||||
|
||||
{{ if .SeeAlso }}
|
||||
<p class="muted see-also">See also: {{ range $i, $l := .SeeAlso }}{{ if $i }} · {{ end }}<a href="{{ $l.URL }}">{{ $l.Text }}</a>{{ end }}.</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if .ShowAZ }}
|
||||
<nav class="az-nav" aria-label="Jump to letter">
|
||||
<span class="az-label">Jump to:</span>
|
||||
{{ range .Letters }}<a href="#{{ azID . }}">{{ . }}</a>{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
{{ if .CollCols }}
|
||||
<input type="checkbox" id="coll-cols" class="coll-cols-checkbox"{{ if .ShowCollCols }} checked{{ end }}>
|
||||
<label for="coll-cols" class="coll-cols-label">
|
||||
<span class="collapsed-text">[+] Show per-type counts</span>
|
||||
<span class="expanded-text">[−] Hide per-type counts</span>
|
||||
<span class="sr-only">Toggle the per-type count columns</span>
|
||||
</label>
|
||||
{{ end }}
|
||||
<div class="table-scroll">
|
||||
<table class="cat-table cat-table-colls">
|
||||
<thead>
|
||||
<tr>{{ range .Heads }}{{ template "sort-th" . }}{{ end }}</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ if .RowsHTML }}{{ .RowsHTML }}{{ else }}{{ template "category-rows" . }}{{ end }} </tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ template "base.html" . }}
|
||||
|
||||
{{ define "category-row" }}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ .URL }}">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{- with .Note }} <small class="muted cat-note">{{ . }}</small>{{ end }}
|
||||
</td>
|
||||
<td class="num-col">{{ .Count }}</td>
|
||||
<td class="num-col coll-col">{{ if .News }}{{ .News }}{{ else }}<span class="faint">-</span>{{ end }}</td>
|
||||
<td class="num-col coll-col">{{ if .Archive }}{{ .Archive }}{{ else }}<span class="faint">-</span>{{ end }}</td>
|
||||
{{- if not .NoFOIA }}
|
||||
<td class="num-col coll-col">{{ if .FOIA }}{{ .FOIA }}{{ else }}<span class="faint">-</span>{{ end }}</td>
|
||||
{{- end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ define "category-az-row" }}
|
||||
<tr class="az-row"><th id="{{ azID . }}" colspan="5">{{ . }}</th></tr>
|
||||
{{ end }}
|
||||
{{ define "category-rows" }}{{ $prevL := "" }}{{ range .Entries }}{{ if $.ShowAZ }}{{ if ne .FirstLetter $prevL }}{{ template "category-az-row" .FirstLetter }}{{ $prevL = .FirstLetter }}{{ end }}{{ end }}{{ template "category-row" . }}{{ end }}{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue