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

39
templates/articles.html Normal file
View file

@ -0,0 +1,39 @@
{{ 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> &middot; {{ end }}{{ with .Publisher }}{{ . }}{{ end }}{{ if and .Publisher .Journalists }} &middot; {{ end }}{{ range $i, $j := .Journalists }}{{ if $i }}, {{ end }}{{ $j }}{{ end }}
&middot; {{ len .DocIDs }} doc{{ if ne (len .DocIDs) 1 }}s{{ end }}
</span>
</span>
</li>
{{ end }}
</ul>
</section>
{{ end }}
{{ end }}