diff options
| author | eltrac <hi@eltr.ac> | 2026-04-07 14:53:17 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-07 14:53:17 +0800 |
| commit | 10431bd8f5ff71690ae4e5444e8d7894fd401ae5 (patch) | |
| tree | 62b7fd1b6c1f68d2804f380eb522bcebeb2c8d9f /layouts/_partials/items | |
| parent | 3e0edacc4a0cafa53ede57ebb6f0378c93f3123b (diff) | |
chore: move templates out of site repo
Diffstat (limited to 'layouts/_partials/items')
| -rw-r--r-- | layouts/_partials/items/book.html | 36 | ||||
| -rw-r--r-- | layouts/_partials/items/card.html | 19 | ||||
| -rw-r--r-- | layouts/_partials/items/post-small.html | 11 | ||||
| -rw-r--r-- | layouts/_partials/items/post.html | 41 |
4 files changed, 0 insertions, 107 deletions
diff --git a/layouts/_partials/items/book.html b/layouts/_partials/items/book.html deleted file mode 100644 index 5b6e61c2..00000000 --- a/layouts/_partials/items/book.html +++ /dev/null @@ -1,36 +0,0 @@ -{{ $ctx := .ctx }} -{{ $NoViewTransition := (or .NoViewTransition false) }} - -<!-- Transform cover images via Cloudflare URL patterns --> -{{ $splitURL := split $ctx.Params.cover "/" }} -{{ $cover := "" }} -{{ $i := 0 }} -{{ range $splitURL }} - {{ if eq $i 3 }} - {{ $cover = printf "%s%s" $cover "cdn-cgi/image/width=150,quality=75/" }} - {{ end }} - {{ $cover = printf "%s%s/" $cover . }} - {{ $i = add $i 1 }} -{{ end }} -{{ $cover = strings.TrimSuffix "/" $cover }} - -<div{{ if eq .Params.rating 1 }} class="opacity-50 z-0"{{ end }} - {{ if not $NoViewTransition }}style="view-transition-name: book-{{ $ctx.File.UniqueID }}"{{ end }}> - <a href="{{ $ctx.Permalink }}" - {{ if not $NoViewTransition }}style="view-transition-name: book-{{ $ctx.Title }}"{{ end }} - class="border-3 border-solid rotate-3 shadow-md block - hover:rotate-0 hover:-translate-y-2 hover:scale-110 transition - - {{ if eq $ctx.Params.rating 1 }} relative - {{ else if eq $ctx.Params.rating 5 }} border-amber-300 shadow-amber-200 shadow-xl - {{ else }} border-white{{ end }}"> - <img class="lazy w-full block min-h-[120px] bg-neutral-500" src="{{ $cover }}" /> - {{ if eq $ctx.Params.rating 1 }} - <div class="absolute z-1 top-[25%] left-[25%] h-[50%] w-[50%]" - style="background-image: url('https://r2.eltr.ac/uPic/2025/05/thumbs-down.png'); - background-size: 100%; - background-position: center; - background-repeat: no-repeat;"></div> - {{ end }} - </a> -</div> diff --git a/layouts/_partials/items/card.html b/layouts/_partials/items/card.html deleted file mode 100644 index 01a3cfb8..00000000 --- a/layouts/_partials/items/card.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ $ctx := .context }} -{{ $showSummary := .summary }} -{{ $summaryClass := .summaryClass }} -<div class="relative p-6 bg-white dark:bg-neutral-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700" - style="view-transition-name: card-{{ $ctx.File.UniqueID }}"> - <div class="card-header"> - <h3 class="text-xl font-extrabold m-0 text-gray-900 dark:text-gray-100" - data-pagefind-meta="title" - data-pagefind-sort="date[data-date], weight[data-weight]" - data-date="{{ .Date.Format "2006-01-02" }}" - data-weight="5"> - <a href="{{ $ctx.RelPermalink }}" class="no-underline! text-[var(--text-color)]!">{{ $ctx.Title }}</a> - </h3> - <div class="text-base m-0">{{ partial "components/tags" $ctx }}</div> - </div> - <div class="{{ $summaryClass }} mt-2 leading-loose markdown-body"> - {{ if $showSummary }}{{ $ctx.Summary }}{{ else }}{{ $ctx.Content }}{{ end }} - </div> -</div> diff --git a/layouts/_partials/items/post-small.html b/layouts/_partials/items/post-small.html deleted file mode 100644 index 28a4a995..00000000 --- a/layouts/_partials/items/post-small.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ $isWeekly := (eq .Params.categories "稻草人周刊") }} -<li class="flex justify-between text-size-lg - {{ if $isWeekly }} weekly animate-duration-500 transition-opacity{{ end }}"> - <a href="{{ .RelPermalink }}"> - {{ .Title }}{{ with .Params.subtitle }}:<span class="text-secondary">{{. }}</span> - {{ end }} - </a> - <time class="text-size-sm font-mono text-secondary flex-shrink-0"> - {{ .Date.Format "2006-1-2" }} - </time> -</li> diff --git a/layouts/_partials/items/post.html b/layouts/_partials/items/post.html deleted file mode 100644 index 5527ea6c..00000000 --- a/layouts/_partials/items/post.html +++ /dev/null @@ -1,41 +0,0 @@ -{{ $ctx := .ctx }} -{{ $showSummary := .showSummary }} -<div class="posts-item w-full my-2" - style="view-transition-name: post-{{ .ctx.File.UniqueID }}"> - <header class="w-full md:flex md:justify-between"> - <div> - <p class="font-mono text-secondary"> - <time>{{ .ctx.Date.Format "January 2" }},</time> - <span>in <a href="/{{ .ctx.Section }}/">{{ .ctx.Section }}</a></span> - </p> - <h2 class="xerox" - {{ if $showSummary }} style="margin-bottom: 0"{{ end }}> - <a href="{{ .ctx.Permalink }}"> - {{ if eq .ctx.Section "library" }} - 读《{{ .ctx.Title }}》 - {{ else }} - {{ .ctx.Title }} - {{ end }} - </a> - {{ if eq .ctx.Section "fictions" }} - <span class="font-normal text-4 text-secondary">小说</span> - {{ end }} - </h2> - </div> - {{ with .ctx.Params.categories }} - <div class="my-4"> - {{ partial "components/category-pill" $ctx }} - </div> - {{ end }} - </header> - {{ if or $showSummary .ctx.Params.description }} - <div class="markdown-body text-size-lg leading-relaxed" - style="view-transition-name: post-content-{{ .ctx.File.UniqueID }}"> - {{ if $showSummary }} - {{ .ctx.Summary }} - {{ else if .ctx.Params.description }} - {{ .ctx.Params.description }} - {{ end }} - </div> - {{ end }} -</div> |
