summaryrefslogtreecommitdiff
path: root/layouts/newsletter/section.html
blob: aadfcb39c4ef61a40d89ff3672b9233e9a64c6f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{{/* 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>Latest Issues</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>Links</h2>

  {{- partial "inline_links.html" . -}}
</div>
{{ end }}