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

home.html « layouts - github.com/gundamew/hugo-bingo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aefe2417d397abf2316e40cbcdd0307f7f51cd2a (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
{{ define "main" }}
<main id="home">
    <div>
        <div class="avatar">
            <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar">
        </div>
        <div id="content">
            {{ .Content }}
            <div class="social-media">
                {{ range sort .Site.Params.social "weight" }}
                    <a class="link" href="{{ .url }}">
                        {{ $path := printf "social-icons/%s.svg" .name }}
                        {{ partial $path (dict "class" "social-media-icon") }}
                    </a>
                {{ end }}
            </div>
        </div>
    </div>

    <div id="recent-posts">
        <h2>{{ i18n "recent_posts" }}</h2>
        <ul>
            {{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections).ByPublishDate.Reverse }}
                <li>
                    <span>{{- partial "date.html" . -}}</span>
                    <a href="{{ .Permalink }}">{{ .Title }}</a>
                </li>
            {{ end }}
        </ul>
    </div>
</main>
{{ end }}