summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/yinyang/assets/css/index.css17
-rw-r--r--themes/yinyang/layouts/shortcodes/book.html14
2 files changed, 31 insertions, 0 deletions
diff --git a/themes/yinyang/assets/css/index.css b/themes/yinyang/assets/css/index.css
index b7339334..cdf54e81 100644
--- a/themes/yinyang/assets/css/index.css
+++ b/themes/yinyang/assets/css/index.css
@@ -581,6 +581,23 @@ a.blog-link img {
z-index: 0;
}
+/* book showcase shortcode */
+
+.book-showcase {
+ display: flex;
+ gap: 2rem;
+ line-height: 1.5;
+}
+
+.book-showcase .book-cover {
+ width: 25%;
+ flex-shrink: 0;
+}
+
+.book-showcase .book-title {
+ margin-top: 0
+}
+
/* transition animation */
html.is-changing .transition-fade article {
diff --git a/themes/yinyang/layouts/shortcodes/book.html b/themes/yinyang/layouts/shortcodes/book.html
new file mode 100644
index 00000000..481378b0
--- /dev/null
+++ b/themes/yinyang/layouts/shortcodes/book.html
@@ -0,0 +1,14 @@
+<div class="book-showcase">
+ <div class="book-cover">
+ <a href="{{ .Get "cover" }}" data-fancybox>
+ <img src="{{ .Get "cover" }}" />
+ </a>
+ </div>
+ <div class="book-description">
+ <h3 class="book-title">{{ .Get "title" }}</h3>
+ <div>
+ <p>分数:{{ .Get "rating" }}</p>
+ {{ .Inner | markdownify }}
+ </div>
+ </div>
+</div>