chunks
1 month ago
vendor
9 months ago
admin.build.js
1 month ago
admin.js
3 months ago
analytics-tracker.js
9 months ago
analytics.build.js
1 month ago
blocks.build.js
1 month ago
carousel.js
1 year ago
custom-player.build.js
1 month ago
documents-viewer-script.js
3 months ago
ep-pdf-lightbox.js
3 months ago
feature-notices.js
7 months ago
front.js
3 months ago
frontend.build.js
3 months ago
gallery-justify.js
9 months ago
gutneberg-script.js
2 months ago
index.html
7 years ago
initCarousel.js
2 years ago
initplyr.js
2 months ago
instafeed.js
1 month ago
instagram-shortcode-generator.js
1 month ago
lazy-load.js
6 months ago
license.js
3 months ago
meetup-timezone.js
3 months ago
onboarding.build.js
1 month ago
pdf-gallery-elementor-editor.js
3 months ago
pdf-gallery.js
3 months ago
preview.js
9 months ago
settings.js
3 months ago
sponsored.js
9 months ago
gallery-justify.js
34 lines
| 1 | (function(){ |
| 2 | function justifyGallery() { |
| 3 | const justify_scale = screen.height * 0.2; |
| 4 | let items = document.querySelectorAll('.photos-gallery-justify .photo-item'); |
| 5 | |
| 6 | items.forEach(item => { |
| 7 | let image = item.querySelector('img'); |
| 8 | if (!image) return; |
| 9 | |
| 10 | function adjustItem() { |
| 11 | let ratio = image.naturalWidth / image.naturalHeight; |
| 12 | item.style.width = justify_scale * ratio + 'px'; |
| 13 | item.style.flexGrow = ratio; |
| 14 | } |
| 15 | |
| 16 | if (image.complete) { |
| 17 | adjustItem(); |
| 18 | } else { |
| 19 | image.onload = adjustItem; |
| 20 | } |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | if (document.readyState === 'loading') { |
| 25 | document.addEventListener('DOMContentLoaded', justifyGallery); |
| 26 | } else { |
| 27 | justifyGallery(); |
| 28 | } |
| 29 | |
| 30 | |
| 31 | window.addEventListener('load', justifyGallery); |
| 32 | })(); |
| 33 | |
| 34 |