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

index.html « layouts - gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be75408ac9af65ac6d322252cec98ca58adad4ab (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
{{ define "main" }}

  {{ $pages := where site.RegularPages "Type" "in" .Site.Params.mainSections }}

  <main class="index">
    {{ if .Content }}
      <h1>{{ .Title | emojify }}</h1>
      {{ .Content }}
    {{ else }}
    
      {{ $paginator := .Paginate $pages }}
    
      <h1>{{ T "posts" }}</h1>
      
      <ul class="posts">
       {{ range $paginator.Pages }}
          <li>
            <a class="btn" href="{{ .Permalink }}">
              <p>{{ .LinkTitle | emojify }}</p>
              {{ if not .Date.IsZero }}<time datetime="{{ .Date | dateFormat "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
            </a>
          </li>
        {{ end }}
      </ul>
      
      {{ partial "pagination" . }}
      
    {{ end }}
    
  </main>

{{ end }}