From a8c9de315d6680f17217dc0abbc135d23092f344 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Thu, 29 Jun 2023 15:01:30 +0800 Subject: feat: photo previewer config options support --- _config.yml | 6 ++++ _includes/extensions/photo-swipe.html | 67 ++++++++++++++++++++++++++++------- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/_config.yml b/_config.yml index 59b1c2b..981fa59 100644 --- a/_config.yml +++ b/_config.yml @@ -183,6 +183,12 @@ yat: # Pagination setting # paginate: 5 +# Photo previewer settings +# photo_previewer: +# photo_selectors: "section.main" # Preview specified areas of photos by CSS selectors (It also can be an array) +# photo_scale: 2 # Adjust the preview scale of photos +# background_opacity: 0.85 # Background backdrop opacity + # Disqus comments # disqus: # shortname: "Your Disqus username" diff --git a/_includes/extensions/photo-swipe.html b/_includes/extensions/photo-swipe.html index c88592a..ec4b8a2 100644 --- a/_includes/extensions/photo-swipe.html +++ b/_includes/extensions/photo-swipe.html @@ -16,26 +16,69 @@