blob: a79b08331eb00e19895e593316f8eacce8f89e0f (
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
|
{{ partial "htmlhead" . }}
<body lang='{{ .Site.Language.Lang | default "en-us" }}' class="is-preload">
{{ $postsFoldername := .Site.Params.Posts.foldername | default "post" }}
{{ $postsPageSize := .Site.Params.Posts.pagesize | default 6 }}
{{ .Scratch.Set "postsFeaturedPostEnabled" true }}
{{ if (or (eq .Site.Params.Posts.featuredpost "false") (eq .Site.Params.Posts.featuredpost false)) }}
{{ .Scratch.Set "postsFeaturedPostEnabled" false }}
{{ end }}
{{ $postsFeaturedPostEnabled := .Scratch.Get "postsFeaturedPostEnabled" }}
{{ $posts := where .Data.Pages "Type" $postsFoldername }}
{{ if .IsHome }}
{{ $posts = .Site.RegularPages }}
{{ end }}
{{ $firstPost := first 1 $posts }}
{{ if and (eq $postsFeaturedPostEnabled true) (gt (len $posts) 1) }}
{{ .Scratch.Set "postsForPaging" (after 1 $posts) }}
{{ else }}
{{ .Scratch.Set "postsForPaging" $posts }}
{{ end }}
{{ $postsForPaging := .Scratch.Get "postsForPaging" }}
{{ $postsPaging := .Paginate $postsForPaging $postsPageSize }}
<!-- Wrapper -->
<div id="wrapper" class="fade-in" data-pfn="{{ $postsFoldername }}" data-ps="{{ $postsPageSize }}" data-pfp="{{ $postsFeaturedPostEnabled }}">
{{ if eq $postsPaging.PageNumber 1 }}
{{ partial "intro.html" . }}
{{ end }}
{{ partial "header" . }}
{{ partial "nav" . }}
<!-- Main -->
<div id="main">
{{ if (eq $postsFeaturedPostEnabled true) }}
{{ partial "posts/featured.html" (dict "firstpost" $firstPost "siteData" (index .Site.Data .Site.Language.Lang)) }}
{{ end }}
{{ if (not (and (eq (len $posts) 1) (eq $postsFeaturedPostEnabled true))) }}
{{ partial "posts/list.html" (dict "posts" $postsPaging "siteData" (index .Site.Data .Site.Language.Lang)) }}
{{ end }}
{{ $paginator := .Paginator }}
{{ $outer := . }}
{{ partial "posts/pagination.html" (dict "paginator" $paginator "outer" $outer)}}
</div>
{{ partial "footer/index" . }}
{{ partial "copyright" . }}
<a href="#navPanel" id="navPanelToggle">{{ i18n "NAV_MENU" . }}</a>
</div>
{{ template "_internal/google_analytics.html" . }}
{{ partial "scripts/index" . }}
</body>
</html>
|