From 03ea17117db4dd00e3dd38984389181c2c0faa2f Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Fri, 30 Jun 2023 22:52:04 +0800 Subject: feat: upgrade photo previewer to PhotoSwipe 5 (#115) --- _config.yml | 14 ++- _includes/extensions/photo-swipe.html | 203 +++++++--------------------------- 2 files changed, 48 insertions(+), 169 deletions(-) diff --git a/_config.yml b/_config.yml index 981fa59..40d9762 100644 --- a/_config.yml +++ b/_config.yml @@ -183,11 +183,17 @@ yat: # Pagination setting # paginate: 5 -# Photo previewer settings +# Photo previewer settings (PhotoSwipe 5) +# the options please refer to: https://photoswipe.com/options/ # 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 +# gallery: "section.main" +# children: "a.photo-swipe" +# bgOpacity: 0.8 +# padding: +# top: 20 +# bottom: 40 +# left: 100 +# right: 100 # Disqus comments # disqus: diff --git a/_includes/extensions/photo-swipe.html b/_includes/extensions/photo-swipe.html index ec4b8a2..9a5a51c 100644 --- a/_includes/extensions/photo-swipe.html +++ b/_includes/extensions/photo-swipe.html @@ -1,11 +1,7 @@ - - + + -