From ce0c0273046beaa79c0a6405fbaeefe448038ed7 Mon Sep 17 00:00:00 2001 From: Reorx Date: Wed, 7 Sep 2022 22:29:52 +0800 Subject: styling newsletter section list --- layouts/newsletter/section.html | 73 ++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 49 deletions(-) (limited to 'layouts') diff --git a/layouts/newsletter/section.html b/layouts/newsletter/section.html index 2863335..486aa8d 100644 --- a/layouts/newsletter/section.html +++ b/layouts/newsletter/section.html @@ -7,6 +7,7 @@

{{ .Title }}

+ {{ with .Param "subtitle" }}
{{ . }}
{{ end }}
{{ .Description | markdownify }}
{{- partial "newsletter_sub_form.html"}} @@ -14,60 +15,34 @@ {{- $pages := where .Pages "Params.hidden" "!=" true }} - {{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}} - {{ $paginator := "" }} - {{ if (.Param "paginate") }} - {{- $paginator = .Paginate $pages (.Param "paginate") }} - {{ else }} - {{- $paginator = .Paginate $pages }} - {{ end }} - - {{- range $index, $page := $paginator.Pages }} -
-
-

- {{- .Title }} - {{- if .Draft }}  [Draft]{{- end }} - {{- if .Weight }}  [Pinned]{{- end }} -

-
- {{- if (ne (.Param "hideSummary") true) }} -
- {{ if .Description }} -

{{ .Description | plainify | htmlUnescape }}

- {{ else }} -

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

- {{ end }} -
- {{- end }} - {{- if not (.Param "hideMeta") }} -
- {{- partial "post_meta.html" . -}} -
- {{- end }} - -
- {{- end }} - - {{- if gt $paginator.TotalPages 1 }} - +
+ {{- range first 5 $pages }} +
+
+ {{- if not .Date.IsZero -}} + {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} + {{- end }} +
+ +
{{ with .Param "issueno" }}#{{ . }}{{ end }}
+
{{- end }} +
- {{- with .Param "archivesSlug" }}
- Archives + {{- with .Param "archivesSlug" }} + Archives + {{- end }} + {{- with .Param "rssUrl" }} + RSS + {{- end }}
- {{- end }}
{{ end }} -- cgit v1.2.3