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

blogsection.html « partials « layouts - github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc10f7b5ba53f20e798d12e6a8d5ea1d836d193a (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
<div class="container"><!-- Begin Blog container -->

{{ if .Site.Params.showLatest }}
<h2 class="title is-2 has-text-centered">Latest Post</h2>
    {{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
    <div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
        <h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
            <div class="markdown">
            {{ .Summary }}
            {{ if .Truncated }}
            <a href="{{ .RelPermalink }}">...Read More</a>
            {{ end }}
            </div>
    </div>
    {{ end }}
{{ end }}

{{ if .Site.Params.showAllPosts }}
<h2 class="title is-2 has-text-centered top-pad">All Posts</h2>
    <ul>
    {{ range .Data.Pages.ByPublishDate }}
        {{ if eq .Section "blog" }}
            {{ partial "li.html" . }}
        {{ end }}
    {{ end }}
    </ul>
{{ else }}
<div class="container has-text-centered top-pad"><a href="{{ "/blog" | relURL }}">ALL BLOG POSTS</a></div>
{{ end }}

</div><!-- End Blog container -->

<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>