blob: ea1aecbf2ce931d0382137081c16c4fb68e7565f (
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 "header" }}
<div class="container header-wrapper">
<div class="row">
<div class="col-lg-12">
<div class="header-content">
<h1 class="header-title">{{ .Title }}</h1>
<p class="header-date">
{{- if .Params.authors }}
{{- $last := (sub (len .Params.authors) 1) -}}
{{- i18n "author_by" }}
{{ range $index, $value := .Params.authors -}}
{{- $author := index $.Site.Data.authors $value -}}
{{- $author_lang := index ($author | default $.Site.Data.authors) $.Site.LanguageCode | default $author -}}
{{ $author_lang.name.display | default $value }}{{ if ne $index $last }}, {{ end -}}
{{ end }} /
{{ end }}
{{ .Date.Format (.Site.Params.dateFormatToUse | default "Mon 02 January 2006") -}}
{{ with .Params.categories -}}
{{ $.Scratch.Set "firstcategory" true }}
/ {{ i18n "in_category" }}
{{ range . -}}
{{- $name := . -}}
{{- with $.Site.GetPage "taxonomy" (printf "/categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "/categories/%s" ($name | urlize))) -}}
{{- if not ($.Scratch.Get "firstcategory") -}}
,
{{ else -}}
{{- $.Scratch.Set "firstcategory" false -}}
{{- end -}}
<a href="{{ .Permalink }}">{{ $name }}</a>
{{- end -}}
{{ end }}
</p>
{{ end }}
<div class="header-underline"></div>
{{ with .Params.tags -}}
{{ $.Scratch.Set "firsttag" true }}
<div class="clearfix"></div>
<p class="float-right header-tags">
<i class="fas fa-tags" aria-hidden="true"></i>
{{ range (. | sort) -}}
{{- $name := . -}}
{{- with $.Site.GetPage "taxonomy" (printf "/tags/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "/tags/%s" ($name | urlize))) -}}
{{- if not ($.Scratch.Get "firsttag") -}}
,
{{ else -}}
{{- $.Scratch.Set "firsttag" false -}}
{{- end -}}
<a href="{{ .Permalink }}">{{ $name }}</a>
{{- end -}}
{{ end }}
</p>
{{ end }}
{{ partial "i18nlist.html" . }}
</div>
</div>
</div>
</div>
{{ end }}
{{ define "main" }}
<div class="container content">
{{ .Content }}
{{ if .Site.Params.enableRelated -}}
{{- $related := .Site.RegularPages.Related . | first 5 -}}
{{- with $related }}
<h4>{{ i18n "related" }}</h4>
<dl class="row">
{{ range . }}
<dt class="col-md-3">{{ .Date.Format (.Site.Params.dateFormatToUse | default "Mon 02 January 2006") }}</dt>
<dd class="col-md-9"><a href="{{ .RelPermalink }}">{{ .Title }}</a></dd>
{{ end }}
</dl>
{{ end }}
{{ end }}
{{ if (.Params.showAuthorCard | default .Site.Params.showAuthorCard) }}
{{ range .Params.authors }}
{{ partial "author_card.html" (dict "author" . "context" $) }}
{{ end }}
{{ end }}
{{ partial "comments.html" . }}
</div>
{{ end }}
|