2020-08-05 17:14:10 +00:00
|
|
|
{{ define "title" }}
|
2021-08-04 21:26:38 +00:00
|
|
|
<title>{{ with .Data.Title }}{{ mdtitle . }} - {{ end }}{{ mdtitle .Blog.Title }}</title>
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS{{ with .Data.Title }} ({{ mdtitle . }}){{ end }}" href="{{ .Data.First }}.rss"/>
|
|
|
|
<link rel="alternate" type="application/atom+xml" title="Atom{{ with .Data.Title }} ({{ mdtitle . }}){{ end }}" href="{{ .Data.First }}.atom"/>
|
|
|
|
<link rel="alternate" type="application/feed+json" title="JSON Feed{{ with .Data.Title }} ({{ mdtitle . }}){{ end }}" href="{{ .Data.First }}.json"/>
|
2020-08-05 17:14:10 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
2020-12-23 16:42:12 +00:00
|
|
|
<main class="h-feed">
|
2021-08-04 21:26:38 +00:00
|
|
|
{{ with .Data.Title }}<h1 class="p-name">{{ mdtitle . }}</h1>{{ end }}
|
2020-10-12 16:47:23 +00:00
|
|
|
{{ with .Data.Description }}{{ md . }}{{ end }}
|
|
|
|
{{ if (or .Data.Title .Data.Description) }}
|
2020-09-02 15:56:18 +00:00
|
|
|
<hr>
|
|
|
|
{{ end }}
|
2021-03-08 17:14:52 +00:00
|
|
|
{{ if .Data.Posts }}
|
|
|
|
{{ $summaryTemplate := .Data.SummaryTemplate }}
|
2021-03-10 18:21:23 +00:00
|
|
|
{{ $rd := . }}
|
2021-03-08 17:14:52 +00:00
|
|
|
{{ range $i, $post := .Data.Posts }}
|
2021-03-10 18:21:23 +00:00
|
|
|
{{ include $summaryTemplate $rd $post }}
|
2021-03-08 17:14:52 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
<p>{{ string .Blog.Lang "noposts" }}</p>
|
2020-08-05 17:54:04 +00:00
|
|
|
{{ end }}
|
2020-10-12 16:47:23 +00:00
|
|
|
{{ if .Data.HasPrev }}
|
2020-10-12 17:12:43 +00:00
|
|
|
<p><a href="{{ .Data.Prev }}">{{ string .Blog.Lang "prev" }}</a></p>
|
2020-08-05 17:54:04 +00:00
|
|
|
{{ end }}
|
2020-10-12 16:47:23 +00:00
|
|
|
{{ if .Data.HasNext }}
|
2020-10-12 17:12:43 +00:00
|
|
|
<p><a href="{{ .Data.Next }}">{{ string .Blog.Lang "next" }}</a></p>
|
2020-08-05 17:54:04 +00:00
|
|
|
{{ end }}
|
2020-12-23 16:42:12 +00:00
|
|
|
{{ include "author" . }}
|
2020-08-05 17:14:10 +00:00
|
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "index" }}
|
|
|
|
{{ template "base" . }}
|
|
|
|
{{ end }}
|