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

index.html « layouts - github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 66e5ae82a56c195595a2bc81c71700d1284466b8 (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
77
78
79
80
81
82
83
{{- define "main" }}
{{ if eq .Site.Params.homepage true }}
{{ with .Site.GetPage "/homepage.md" }}
<div class="post">
{{- if isset .Params "images" }}
<div class="post-image">
<img src="{{ index .Params.images 0 | relURL }}" {{ if isset .Params "imagetext" }}alt="{{ .Params.imagetext }}"{{ end }}>
</div>
{{- end }}
<div class="post-header">
{{- if ne .Date.Year 1 }}
<div class="meta">
{{- if not .Params.nodate }}
<div class="date">
<span class="day">{{ dateFormat "02" .Date }}</span>
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span>
</div>
{{- end }}
</div>
{{- end }}
<article>
<div class="matter">
<h1 class="title">{{ .Title }}</h1>
{{- if not .Params.hidemeta }}
<p class="post-meta">
{{ partial "post_meta.html" . }}
</p>
{{- end }}
</div>
</div>
<div class="markdown">
{{ .Content }}
</div>
</article>
{{- if eq .Site.Params.comments.enabled true }}
{{- $.Scratch.Set "comments" true }}
{{- if and (isset .Params "type") (in .Site.Params.comments.disableOnTypes .Params.type) }}
{{- $.Scratch.Set "comments" false }}
{{- end }}
{{- if and (isset .Params "commentable") (eq .Params.commentable false) }}
{{- $.Scratch.Set "comments" false -}}
{{- else if and (isset .Params "commentable") (eq .Params.commentable true) }}
{{- $.Scratch.Set "comments" true }}
{{- end }}
{{- if eq ($.Scratch.Get "comments") true }}
{{- partial "comments.html" . }}
{{- end }}
{{- end }}
</div>
{{- end }}
{{- else }}
<div class="recent-posts">
<div class="posts">
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{- $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }}
{{- range $paginator.Pages }}
<div class="post">
<div class="post-header">
<div class="meta">
<div class="date">
<span class="day">{{ dateFormat "02" .Date }}</span>
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span>
</div>
</div>
<div class="matter">
<article>
<h3 class="title small"><a href="{{ .RelPermalink }}">{{.Title}}{{partial "post_label.html" (dict "post" .)}}</a></h3>
{{- if not .Params.hidemeta }}
<p class="post-meta">
{{ partial "post_meta.html" . }}
</p>
{{- end }}
<span class="description">{{ if isset .Params "description" }}{{ .Description }}{{ else }}{{ .Plain | htmlUnescape | safeHTML | truncate 140 }}{{ end }}</span>
</article>
</div>
</div>
</div>
{{- end }}
{{- partial "paginator.html" . }}
</div>
</div>
{{- end }}
{{- end }}