aboutsummaryrefslogtreecommitdiff
path: root/themes/simple/layouts/_default/single.html
blob: ffa776f1ce86843d1ec6c4238d371537f1847194 (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
{{ define "main" }}
<main role="main" class="container-blog mx-auto px-6 md:p-0">

  <!-- Single article -->
  <article itemtype="http://schema.org/Article" class="single mb-12">
    <header class="mb-6">
      <h1 itemtype="headline" class="text-4xl font-bold mb-4 leading-1 md:leading-2">{{ .Title }}</h1>

      {{ if in .Type "posts" }}
      <time class="text-gray-400 font-medium text-sm">Published on {{ .Date.Format "Monday Jan 2, 2006" }}</time>
      {{ end }}
    </header>

    <div>
      {{ if ge (len .TableOfContents) 100 }}
      <p class="font-semibold">Table of contents</p>
      <div>{{ .TableOfContents }}</div>
      {{ end }}
    </div>

    <div class="leading-relaxed content">
      {{.Content}}
    </div>
  </article>

  {{ if in .Type "posts" }}
  <hr class="border-2 border-gray-100 mb-10" />
  {{ end }}

  <!-- Comment, contact -->
  {{ if in .Type "posts" }}
  <section class="mb-10">
    {{ partial "comments.html" . }}
  </section>
  {{ end }}

  {{ if in .Type "posts" }}
  <hr class="border-2 border-gray-100 mb-10" />
  {{ end }}

  <!-- Read more -->
  {{ if in .Type "posts" }}
  {{ partial "read-more.html" . }}
  {{ end }}

  {{ if in .Type "posts" }}
  <hr class="border-2 border-gray-100 mb-10">
  {{ end }}

  <!-- Openring -->
  {{ if in .Type "posts" }}
  {{ partial "openring.html" . }}
  {{ end }}

</main>
{{ end }}