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

list.html « _default « layouts - github.com/RainerChiang/simpleness.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 902ebafe00f37edc24c514532b9748749e95e411 (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
{{ define "main" }}

{{ $Pages := .Pages }}

{{ $home := .IsHome }}
{{ if .IsHome }}
  {{ $Pages = where site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ end }}

<article class="archive">
  <header style="text-align: center;">
    {{ if .IsHome }}
      {{ if .Site.Params.Slogan }}
      <div class="slogan">
        {{ .Site.Params.Slogan }}
      </div>
      {{ end }}
    {{ else }}
    <h1>
      {{ .Title }}
    </h1>
    {{ end }}
  </header>

  <div class="post-list">
  {{ range $Pages.GroupByDate "2006" }}
    <h2 class="year">{{ .Key }}</h2>

    {{ range .Pages.GroupByDate "January"}}
    {{ if $home }}<h3 class="month">{{ .Key }}</h3>{{ end }}
    <ul class="post-item">
    <!-- .Pages in $Pages -->
    {{ range .Pages }}
      <li>
      {{ if .Date }}
        <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
      {{ end }}
        <a href="{{ .Permalink }}">{{ .Title }}</a>
         <!-- range .Params.categories 
          >> <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" padding-left: auto;><strong>{{ . }}</strong></a>
         end  -->
      </li>
      {{ end }}
    </ul>
    {{ end }}
    
  {{ end }}
  </div>
</article>

{{ end }}