File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -522,6 +522,13 @@ third_party_libraries:
522522 url :
523523 js : " https://cdn.jsdelivr.net/npm/mermaid@{{version}}/dist/mermaid.min.js"
524524 version : " 10.7.0"
525+ photoswipe :
526+ integrity :
527+ js : " sha256-VCBpdxvrNNxGHNuTdNqK9kPFkev2XY7DYzHdmgaB69Q="
528+ url :
529+ css : " https://cdn.jsdelivr.net/npm/photoswipe@{{version}}/dist/photoswipe.min.css"
530+ js : " https://cdn.jsdelivr.net/npm/photoswipe@{{version}}/dist/photoswipe.esm.min.js"
531+ version : " 5.4.4"
525532 polyfill :
526533 url :
527534 js : " https://cdnjs.cloudflare.com/polyfill/v{{version}}/polyfill.min.js?features=es6"
Original file line number Diff line number Diff line change 131131 integrity =" {{ site .third_party_libraries .img-comparison-slider .integrity .css }}"
132132 crossorigin =" anonymous"
133133 >
134+ {% endif %}
135+ <!-- Photoswipe -->
136+ {% if page .images .photoswipe %}
137+ <link
138+ defer
139+ rel =" stylesheet"
140+ href =" {{ site .third_party_libraries .photoswipe .url .css }}"
141+ crossorigin =" anonymous"
142+ >
134143 {% endif %}
135144 <!-- Image slider -->
136145 {% if page .images .slider %}
Original file line number Diff line number Diff line change 1+ -- -
2+ permalink : / assets / js / photoswipe - setup . js
3+ -- -
4+ import PhotoSwipeLightbox from "{{ site.third_party_libraries.photoswipe-lightbox.url.js }}" ;
5+ import PhotoSwipe from "{{ site.third_party_libraries.photoswipe.url.js }}" ;
6+ const photoswipe = new PhotoSwipeLightbox ( {
7+ gallery : ".pswp-gallery" ,
8+ children : "a" ,
9+ pswpModule : PhotoSwipe ,
10+ } ) ;
11+ photoswipe . init ( ) ;
You can’t perform that action at this time.
0 commit comments