summaryrefslogtreecommitdiff
path: root/layouts/view_postblock.html
blob: 3e21be116c38458f25117a64a97f48e4ae932f5a (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
<div class="posts-item w-full mt-2"
    style="view-transition-name: post-{{ .File.UniqueID }}">
    <header class="w-full md:flex md:justify-between">
        <div>
            <p class="font-mono text-secondary">
                <time>{{ .Date.Format "January 2" }},</time>
                <span>in <a href="/{{ .Section }}/">{{ .Section }}</a></span>
            </p>
            <h2 class="xerox">
                <a href="{{ .Permalink }}">
                    {{ if eq .Section "library" }}
                        读《{{ .Title }}》
                    {{ else }}
                        {{ .Title }}
                    {{ end }}
                </a>
                {{ if eq .Section "fictions" }}
                <span class="font-normal text-4 text-secondary">小说</span>
                {{ end }}
            </h2>
        </div>

        {{ $ctx := . }}
        {{ with .Params.categories }}
        <div class="my-4">
            {{ partial "components/category-pill" $ctx }}
        </div>
        {{ end }}
    </header>
</div>