summaryrefslogtreecommitdiff
path: root/layouts/view_postblock_home.html
blob: 3d7824917a9244d80cc9cfc75ffff31a57338ada (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
<!--
    This is a Decorator of 'view_postblock',
    with additional summary block.
-->

<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">
                <span>Recently</span>
                <span>in <a href="/{{ .Section }}/">{{ .Section }}</a></span>
                <time>on {{ .Date.Format "January 2" }}</time>
            </p>
            <h2 class="xerox">
                <a class="noline" 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>

<div class="post-summary markdown-body text-size-lg leading-relaxed mt-0"
    style="view-transition-name: post-content-{{ .File.UniqueID }}">
    {{ if .Params.description }}
        {{ .Params.description }}
    {{ else }}
        {{ .Summary }}
    {{ end }}
</div>