summaryrefslogtreecommitdiff
path: root/layouts/cards
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-15 16:47:25 +0800
committerEltrac <hi@guhub.cn>2025-07-15 16:47:25 +0800
commitef16dffd81595af3bc03efea78d45032d0b467a2 (patch)
tree5f1588e9bab0a8ab8f18852fa26001cc11873412 /layouts/cards
parent6c76369a20223f1f67f75450a99cf7691c7e908a (diff)
refactor: replace _card.scss with UnoCSS
Diffstat (limited to 'layouts/cards')
-rw-r--r--layouts/cards/section.html4
-rw-r--r--layouts/cards/single.html14
2 files changed, 11 insertions, 7 deletions
diff --git a/layouts/cards/section.html b/layouts/cards/section.html
index 89ec474b..58ae859c 100644
--- a/layouts/cards/section.html
+++ b/layouts/cards/section.html
@@ -6,13 +6,13 @@
{{- $pages := $cards.Pages }}
{{- $featured := first 6 $pages }}
{{- $rest := after 6 $pages }}
- <div class="cards-grid outbox small">
+ <div class="grid! md:grid-cols-2 gap-[1rem] outbox small">
{{- range $featured }}
{{ partial "items/card" (dict "context" . "summary" true) }}
{{- end }}
</div>
- <ul class="cards-list">
+ <ul class="flex gap-[1rem] flex-wrap justify-around list-none text-[1.2rem]">
{{- range $rest }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
diff --git a/layouts/cards/single.html b/layouts/cards/single.html
index 0b269bca..3ff2c5eb 100644
--- a/layouts/cards/single.html
+++ b/layouts/cards/single.html
@@ -1,6 +1,10 @@
{{ define "main" }}
- <article class="card-page">
- {{ partial "components/logo" (dict "link" "cards") }}
+ <article class="relative">
+ {{ partial "components/logo" (dict
+ "link" "cards"
+ "class" "round-sticker absolute top-[-1rem] right-[-1rem] w-[4rem] h-[4rem] z-1 rotate-[-5deg]"
+ "imageClass" "w-full"
+ ) }}
{{ partial "items/card" (dict "context" .) }}
{{- /* 查询引用了这个卡片的文章 */ -}}
@@ -15,9 +19,9 @@
{{- /* 如果有文章引用这个卡片,就显示它们 */ -}}
{{ if gt (len $referencedBy) 0 }}
- <section class="related-posts post-content">
- <h2>引用了本卡片的文章</h2>
- <ul>
+ <section class="related-posts post-content my-5">
+ <h2 class="text-[1.2rem] font-secondary m-0">引用了本卡片的文章</h2>
+ <ul class="m-0">
{{- range $referencedBy }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>