summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2024-12-12 16:09:59 +0800
committerEltrac <hi@guhub.cn>2024-12-12 16:09:59 +0800
commite00d0c71f3c6d62377799c397ed40d17942c64ea (patch)
tree0f1c22c412db28bd86d6349a953ebfd9660b2ab7
parent6624a6de8df22979b844eea492213670c93408e8 (diff)
perf: better book shortcode
-rw-r--r--themes/yinyang/assets/css/index.css10
-rw-r--r--themes/yinyang/layouts/shortcodes/book.html7
2 files changed, 13 insertions, 4 deletions
diff --git a/themes/yinyang/assets/css/index.css b/themes/yinyang/assets/css/index.css
index cdf54e81..34687048 100644
--- a/themes/yinyang/assets/css/index.css
+++ b/themes/yinyang/assets/css/index.css
@@ -587,6 +587,7 @@ a.blog-link img {
display: flex;
gap: 2rem;
line-height: 1.5;
+ margin: 2rem 0
}
.book-showcase .book-cover {
@@ -594,8 +595,13 @@ a.blog-link img {
flex-shrink: 0;
}
-.book-showcase .book-title {
- margin-top: 0
+.book-description-header .book-title {
+ margin: 0
+}
+
+.book-description-header p {
+ font-size: 1rem;
+ margin: 0.1rem
}
/* transition animation */
diff --git a/themes/yinyang/layouts/shortcodes/book.html b/themes/yinyang/layouts/shortcodes/book.html
index 481378b0..17747acc 100644
--- a/themes/yinyang/layouts/shortcodes/book.html
+++ b/themes/yinyang/layouts/shortcodes/book.html
@@ -5,9 +5,12 @@
</a>
</div>
<div class="book-description">
- <h3 class="book-title">{{ .Get "title" }}</h3>
- <div>
+ <div class="book-description-header">
+ <h3 class="book-title">{{ .Get "title" }}</h3>
<p>分数:{{ .Get "rating" }}</p>
+ </div>
+ <div>
+
{{ .Inner | markdownify }}
</div>
</div>