summaryrefslogtreecommitdiff
path: root/layouts/_partials/items
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-17 11:25:10 +0800
committerEltrac <hi@guhub.cn>2025-07-17 11:25:10 +0800
commitec41236bc88a0762656413c38044ffa256bd93cb (patch)
tree2d6f685fbe9ebb998e29dfcc9d1db9289238c1fe /layouts/_partials/items
parent1160eda3a7de8ffaf1562e65187cec783081d491 (diff)
refactor: avoid using straight value in UnoCSS
Diffstat (limited to 'layouts/_partials/items')
-rw-r--r--layouts/_partials/items/book.html2
-rw-r--r--layouts/_partials/items/card.html4
-rw-r--r--layouts/_partials/items/post-small.html4
-rw-r--r--layouts/_partials/items/post.html4
4 files changed, 7 insertions, 7 deletions
diff --git a/layouts/_partials/items/book.html b/layouts/_partials/items/book.html
index ff5dbe99..dca2961b 100644
--- a/layouts/_partials/items/book.html
+++ b/layouts/_partials/items/book.html
@@ -1,7 +1,7 @@
<div{{ if eq .Params.rating 1 }} class="opacity-50 z-0"{{ end }}
style="view-transition-name: book-{{ .File.UniqueID }}">
<a href="{{ .Permalink }}" style="view-transition-name: book-{{ .Title }}"
- class="border-[0.2rem] border-solid rotate-[3deg] shadow-md block
+ class="border-3 border-solid rotate-3 shadow-md block
hover:rotate-0 hover:-translate-y-2 hover:scale-110 transition
{{ if eq .Params.rating 1 }} relative
diff --git a/layouts/_partials/items/card.html b/layouts/_partials/items/card.html
index b66bf676..d0ab6f00 100644
--- a/layouts/_partials/items/card.html
+++ b/layouts/_partials/items/card.html
@@ -1,6 +1,6 @@
{{ $ctx := .context }}
{{ $showSummary := .summary }}
-<div class="relative p-[1.5rem] bg-white dark:bg-neutral-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700"
+<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"
@@ -12,7 +12,7 @@
</h3>
<div class="text-base m-0">{{ partial "components/tags" $ctx }}</div>
</div>
- <div class="text-lg mt-2 markdown-body">
+ <div class="text-lg 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
index 39d6ae5c..30cbf60f 100644
--- a/layouts/_partials/items/post-small.html
+++ b/layouts/_partials/items/post-small.html
@@ -1,9 +1,9 @@
-<li class="flex justify-between text-[1.1rem]">
+<li class="flex justify-between text-size-lg">
<a href="{{ .RelPermalink }}" data-umami-event="🗃️ Click Post Link from Category Page">
{{ .Title }}{{ with .Params.subtitle }}:<span class="font-secondary">{{. }}</span>
{{ end }}
</a>
- <time class="text-[0.9rem] font-mono font-secondary flex-shrink-0">
+ <time class="text-size-sm font-mono font-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
index 10471180..1adf86af 100644
--- a/layouts/_partials/items/post.html
+++ b/layouts/_partials/items/post.html
@@ -21,7 +21,7 @@
{{ end }}
</a>
{{ if eq .ctx.Section "fictions" }}
- <span class="font-normal text-[1rem] text-[var(--secondary-text-color)]">小说</span>
+ <span class="font-normal text-4 text-[var(--secondary-text-color)]">小说</span>
{{ end }}
</h2>
</div>
@@ -34,7 +34,7 @@
{{ end }}
</header>
{{ if $showSummary }}
- <div class="markdown-body text-[1.1rem]"
+ <div class="markdown-body text-size-lg!"
style="view-transition-name: post-content-{{ .File.UniqueID }}">
{{ .ctx.Summary }}
</div>