From 9009b6b53321a52e63336ecd43c0ba2dd76af97a Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Fri, 2 Jan 2026 11:47:26 +0800 Subject: feat: add booklist shortcode --- layouts/partials/style.html | 23 +++++++++++++++++++++++ layouts/shortcodes/book.html | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 layouts/shortcodes/book.html (limited to 'layouts') diff --git a/layouts/partials/style.html b/layouts/partials/style.html index 0576b88..8685d39 100644 --- a/layouts/partials/style.html +++ b/layouts/partials/style.html @@ -29,6 +29,29 @@ 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } + .booklist { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 20px; + } + + .booklist-item { + transform: translateZ(0); + transition: + transform 0.25s, + box-shadow 0.25s; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + } + + .booklist-item img { + height: 100%; + } + + .booklist-item:hover { + transform: translateY(-5px) translateZ(20px); + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); + } + .social-icons { display: inline; font-size: 16px; diff --git a/layouts/shortcodes/book.html b/layouts/shortcodes/book.html new file mode 100644 index 0000000..072669b --- /dev/null +++ b/layouts/shortcodes/book.html @@ -0,0 +1,10 @@ + +
+ {{ if .Get "url" }} + + 图书封面 + + {{ else }} + 图书封面 + {{ end }} +
-- cgit v1.2.3