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

blog.html « home « partials « layouts - github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0582a203399fb0c878f9a333276e46bee2430490 (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
{{ with .Site.GetPage "/blog" }}
<div class="section" id="{{ .Title | urlize }}">
    <!-- Begin Blog container -->
    <div class="container">
        {{ if .Site.Params.home.showLatest | default true }}
        <h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2>
            {{ range first 1 .Pages.ByPublishDate.Reverse }}
            <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
                <h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h3>
                    <div class="markdown">
                    {{ .Summary }}
                    {{ if .Truncated }}
                    <a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a>
                    {{ end }}
                    </div>
            </div>
            {{ end }}
        {{ end }}
        {{ if .Site.Params.home.showAllPosts }}
    </div>
</div>
<div class="section" id="all-posts">
    <div class="container">
        <h2 class="title is-2 has-text-centered top-pad">{{ i18n "index_blog_allPosts" . }}</h2>
            {{ partialCached "blog/li.html" . }}
        {{ else }}
        <div class="container has-text-centered top-pad">
            <a href="{{ .Permalink }}">{{ i18n "index_blog_allPosts" . }}</a>
        </div>
        {{ end }}
    </div>
    <!-- End Blog container -->
    {{ partial "top-icon.html" . }}
</div>
<!-- End Blog section -->
<div class="container"><hr></div>
{{ end }}