snowchive-server/templates/article.html
2026-11-19 04:40:59 +02:00

25 lines
1.5 KiB
HTML

{{ define "title" }}{{ with .Article.Title }}{{ . }}{{ else }}{{ if .Article.Book }}Book{{ else }}Article{{ end }} at {{ .Article.Host }}{{ end }} - Snowden Archive{{ end }}
{{ define "content" }}
<header class="list-header article-header">
<p class="muted article-kicker">{{ if .Article.Book }}Book{{ else }}Article{{ end }}</p>
<h1>{{ if .Article.Title }}{{ .Article.Title }}{{ else }}<span class="muted">[untitled]</span> {{ .Article.Host }}{{ end }}</h1>
<p class="article-byline muted">
{{ with .Article.Publisher }}{{ if $.PublisherURL }}<a href="{{ $.PublisherURL }}" class="meta-link-soft">{{ . }}</a>{{ else }}{{ . }}{{ end }}{{ end }}
{{ with .Article.Date }} &middot; {{ . }}{{ end }}
{{ if .Article.Journalists }} &middot;
{{ facetLinks (dict "Vals" .Article.Journalists "Cat" "journalist" "Class" "meta-link-soft" "QS" .BrowseQS) }}
{{ end }}
</p>
<p>
<a href="{{ .Article.Link }}" target="_blank" rel="noopener" class="doc-top-btn doc-pdf-link">{{ if .Article.Book }}About the book at{{ else }}Read the article at{{ end }} {{ .Article.Host }} &nearr;</a>
</p>
</header>
<h2>Documents published with this {{ if .Article.Book }}book{{ else }}article{{ end }} <small class="count-note">{{ .Total }}</small></h2>
{{ if .Cards.Docs }}
{{ template "doc-cards" .Cards }}
{{ else }}
<p class="muted">No documents found for this {{ if .Article.Book }}book{{ else }}article{{ end }}.</p>
{{ end }}
{{ end }}
{{ template "base.html" . }}