diff options
| author | Reorx <novoreorx@gmail.com> | 2022-09-08 02:35:11 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-09-08 02:35:11 +0800 |
| commit | 2faf1cc852b794d8d79d1bb7e3ff0e30a4ca4705 (patch) | |
| tree | 5c3de9b238211fd9e3c9e06238a20fa55e111a3a /layouts | |
| parent | edf0ed0258cbfffe9bb4d6231601302d2357d24d (diff) | |
finish newsletter archives
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/newsletter/archives.html | 33 | ||||
| -rw-r--r-- | layouts/newsletter/section.html | 7 |
2 files changed, 36 insertions, 4 deletions
diff --git a/layouts/newsletter/archives.html b/layouts/newsletter/archives.html new file mode 100644 index 0000000..ae19b5a --- /dev/null +++ b/layouts/newsletter/archives.html @@ -0,0 +1,33 @@ +{{- define "main" }} +<div class="main-icon">@</div> + +<div class="content"> + <h1>{{ .Title }}</h1> + {{- partial "newsletter_sub_form.html"}} + + {{/* get pages from the current page's section */}} + {{- $sections := slice .Section }} + {{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }} + + {{/* TODO statistics */}} + <div class="list"> + {{- range $pages }} + <div class="item"> + <div class="date"> + {{- if not .Date.IsZero -}} + {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} + {{- end }} + </div> + <div class="title"> + <a href="{{ .Permalink }}">{{- .Title }} + {{- if .Draft }}<em>[Draft]</em>{{- end }} + {{- if .Weight }}<em>[Pinned]</em>{{- end }} + </a> + </div> + <div class="issueno">{{ with .Param "issueno" }}#{{ . }}{{ end }}</div> + </div> + {{- end }} + </div> + +</div> +{{ end }} diff --git a/layouts/newsletter/section.html b/layouts/newsletter/section.html index 11d52ab..28ac710 100644 --- a/layouts/newsletter/section.html +++ b/layouts/newsletter/section.html @@ -4,11 +4,10 @@ <div class="main-icon">@</div> <div class="content"> + <h1>{{ .Title }}</h1> + {{ with .Param "subtitle" }}<div class="subtitle">{{ . }}</div>{{ end }} + <div class="first-entry"> - <header class="entry-header"> - <h1>{{ .Title }}</h1> - {{ with .Param "subtitle" }}<div class="subtitle">{{ . }}</div>{{ end }} - </header> <section class="entry-content">{{ .Description | markdownify }}</section> {{- partial "newsletter_sub_form.html"}} </div> |
