aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts/_default/blog.html
blob: af5affd658cc23e7191efa43249ea7a6002a7e7a (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
{{- define "title" -}}
  {{- .Title -}}
{{- end -}}

{{- define "main" -}}
  <div class='container'>
    {{- $posts := where .Site.RegularPages "Section" "posts" -}}
    {{- range first 10 $posts.ByDate.Reverse -}}
      {{- $date := .Date.Format "January 2, 2006" -}}

      <div class='section is-small'>
        <h2 class='title'>
          {{- .Title -}}
        </h2>

        <h3 class='subtitle'>
          {{- $date -}}

          <a
            href='{{.Permalink}}'
            title='Permanent link to {{.Title}}'
            aria-label='Permanent link to {{.Title}}'
          >
            Link
          </a>
        </h3>

        <div class='content'>
          {{- .Content -}}
        </div><!-- content -->
      </div><!-- section -->
    {{- end -}}

    <a
      href='/archive/'
      class='button is-link'
      title='View archived posts.'
      aria-label='View archived posts.'
    >
      Archived Posts...
    </a>
  </div><!-- container -->
{{- end -}}