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

index.html « _default « layouts - github.com/WingLim/hugo-tania.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b7a9e340edc1e6cd1913349872930bd856b7f4a (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{{ define "main" }}

<div class="container">
    <section class="my">
        <div class="content">
            {{ with .Content }}
            {{ . }}
            {{ end }}
            <div class="bio-social">
                {{ range $name, $path := $.Param "socialOptions" }}
                {{ if (and $path (ne $name "email")) }}
                <a href="{{ $path | safeURL }}" target="_blank" rel="noreferrer" title="{{ $name }}"
                    aria-label="{{ $name }}">
                    {{ partial (print "svgs/social/" $name ".svg") (dict "width" 25 "height" 25) }}
                </a>
                {{ end }}
                {{ if (and $path (eq $name "email")) }}
                <a href="mailto:{{ $path | safeURL }}" target="_blank" rel="noreferrer" title="{{ $path }}"
                    aria-label="{{ $name }}">
                    {{ partial (print "svgs/social/" $name ".svg") (dict "width" 25 "height" 25) }}
                </a>
                {{ end }}
                {{ end }}
            </div>
        </div>
    </section>
</div>

{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $projects := where .Site.RegularPages "Section" "projects" }}
{{ $pages = .Paginate ($pages)  }}

<div class="container">
    <section>
        <h2>
            Latest Articles
            <a class="section-button" href="/articles">View all</a>
        </h2>
        <div class="posts">
            {{ range $pages.Pages }}
            <div class="post">
                <a href="{{ .RelPermalink }}">
                    <div class="post-row">
                        <time>{{ .Date.Format "Jan 02" }}</time>
                        <h3>{{ .Title }}</h3>
                    </div>
                    <!--<div class="new-post">New!</div>-->
                </a>
            </div>
            {{ end }}
        </div>
    </section>
    {{ if gt (len $projects) 0}}
    <section>
        <h2>Projects</h2>
        <div class="projects">
            {{ range $projects.ByWeight }}
            <div class="project">
                <div>
                    <a href="{{ .Params.link }}" target="_blank" rel="noreferrer">
                        <div class="icon">{{ .Params.icon }}</div>
                        <h3>{{ .Title }}</h3>
                    </a>
                    <div class="description">{{ .Params.description }}</div>
                </div>
                <div class="flex">
                    <a href="{{ .Params.repo }}" class="button" target="_blank" rel="noreferrer">Source</a>
                </div>
            </div>
            {{ end }}
        </div>
    </section>
    {{ end }}
</div>

{{ end }}