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

single.html « _default « layouts - github.com/queensferryme/hugo-theme-texify.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cba61e9549f58b29686193cb2cf4c573dcc5ee78 (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
{{ define "head" }}
<link rel="stylesheet" href='{{ "css/single.css" | absURL }}'>
{{ end }}

{{ define "main" }}
<main id="main" class="post">
  <!-- sections -->
  {{ if ne .Section "post" }}
  <div class="content">
    {{ .Content }}
  </div>
  {{ else }}
  <!-- post -->
  <h1>{{ .Title }}</h1>
  {{ if ne .Params.tags nil }}
  <div>
    <b>Keywords: </b>
    {{ range .Params.tags }}
    <a class="link" href='{{ "tags" | absURL }}/{{ . | urlize }}'>#{{ . }}</a>
    {{ end }}
  </div>
  {{ end }}
  <div class="content">
    {{ if .Site.Params.enableHanEmph }}
    {{ .Content | replaceRE "<strong>(\\p{Han}+?)</strong>" "<strong class=chinese>$1</strong>" | safeHTML }}
    {{ else }}
    {{ .Content }}
    {{ end }}
  </div>
  <div class="paginator">
    {{ if .PrevInSection }}
    <a class="link" href="{{ .PrevInSection.Permalink }}">← prev</a>
    {{ else }}
    <a></a>
    {{ end }}
    {{ if .NextInSection }}
    <a class="link" href="{{ .NextInSection.Permalink }}">next →</a>
    {{ else }}
    <a></a>
    {{ end }}
  </div>
  <div class="comment">
    <!-- disqus -->
    {{ template "_internal/disqus.html" . }}
    <!-- utterances -->
    {{ if .Site.Params.utterances.enable }}
    <script src="https://utteranc.es/client.js" repo="{{ .Site.Params.utterances.repo }}"
      issue-term="{{ .Site.Params.utterances.issue_term }}" label="{{ .Site.Params.utterances.label }}"
      theme="{{ .Site.Params.utterances.theme }}" crossorigin="anonymous" async>
      </script>
    {{ end }}
  </div>
  {{ end }}
</main>
{{ end }}