From 043d862cf2ccdcb89149a235fb7e7a6f27252561 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 16 Dec 2024 09:55:29 +0800 Subject: feat(theme): image gallery --- themes/yinyang/assets/css/index.css | 23 +++++++++++++++++++++++ themes/yinyang/layouts/shortcodes/gallery.html | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 themes/yinyang/layouts/shortcodes/gallery.html diff --git a/themes/yinyang/assets/css/index.css b/themes/yinyang/assets/css/index.css index fb9bdca9..60372ad3 100644 --- a/themes/yinyang/assets/css/index.css +++ b/themes/yinyang/assets/css/index.css @@ -604,6 +604,29 @@ a.blog-link img { margin: 0.1rem } +/* inline-image shortcode */ + +.inline-image { + display: flex; + overflow-x: auto; + scroll-behavior: smooth; + gap: 1rem; + white-space: nowrap; +} + +.inline-image > figure { + display: inline-block; + margin: 0; + flex-shrink: 0; +} + +.inline-image > figure img { + height: 20rem; + object-fit: cover; + display: block; +} + + /* transition animation */ html.is-changing .transition-fade article { diff --git a/themes/yinyang/layouts/shortcodes/gallery.html b/themes/yinyang/layouts/shortcodes/gallery.html new file mode 100644 index 00000000..a6e4d1b5 --- /dev/null +++ b/themes/yinyang/layouts/shortcodes/gallery.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | safeHTML }} +
-- cgit v1.2.3