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

index.html « layouts - github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7cccb547fa2238f0b4f26a4c5fa38d770bcf7a8d (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
{{- define "content" -}}
    {{- $params := .Scratch.Get "params" -}}
    {{- $profile := .Site.Params.home.profile -}}
    {{- $posts := .Site.Params.home.posts -}}

    <div class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}>
        {{- /* Profile */ -}}
        {{- if ne $profile.enable false -}}
            {{- partial "home/profile.html" . -}}
        {{- end -}}

        {{- /* Content */ -}}
        {{- if .Content -}}
            <div class="single">
                <div class="content" id="content">
                    {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
                </div>
            </div>
        {{- end -}}

        {{- /* Posts */ -}}
        {{- if ne $posts.enable false | and .Site.RegularPages -}}
            {{- /* Paginate */ -}}
            {{- $pages := where .Site.RegularPages "Type" "posts" -}}
            {{- if .Site.Params.page.hiddenFromHomePage -}}
                {{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
            {{- else -}}
                {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
            {{- end -}}
            {{- with $posts.paginate | default .Site.Params.paginate -}}
                {{- $pages = $.Paginate $pages . -}}
            {{- else -}}
                {{- $pages = .Paginate $pages -}}
            {{- end -}}
            {{- range $pages.Pages -}}
                {{- .Render "summary" -}}
            {{- end -}}
            {{- partial "paginator.html" . -}}
        {{- end -}}
    </div>
{{- end -}}