diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 8d02524..ed9eabe 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -671,7 +671,12 @@ function createPhotoSwipe() { showHideAnimationType: "fade", showAnimationDuration: 160, hideAnimationDuration: 140, - secondaryZoomLevel: (zoomLevel) => Math.min(2.5, zoomLevel.max), + secondaryZoomLevel: (zoomLevel) => { + const fitLevel = zoomLevel.fit + const forcedZoomLevel = fitLevel * 1.8 + return Math.max(forcedZoomLevel, Math.min(3, zoomLevel.max)) + }, + maxZoomLevel: (zoomLevel) => Math.max(4, zoomLevel.fit * 2.5, zoomLevel.max), wheelToZoom: true, arrowPrev: false, arrowNext: false, diff --git a/src/styles/photoswipe.css b/src/styles/photoswipe.css index aed5276..6cabf76 100644 --- a/src/styles/photoswipe.css +++ b/src/styles/photoswipe.css @@ -30,8 +30,12 @@ .pswp__button--open-link .pswp__icn { width: 24px !important; height: 24px !important; + position: static !important; + display: block !important; + margin: auto !important; + transform: none !important; } .pswp__button--open-link .pswp__icn path { - fill: currentColor !important; + fill: white !important; }