PaperModX/layouts/newsletter/section.html

48 lines
1.3 KiB
HTML
Raw Normal View History

{{/* section is AKA list */}}
{{- define "main" }}
<div class="main-icon"></div>
<div class="content">
2022-09-07 19:35:11 +01:00
<h1>{{ .Title }}</h1>
{{ with .Param "subtitle" }}<div class="subtitle">{{ . }}</div>{{ end }}
<div class="first-entry">
<section class="entry-content">{{ .Description | markdownify }}</section>
2022-09-07 09:49:18 +01:00
{{- partial "newsletter_sub_form.html"}}
</div>
2022-09-07 15:51:34 +01:00
<h2>最近更新</h2>
2022-09-07 15:29:52 +01:00
<div class="list">
{{- range first 5 (where .Pages "Params.hidden" "!=" true) }}
2022-09-07 15:29:52 +01:00
<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 }}
2022-09-07 15:29:52 +01:00
</div>
2022-09-07 15:51:34 +01:00
<h2>相关链接</h2>
2022-09-07 17:47:08 +01:00
<div class="inline-links">
2022-09-07 15:29:52 +01:00
{{- with .Param "archivesSlug" }}
2022-09-07 17:47:08 +01:00
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
2022-09-07 15:29:52 +01:00
{{- end }}
2022-09-07 17:47:08 +01:00
{{ with .OutputFormats.Get "rss" -}}
<a href="{{ .Permalink }}" target="_blank">RSS</a>
{{ end -}}
</div>
</div>
{{ end }}