summaryrefslogtreecommitdiff
path: root/layouts/posts/page.html
blob: d5506f01d45933c6108aef61de35d918727b97e3 (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
{{ define "main" }}
    <article class="post" id="article">
      <!-- Post Header -->
      <header
        style="view-transition-name: post-{{ .File.UniqueID }}"
        class="mb-8 relative"
      >
        {{ if .Params.banner }}
            {{ partial "components/logo" (dict
                "class" "block round-sticker w-14 h-14 lg:w-28 lg:h-28 right-2 lg:-right-20 top-2 lg:top-4 absolute rotate-[3.0deg]"
                "imageClass" "block w-full"
            ) }}
        {{ else }}
            {{ partial "components/logo" (dict
                "class" "block w-[10rem]"
                "imageClass" "block w-full"
            ) }}
        {{ end }}

        {{ partial "posts/banner" . }}
        <!-- Title and Subtitle -->
        <h1 class="text-size-3xl font-900 xerox">
          <span data-pagefind-meta="title">{{ .Title }}</span>
          {{ with .Params.subtitle }}
            <small class="block font-secondary font-italic text-size-xl">{{ . }}</small>
          {{ end }}
        </h1>
        <!-- Post Meta -->
        <div class="flex flex-wrap items-center gap-2">
            <span class="font-secondary">{{ partial "components/date" . }}</span>
            {{ if or .Params.categories .Params.tags }}<span>·</span>{{ end }}
            {{ partial "components/category-pill" . }}
            {{ partial "components/tags" . }}
        </div>
      </header>

      <!-- Post Content -->
      <div class="min-h-[60%] leading-loose mb-8 markdown-body"
          style="view-transition-name: post-content-{{ .File.UniqueID }}">
        <!-- TOC -->
        {{ partial "posts/toc" . }}
        <!-- Content -->
        <div id="post-content">
            {{ .Content }}
        </div>
        <!-- Endnotes -->
        {{ partial "posts/endnotes" . }}
      </div>

      {{ partial "posts/action-menu.html" . }}
      {{ partial "posts/now-read-this.html" . }}
    </article>
{{ end }}