Welcome to mirror list, hosted at ThFree Co, Russian Federation.

homepage.html « partials « layouts - github.com/htdvisser/hugo-base16-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dafb30351015e9e7467404dda480eb8813fea255 (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
{{ $baseurl := .Site.BaseURL }}
<main role="main" class="homepage">

  {{ partial "hero.html" . }}

  <h1 class="headline">Recent Posts</h1>

  {{ $paginator := .Paginate (where .Data.Pages "Section" "post") (or .Site.Params.paginate 3) }}
  <div class="article-list">
    {{ range $paginator.Pages }}
      {{ partial "article-list-item.html" . }}
    {{ end }}
  </div>

  {{ partial "paginator.html" $paginator }}

{{ with .Site.Taxonomies.categories }}

  <h1 class="headline">Categories</h1>

  <section class="categories">
    {{ range $name, $value := . }}
    <h2 class="category">
      <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ humanize $name | title }}</a>
      <small>({{ .Count }})</small>
    </h2>
    {{ end }}
  </section>

{{ end }}

{{ with .Site.Taxonomies.tags }}

  <h1 class="headline">Tags</h1>

  <section class="tags">
    {{ range $name, $value := . }}
    <span class="tag">
      <a href="{{ $baseurl }}tags/{{ $name | urlize }}">{{ $name }}</a>
      <small>({{ .Count }})</small>
    </span>
    {{ end }}
  </section>

{{ end }}

</main>