From 478f5b77f14052fa7228851695be877e2ba7a0aa Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Thu, 23 Jan 2025 19:17:23 +0000
Subject: [PATCH] update
---
layouts/_default/term.html | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
index c70c62e..56f9643 100644
--- a/layouts/_default/term.html
+++ b/layouts/_default/term.html
@@ -6,16 +6,16 @@
{{- $size := $paginator.PagerSize }}
{{- $scratch := newScratch }}
{{- range $index, $value := $paginator.Pages }}
- {{- if isset .Params "image" }}
- {{- $scratch.Set "image" .Params.image }}
- {{- else }}
- {{- $scratch.Set "image" "thumbnail.svg" }}
- {{- end }}
- {{- $image := $scratch.Get "image" }}
- {{- $bg := (absURL (printf "images/%s" $image)) }}
- {{- if in $image "https://" }}
- {{- $bg = $image }}
- {{- end }}
+ {{- if isset .Params "image" }}
+ {{- $scratch.Set "image" .Params.image }}
+ {{- else }}
+ {{- $scratch.Set "image" "thumbnail.svg" }}
+ {{- end }}
+ {{- $image := $scratch.Get "image" }}
+ {{- $bg := (absURL (printf "images/%s" $image)) }}
+ {{- if in $image "https://" }}
+ {{- $bg = $image }}
+ {{- end }}
<article class="article mb-2">
<a href="{{ $value.Permalink }}" {{ if eq $index 0 }} class=grid-reverse {{ end }}>
<div class="article_thumb" style="background-image: url({{ $bg }})"></div>
@@ -23,14 +23,14 @@
<div class="post_date">{{ dateFormat "January 02, 2006" $value.Date }}</div>
<h3 class="article_title">{{ $value.Title }}</h3>
<div class="article_excerpt {{ if eq $index 0 }} visible {{ end }}">
- <p>{{ $value.Summary | truncate 100 }}</p>
+ <p>{{ $value.Summary | truncate 100 }}</p>
</div>
</div>
</a>
</article>
- {{- if and (eq $index 0) (gt $size 1) }}<div class="grid-2 article_showcase">{{ end }}
- {{- if and (eq $index (add $size -1)) (gt $size 1) }}</div>{{ end }}
+ {{- if and (eq $index 0) (gt $size 1) }}<div class="grid-2 article_showcase">{{ end }}
+ {{- if and (eq $index (add $size -1)) (gt $size 1) }}</div>{{ end }}
{{- end }}
</div>
</div>
-{{- end -}}
+{{- end -}}
\ No newline at end of file
--
Gitblit v1.10.0