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

single.html « _default « layouts - gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e396a741cc4a0eefc2ad3dcf72a83d0e596a66cb (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 "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 }}" />
{{- 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>
        {{ if .TableOfContents }}
        <details>
          <summary>Table des Matières</summary>
          {{- .TableOfContents -}}
        </details>
        {{- end -}}
        {{- .Content -}}
        {{ partial "gallery" . }}
      </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.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 }}