blob: 7235d832db85d1e307a820a713dcd78cbdddcc10 (
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
{{- define "css" -}}
{{- with .Resources.Match "images/lightbox/*.*" -}}
<link rel="stylesheet" href="/css/baguetteBox.min.css" />
{{- end -}}
{{- with .Resources.Match "images/gallery/*.*" -}}
<link rel="stylesheet" href="/css/baguetteBox.min.css" />
{{- end }}
{{ $pygmcss := resources.Get "css/pygments.css" }}
{{ $pygments := $pygmcss | resources.Minify }}
<link rel="stylesheet" href="{{ $pygments.Permalink }}" />
{{- if .Site.Params.staticman -}}
{{ $smcss := resources.Get "css/staticman.css" }}
{{ $staticman := $smcss | resources.Minify }}
<link rel="stylesheet" href="{{ $staticman.Permalink }}" />
{{- end -}}
{{- end -}}
{{- define "title" -}}
{{ .Title }} – {{ .Site.Title }}
{{- end -}}
{{ define "main" }}
<article>
<header>
<h1>
<a href="{{ .Permalink }}">
{{- .Title -}}
</a>
<time datetime="{{ .Date.Format "02 Jan 06 15:04 +01:00" }}">
{{- .Date.Format "02/01/2006" -}}
</time>
</h1>
<div class="meta">
{{ range .Params.categories }}
<a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">
{{- . -}}
</a>
{{- end -}}
{{ range .Params.tags }}
<a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
{{- . -}}
</a>
{{- end -}}
</div>
</header>
{{- with .Params.song -}}
<div class="nowlistening">
{{- . | markdownify -}}
</div>
{{- end -}}
{{ if .TableOfContents }}
<details>
<summary>Table des Matières</summary>
{{- .TableOfContents -}}
</details>
{{- end -}}
{{- .Content -}}
{{- with .Resources.Match "images/gallery/*.*" -}}
{{ partial "gallery" . }}
{{- end }}
</article>
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>Billets en liens :</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if .Site.Params.staticman }}
<script src="{{ "js/jquery.min.js" | relURL }}"></script>
{{ $smjs := resources.Get "js/staticman.js" }}
<script src="{{ $smjs.RelPermalink }}"></script>
{{ partial "staticman-comments.html" . }}
{{ end }}
{{ if .Site.Params.comments }}
<script defer data-isso="{{ .Site.Params.isso_server }}"
src="{{ .Site.Params.isso_server }}/js/embed.min.js"
async >
</script>
<section id="isso-thread"></section>
{{ end }}
{{ end }}
{{- define "scripts" -}}
{{- with .Resources.Match "images/lightbox/*.*" -}}
<script src="{{ "js/baguetteBox.min.js" | relURL }}"></script>
<script>baguetteBox.run('figure', {
captions: function(element) {
return element.getElementsByTagName('img')[0].alt;
}});</script>
{{- end -}}
{{- with .Resources.Match "images/gallery/*.*" -}}
<script src="{{ "js/baguetteBox.min.js" | relURL }}"></script>
<script>baguetteBox.run('.gallery', {
captions: function(element) {
return element.getElementsByTagName('img')[0].alt;
}});</script>
{{- end -}}
{{ end }}
|