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

single.html « _default « layouts - github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f0e03e8f119c6a64b91d70f8f25513546215f86 (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
{{- define "main" }}
<div class="post">
<article>
{{- 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="author">
{{- if eq .Site.Params.listAuthor true}}
{{- if isset .Params "author" }}
<p>{{ if isset .Params "authorlink" }}{{ i18n "authorpretext" }} <a href="{{ relURL .Params.authorlink }}" target="_blank" rel="noopener noreferrer">{{ .Params.author }}</a>{{- else }}{{ i18n "authorpretext" }} {{ .Params.author }}{{ end }}</p>
{{- end }}
{{- end }}
</div>
<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 }}
<div class="matter">
<h1 class="title">{{ .Title }}</h1>
</div>
</div>
<div class="markdown">
{{ .Content }}
</div>
{{- if ne (in .Site.Params.disableTaxoTypes .Type) true }}
{{- $pagename := .Page.Title }}
{{- $notaxo := .Params.notaxonomy }}
{{- range $taxonomyname, $taxonomy := .Site.Taxonomies }}
{{- with index $.Params $taxonomyname }}
{{- with ($.Site.GetPage (printf "/%s" $taxonomyname)) }}
{{- if in $notaxo $taxonomyname }}
{{- else }}
<div class="tags">
<div class="taxosfloating_left">
<p>{{ $taxonomyname | humanize }}</p>
</div>
<div class="termsfloating_right">
<p>
{{- range $key, $value := $taxonomy -}}
{{- range $value.Pages }}
{{- if eq .LinkTitle $pagename }}
<a href="{{ relURL $taxonomyname }}/{{ $key }}/">{{ $key }}</a>
{{- end }}
{{- end }}
{{- end }}
</p>
</div>
<div class="clearit"></div>
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end }}
</div>
{{- 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 }}
</article>
</div>
{{- end }}