49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
{{/* section is AKA list */}}
|
||
|
||
{{- define "main" }}
|
||
<div class="main-icon">@</div>
|
||
|
||
<div class="content">
|
||
<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>
|
||
|
||
<h2>最近更新</h2>
|
||
|
||
<div class="list">
|
||
{{- range first 5 (where .Pages "Params.hidden" "!=" true) }}
|
||
<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>
|
||
|
||
<h2>相关链接</h2>
|
||
<div>
|
||
{{- with .Param "archivesSlug" }}
|
||
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a> •
|
||
{{- end }}
|
||
{{- with .Param "rssUrl" }}
|
||
<a href="{{ site.BaseURL }}{{ . }}">RSS</a>
|
||
{{- end }}
|
||
</div>
|
||
|
||
</div>
|
||
{{ end }}
|