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

index.html « layouts - github.com/saadnpq/npq-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 416d80b02fddac62175d7c61e955f18d452ed803 (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
53
54
55
{{define "main"}}
    {{if ne .Site.Params.displayRecent false}}
    <div class="section"> 
        <div class="section-title">recent</div> 
        {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
        {{range first (default  4 .Site.Params.recentMax) (where $pages "Section" "ne" .Site.Params.microBlogSection)}}
            <div class="list-item">
                <a class="entry-title" href="{{ .URL }}">{{ .Title }}</a>
                {{$page := .}}
                {{with .Description}}
                <p>{{.}}</p>
                {{end}}
                <div class="meta">
                {{with .Date}}
                    <i class="far fa-calendar-alt"></i> {{.Format "Jan 2 2006"}}
                {{end}}
                <br>
                {{with .Params.tags}}
                        <i class="fas fa-tags"></i> 
                        Tags: {{ delimit . ", " }}
                {{end}}
                </div>
            </div>
        {{end}}
        </div>
    {{end}}

    {{if .Site.Params.displayMicroBlog}}
    <div class="section"> 
        <div class="section-title">μblog</div> 
        <div class="posts">
            {{ range where (where site.RegularPages "Type" "in" site.Params.microBlogSection) "Params.pinned" true }}
                <div class="post">
                    <div class="meta pinned"> <i class="fas fa-thumbtack"></i> pinned </div>
                    <div class="post-content">
                        {{.Content}}
                    </div>
                    <div class="meta post-footer"> <span>{{.Date.Format "Jan 2 2006 03:04 UTC-07"}}</span> <a href="{{.URL}}"><i class="fas fa-link"></i> link</a></div> 
                </div>
            {{ end }} 
            {{ range where (where site.RegularPages "Type" "in" site.Params.microBlogSection) "Params.pinned" "ne" true}}
                <div class="post">
                    {{if ne .Params.pinned nil}}
                        <div class="meta pinned"> <i class="fas fa-thumbtack"></i> pinned </div>
                    {{end}}
                    <div class="post-content">
                        {{.Content}}
                    </div>
                    <div class="meta post-footer"> <span>{{.Date.Format "Jan 2 2006 03:04 UTC-07"}}</span> <a href="{{.URL}}"><i class="fas fa-link"></i> link</a></div> 
                </div>
            {{ end }} 
        </div>
    </div>
    {{end}}
{{end }}