PaperModX/layouts/newsletter/section.html
Reorx 886aafac1f inline_links partial
finally find a way to determine whether a section/term page has archives or not
by conquering hugo's faultiness of .RelPermalink
2022-09-08 23:36:35 +08:00

44 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{/* section is AKA list */}}
{{- define "main" }}
<div class="main-icon"></div>
<div class="content">
<h1>{{ .Title }}</h1>
{{ with .Param "subtitle" }}<div class="subtitle">{{ . }}</div>{{ end }}
<div class="first-entry">
<section class="entry-content">{{ .Description | markdownify }}</section>
{{- partial "newsletter_sub_form.html"}}
</div>
{{ $pages := where .Pages "Params.hidden" "!=" true }}
{{ if $pages }}
<h2>最新通讯</h2>
<div class="list">
{{- range first 5 $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>
{{ end }}
<h2>相关链接</h2>
{{- partial "inline_links.html" . -}}
</div>
{{ end }}