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

category.html « indexes « layouts - github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d928c2f9aed61c1727123b4b7fd867ba25edcdf9 (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

<!-- category page -->

{{ partial "header.html" . }}

<div id="main">
  <div id="content">
    <div>
      <article role="article">
        <header>
          <h1 class="entry-title">
            {{ .Data.Singular | title }}: {{ .Title }}
          </h1>
        </header>
        <div id="blog-archives" class="category">
          {{ range .Data.Pages }}
          <h2>
            {{ .Date | dateFormat "2006"}}
          </h2>
          <article>
            <h1>
              <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
            </h1>
            <time>
              <span class="month">{{ .Date | dateFormat "Jan" }}</span>
              <span class="day">{{ .Date | dateFormat "2" }}</span>
            </time>
            <footer>
              <span class="categories"> <!-- show tags -->
                tags:
                <!-- although tags had no issues with isset (it is alwaus lowercase) I switched it to with anyways.
                     However, .Params.tags is not visible inside so I had to use scratch -->
                {{ $.Scratch.Set "tags" .Params.tags }}
                {{ with .Params.categories }}
                {{ range ($.Scratch.Get "tags") }} <a class="category" href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
                {{ end }}
              </span>
            </footer>
          </article>
          {{ end }}
        </div>
      </article>
    </div>

    {{ partial "sidebar.html" . }}
  </div>
</div>

{{ partial "footer.html" . }}