summaryrefslogtreecommitdiffstats
path: root/themes/cocoa/layouts/index.html
blob: 02f5311dc8579be6054606559ea099a53a87c2ce (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
{{ partial "header.html" . }}
<section class="main">
    <div class="container">
        <div class="content">
            {{ if .Content }}
                <div class="markdown">
                    {{ .Content }}
                </div>
            {{ end }}
            {{ $totalpostscount := len (where .Data.Pages "Section" "blog") }}
            {{ $latestpostscount := .Site.Params.latestpostscount | default $totalpostscount }}
            {{ if gt $latestpostscount 0 }}
              <div class="page-heading">{{ i18n "latestPosts" }}</div>
                <ul>
                    {{ range (first $latestpostscount (where .Data.Pages.ByPublishDate "Section" "blog").Reverse) }}
                        {{ partial "li.html" . }}
                    {{ end }}
                    {{ if gt $totalpostscount $latestpostscount }}
                        {{ range where .Site.Menus.main "Identifier" "blog" }}
                            <li class="post-item no-bullet">
                                <a id="see-more" {{ printf "href=%q " .URL | safeHTMLAttr }}><span>See more&hellip;</span></a>
                            </li>
                        {{ end }}
                    {{ end }}
                </ul>
              </div>
            {{ end }}
    </div>
</section>
{{ partial "footer.html" . }}