39 lines
1.7 KiB
HTML
39 lines
1.7 KiB
HTML
{{ define "title" }}Articles - Snowden Archive{{ end }}
|
|
{{ define "content" }}
|
|
<header class="list-header">
|
|
<h1>Articles
|
|
<small class="count-note">{{ .Total }} articles{{ with .Books }} and {{ . }} book{{ if ne . 1 }}s{{ end }}{{ end }}</small>
|
|
</h1>
|
|
</header>
|
|
<p class="muted tab-desc">
|
|
The news stories, and the few books, these documents were published with, newest first.
|
|
A document covered by several stories appears under each.
|
|
</p>
|
|
|
|
{{ if .Groups }}
|
|
{{ if .GroupsHTML }}{{ .GroupsHTML }}{{ else }}{{ template "article-groups" . }}{{ end }}{{ else }}
|
|
<p class="muted">No articles.</p>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ template "base.html" . }}
|
|
|
|
{{ define "article-groups" }}{{ range .Groups }}
|
|
<section class="article-year">
|
|
<h2>{{ .Year }} <small class="count-note">{{ len .Articles }}</small></h2>
|
|
<ul class="article-list">
|
|
{{ range .Articles }}
|
|
<li class="article-item">
|
|
<span class="article-date faint">{{ if .Date }}{{ .Date }}{{ else }}-{{ end }}</span>
|
|
<span class="article-main">
|
|
<a href="/article/{{ .Key }}" class="article-title">{{ if .Title }}{{ .Title }}{{ else }}<span class="muted">[untitled]</span> {{ .Host }}{{ end }}</a>
|
|
<span class="article-meta muted">
|
|
{{ if .Book }}<span class="article-kind">Book</span> · {{ end }}{{ with .Publisher }}{{ . }}{{ end }}{{ if and .Publisher .Journalists }} · {{ end }}{{ range $i, $j := .Journalists }}{{ if $i }}, {{ end }}{{ $j }}{{ end }}
|
|
· {{ len .DocIDs }} doc{{ if ne (len .DocIDs) 1 }}s{{ end }}
|
|
</span>
|
|
</span>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|