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

index.html « layouts - github.com/gkmngrgn/hugo-alageek-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b21fd04be9531f841f32c40e1d4e23fd6e2bc8b1 (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
52
{{ define "main" }}
  {{ partial "header" . }}

  <div class="content">
    <div class="container">
      <div class="row justify-content-center">
        <div class="col-md-12 col-lg-10">
          <div class="markdown">
            {{ partial "content" . }}
          </div>

          {{ if isset .Site.Params "best_posts" }}
            <div class="mx-0 mx-md-4 best-posts">
              <div class="page-heading">📌 {{ i18n "pinned" }}</div>
              <ul>
                {{ range .Site.Params.best_posts }}
                  <li>
                    <a href="{{ .url }}">{{ .title }}</a>
                  </li>
                {{ end }}
              </ul>
            </div>
          {{ end }}

          {{ if isset .Site.Params "latestpostcount" }}
            <div class="mx-0 mx-md-4 posts">
              {{ $nbPosts := len (where .Site.RegularPages "Section" "blog") }}

              {{ if gt $nbPosts 0 }}
                <div class="page-heading">{{ i18n "latest_posts" }}</div>
                <ul class="px-0">
                  {{ range (first .Site.Params.latestpostcount (where .Site.RegularPages "Section" "blog")).GroupByDate "Jan, 2006" "desc" }}
                    <li class="groupby">{{ .Key }}</li>
                    {{ range sort .Pages "Date" "desc" }}
                      {{ partial "list" . }}
                    {{ end }}
                  {{ end }}
                </ul>

                {{ if gt $nbPosts .Site.Params.latestpostcount }}
                  <a href="./blog/" class="font-italic mt-4 see-more">{{ i18n "see_more" }}</a>
                {{ end }}
              {{ end }}
            </div>
          {{ end }}
        </div>
      </div>
    </div>
  </div>

  {{ partial "footer" . }}
{{ end }}