aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts/index.html
blob: 5188e29c238364b9470407034a64d2a9add2d31a (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
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang='{{.Site.LanguageCode}}'>
  {{- partial "head.html" . -}}

  <body>
    {{- partial "header.html" . -}}
    {{- block "main" . }}{{- end }}

    <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'>
          <a
            href='{{.Permalink}}'
            title='Permanent link to {{.Title}}'
            aria-label='Permanent link to {{.Title}}'
          >
            <h2 class='title'>
              {{- .Title -}}
            </h2>
          </a>

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

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

      <div class='section is-small'>
        <a
          href='/archive/'
          class='button is-dark'
          title='View archived posts.'
          aria-label='View archived posts.'
        >
          Archived Posts...
        </a>
      </div><!-- section -->
    </div><!-- container -->

    <div class='content pt-5 pb-5 has-text-white has-background-black has-text-centered'>
      &copy; {{.Site.Params.copyrightStartYear}}-{{now.Format "2006"}} {{.Site.Params.authorName}}
    </div><!-- content -->
  </body>
</html>