summaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 50fbc8216088bf0bf7f8c3accc074e9b84e5ac24 (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
{{- /* HOMEPAGE */ -}}
{{- define "main" }}
<div class="homepage">
    <header class="homepage__header">
        <h1 class="homepage__header-title">
            {{ with .Title }}{{ . }}{{ else }}{{ site.Title | default "Welcome to my Blog!" }}{{ end }}
        </h1>
        {{- with site.Params.homepageImage }}
            <img src="{{ . }}" alt="{{ . }}" class="homepage__header-image" />
        {{- end }}
        {{- with .Content }}
            <div class="homepage__header-content">
                {{ . }}
            </div>
        {{- end }}
    </header>

    {{- partial "list/recent-posts.html" (dict 
        "count" 5
        "title" (lang.Translate "posts.recent" | default "Recent Articles")
        "show_view_all" true
        ) 
    -}}
</div>
{{- end }}