From 0edbc79023641a3396736b14cc7d9b1781973e0b Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 23 Sep 2021 09:59:12 +0200 Subject: [PATCH] Add lightgallery viewer in photologue --- .../static/lightgallery/css/lg-thumbnail.css | 108 +++ photo21/static/lightgallery/css/lg-zoom.css | 84 ++ .../static/lightgallery/css/lightgallery.css | 721 ++++++++++++++++++ photo21/static/lightgallery/fonts/lg.svg | 54 ++ photo21/static/lightgallery/fonts/lg.ttf | Bin 0 -> 4756 bytes photo21/static/lightgallery/fonts/lg.woff | Bin 0 -> 4832 bytes photo21/static/lightgallery/fonts/lg.woff2 | Bin 0 -> 2332 bytes .../static/lightgallery/images/loading.gif | Bin 0 -> 4178 bytes .../static/lightgallery/lightgallery.min.js | 8 + .../plugins/thumbnail/lg-thumbnail.min.js | 8 + .../lightgallery/plugins/zoom/lg-zoom.min.js | 8 + .../templates/photologue/gallery_archive.html | 36 + .../photologue/gallery_archive_year.html | 30 + .../templates/photologue/gallery_detail.html | 38 + .../photologue/includes/gallery_sample.html | 13 + 15 files changed, 1108 insertions(+) create mode 100644 photo21/static/lightgallery/css/lg-thumbnail.css create mode 100644 photo21/static/lightgallery/css/lg-zoom.css create mode 100644 photo21/static/lightgallery/css/lightgallery.css create mode 100644 photo21/static/lightgallery/fonts/lg.svg create mode 100644 photo21/static/lightgallery/fonts/lg.ttf create mode 100644 photo21/static/lightgallery/fonts/lg.woff create mode 100644 photo21/static/lightgallery/fonts/lg.woff2 create mode 100644 photo21/static/lightgallery/images/loading.gif create mode 100644 photo21/static/lightgallery/lightgallery.min.js create mode 100644 photo21/static/lightgallery/plugins/thumbnail/lg-thumbnail.min.js create mode 100644 photo21/static/lightgallery/plugins/zoom/lg-zoom.min.js create mode 100644 photo21/templates/photologue/gallery_archive.html create mode 100644 photo21/templates/photologue/gallery_archive_year.html create mode 100644 photo21/templates/photologue/gallery_detail.html create mode 100644 photo21/templates/photologue/includes/gallery_sample.html diff --git a/photo21/static/lightgallery/css/lg-thumbnail.css b/photo21/static/lightgallery/css/lg-thumbnail.css new file mode 100644 index 0000000..bd203c5 --- /dev/null +++ b/photo21/static/lightgallery/css/lg-thumbnail.css @@ -0,0 +1,108 @@ +.lg-outer .lg-thumb-outer { + background-color: #0d0a0a; + width: 100%; + max-height: 350px; + overflow: hidden; + float: left; +} + +.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} + +.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} + +.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} + +.lg-outer .lg-thumb-outer.lg-rebuilding-thumbnails .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} + +.lg-outer .lg-thumb-outer.lg-thumb-align-middle { + text-align: center; +} + +.lg-outer .lg-thumb-outer.lg-thumb-align-left { + text-align: left; +} + +.lg-outer .lg-thumb-outer.lg-thumb-align-right { + text-align: right; +} + +.lg-outer.lg-single-item .lg-thumb-outer { + display: none; +} + +.lg-outer .lg-thumb { + padding: 5px 0; + height: 100%; + margin-bottom: -5px; + display: inline-block; + vertical-align: middle; +} + +@media (min-width: 768px) { + .lg-outer .lg-thumb { + padding: 10px 0; + } +} + +.lg-outer .lg-thumb-item { + cursor: pointer; + float: left; + overflow: hidden; + height: 100%; + border-radius: 2px; + margin-bottom: 5px; + will-change: border-color; +} + +@media (min-width: 768px) { + .lg-outer .lg-thumb-item { + border-radius: 4px; + border: 2px solid #fff; + -webkit-transition: border-color 0.25s ease; + -o-transition: border-color 0.25s ease; + transition: border-color 0.25s ease; + } +} + +.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { + border-color: #a90707; +} + +.lg-outer .lg-thumb-item img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.lg-outer.lg-can-toggle .lg-item { + padding-bottom: 0; +} + +.lg-outer .lg-toggle-thumb:after { + content: '\e1ff'; +} + +.lg-outer.lg-animate-thumb .lg-thumb { + -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); +} diff --git a/photo21/static/lightgallery/css/lg-zoom.css b/photo21/static/lightgallery/css/lg-zoom.css new file mode 100644 index 0000000..bd97492 --- /dev/null +++ b/photo21/static/lightgallery/css/lg-zoom.css @@ -0,0 +1,84 @@ +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transition-duration: 0ms !important; + transition-duration: 0ms !important; +} + +.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s; +} + +.lg-outer.lg-use-transition-for-zoom.lg-zoom-drag-transition .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + will-change: transform; + -webkit-transition: -webkit-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.8s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} + +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + will-change: opacity, transform; + -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -moz-transition: -moz-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -o-transition: -o-transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s, opacity 0.15s !important; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} + +.lg-icon.lg-zoom-in:after { + content: '\e311'; +} + +.lg-icon.lg-actual-size { + font-size: 20px; +} + +.lg-icon.lg-actual-size:after { + content: '\e033'; +} + +.lg-icon.lg-zoom-out { + opacity: 0.5; + pointer-events: none; +} + +.lg-icon.lg-zoom-out:after { + content: '\e312'; +} + +.lg-zoomed .lg-icon.lg-zoom-out { + opacity: 1; + pointer-events: auto; +} + +.lg-outer[data-lg-slide-type='video'] .lg-zoom-in, +.lg-outer[data-lg-slide-type='video'] .lg-actual-size, +.lg-outer[data-lg-slide-type='video'] .lg-zoom-out, .lg-outer[data-lg-slide-type='iframe'] .lg-zoom-in, +.lg-outer[data-lg-slide-type='iframe'] .lg-actual-size, +.lg-outer[data-lg-slide-type='iframe'] .lg-zoom-out, .lg-outer.lg-first-slide-loading .lg-zoom-in, +.lg-outer.lg-first-slide-loading .lg-actual-size, +.lg-outer.lg-first-slide-loading .lg-zoom-out { + opacity: 0.75; + pointer-events: none; +} diff --git a/photo21/static/lightgallery/css/lightgallery.css b/photo21/static/lightgallery/css/lightgallery.css new file mode 100644 index 0000000..d74d81f --- /dev/null +++ b/photo21/static/lightgallery/css/lightgallery.css @@ -0,0 +1,721 @@ +@font-face { + font-family: 'lg'; + src: url("../fonts/lg.woff2?io9a6k") format("woff2"), url("../fonts/lg.ttf?io9a6k") format("truetype"), url("../fonts/lg.woff?io9a6k") format("woff"), url("../fonts/lg.svg?io9a6k#lg") format("svg"); + font-weight: normal; + font-style: normal; + font-display: block; +} + +.lg-icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'lg' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.lg-container { + font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; +} + +.lg-next, +.lg-prev { + background-color: rgba(0, 0, 0, 0.45); + border-radius: 2px; + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + margin-top: -10px; + padding: 8px 10px 9px; + position: absolute; + top: 50%; + z-index: 1080; + outline: none; + border: none; +} + +.lg-next.disabled, +.lg-prev.disabled { + opacity: 0 !important; + cursor: default; +} + +.lg-next:hover:not(.disabled), +.lg-prev:hover:not(.disabled) { + color: #fff; +} + +.lg-single-item .lg-next, .lg-single-item +.lg-prev { + display: none; +} + +.lg-next { + right: 20px; +} + +.lg-next:before { + content: '\e095'; +} + +.lg-prev { + left: 20px; +} + +.lg-prev:after { + content: '\e094'; +} + +@-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} + +@-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} + +@-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} + +@keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} + +@-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} + +@-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} + +@-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} + +@keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} + +.lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; +} + +.lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; +} + +.lg-toolbar { + z-index: 1082; + left: 0; + position: absolute; + top: 0; + width: 100%; +} + +.lg-media-overlap .lg-toolbar { + background-image: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)); +} + +.lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; + background: none; + border: none; + box-shadow: none; +} + +.lg-toolbar .lg-icon.lg-icon-18 { + font-size: 18px; +} + +.lg-toolbar .lg-icon:hover { + color: #fff; +} + +.lg-toolbar .lg-close:after { + content: '\e070'; +} + +.lg-toolbar .lg-maximize { + font-size: 22px; +} + +.lg-toolbar .lg-maximize:after { + content: '\e90a'; +} + +.lg-toolbar .lg-download:after { + content: '\e0f2'; +} + +.lg-sub-html { + color: #eee; + font-size: 16px; + padding: 10px 40px; + text-align: center; + z-index: 1080; + opacity: 0; + -webkit-transition: opacity 0.2s ease-out 0s; + -o-transition: opacity 0.2s ease-out 0s; + transition: opacity 0.2s ease-out 0s; +} + +.lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; +} + +.lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; +} + +.lg-sub-html a { + color: inherit; +} + +.lg-sub-html a:hover { + text-decoration: underline; +} + +.lg-media-overlap .lg-sub-html { + background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); +} + +.lg-item .lg-sub-html { + position: absolute; + bottom: 0; + right: 0; + left: 0; +} + +.lg-error-msg { + font-size: 14px; + color: #999; +} + +.lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + height: 47px; + vertical-align: middle; +} + +.lg-closing .lg-toolbar, +.lg-closing .lg-prev, +.lg-closing .lg-next, +.lg-closing .lg-sub-html { + opacity: 0; + -webkit-transition: -webkit-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -moz-transition: -moz-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + -o-transition: -o-transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; + transition: transform 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.08 cubic-bezier(0, 0, 0.25, 1) 0s, color 0.08 linear; +} + +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object { + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; +} + +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object { + opacity: 1; +} + +.lg-group:after { + content: ''; + display: table; + clear: both; +} + +.lg-container { + display: none; + outline: none; +} + +.lg-container.lg-show { + display: block; +} + +.lg-on { + scroll-behavior: unset; +} + +.lg-toolbar, +.lg-prev, +.lg-next, +.lg-pager-outer, +.lg-hide-sub-html .lg-sub-html { + opacity: 0; + will-change: transform, opacity; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-show-in .lg-toolbar, +.lg-show-in .lg-prev, +.lg-show-in .lg-next, +.lg-show-in .lg-pager-outer { + opacity: 1; +} + +.lg-show-in.lg-hide-sub-html .lg-sub-html { + opacity: 1; +} + +.lg-show-in .lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); +} + +.lg-show-in .lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); +} + +.lg-show-in .lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); +} + +.lg-show-in .lg-hide-items.lg-hide-sub-html .lg-sub-html { + opacity: 0; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); +} + +.lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + text-align: left; + opacity: 0.001; + outline: none; + will-change: auto; + overflow: hidden; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} + +.lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.lg-outer.lg-zoom-from-image { + opacity: 1; +} + +.lg-outer.lg-visible { + opacity: 1; +} + +.lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-prev-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-next-slide, .lg-outer.lg-css3 .lg-item:not(.lg-start-end-progress).lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} + +.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} + +.lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} + +.lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} + +.lg-outer .lg-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.lg-outer .lg-inner { + width: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + -webkit-transition: opacity 0s; + -o-transition: opacity 0s; + transition: opacity 0s; + white-space: nowrap; +} + +.lg-outer .lg-item { + will-change: transform, opacity; + display: none !important; +} + +.lg-outer .lg-item:not(.lg-start-end-progress) { + background: url("../images/loading.gif") no-repeat scroll center center transparent; +} + +.lg-outer.lg-css3 .lg-prev-slide, +.lg-outer.lg-css3 .lg-current, +.lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; +} + +.lg-outer.lg-css .lg-current { + display: inline-block !important; +} + +.lg-outer .lg-item, +.lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} + +.lg-outer .lg-item:before, +.lg-outer .lg-img-wrap:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.lg-outer .lg-img-wrap { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + white-space: nowrap; + font-size: 0; +} + +.lg-outer .lg-item.lg-complete { + background-image: none; +} + +.lg-outer .lg-item.lg-current { + z-index: 1060; +} + +.lg-outer .lg-object { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + position: relative; +} + +.lg-outer.lg-show-after-load .lg-item .lg-object, +.lg-outer.lg-show-after-load .lg-item .lg-video-play-button { + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} + +.lg-outer.lg-show-after-load .lg-item.lg-zoom-from-image .lg-object, +.lg-outer.lg-show-after-load .lg-item.lg-zoom-from-image .lg-video-play-button { + opacity: 1; +} + +.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, +.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play-button { + opacity: 1; +} + +.lg-outer .lg-empty-html.lg-sub-html, +.lg-outer .lg-empty-html .lg-sub-html { + display: none; +} + +.lg-outer.lg-hide-download .lg-download { + opacity: 0.75; + pointer-events: none; +} + +.lg-outer .lg-first-slide .lg-dummy-img { + position: absolute; + top: 50%; + left: 50%; +} + +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-components { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); + opacity: 1; +} + +.lg-outer.lg-components-open:not(.lg-zoomed) .lg-sub-html { + opacity: 1; + transition: opacity 0.2s ease-out 0.15s; +} + +.lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #000; + opacity: 0; + will-change: auto; + -webkit-transition: opacity 333ms ease-in 0s; + -o-transition: opacity 333ms ease-in 0s; + transition: opacity 333ms ease-in 0s; +} + +.lg-backdrop.in { + opacity: 1; +} + +.lg-css3.lg-no-trans .lg-prev-slide, +.lg-css3.lg-no-trans .lg-next-slide, +.lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; +} + +.lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} + +.lg-css3.lg-fade .lg-item { + opacity: 0; +} + +.lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; +} + +.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; +} + +.lg-css3.lg-use-css3 .lg-item.lg-start-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + -o-transition: -o-transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; + transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; +} + +.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; +} + +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} + +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} + +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} + +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} + +.lg-container { + display: none; +} + +.lg-container.lg-show { + display: block; +} + +.lg-container.lg-dragging-vertical .lg-backdrop { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} + +.lg-container.lg-dragging-vertical .lg-css3 .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} + +.lg-inline .lg-backdrop, +.lg-inline .lg-outer { + position: absolute; +} + +.lg-inline .lg-backdrop { + z-index: 1; +} + +.lg-inline .lg-outer { + z-index: 2; +} + +.lg-inline .lg-maximize:after { + content: '\e909'; +} + +.lg-components { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + will-change: transform; + -webkit-transition: -webkit-transform 0.35s ease-out 0s; + -moz-transition: -moz-transform 0.35s ease-out 0s; + -o-transition: -o-transform 0.35s ease-out 0s; + transition: transform 0.35s ease-out 0s; + z-index: 1080; + position: absolute; + bottom: 0; + right: 0; + left: 0; +} diff --git a/photo21/static/lightgallery/fonts/lg.svg b/photo21/static/lightgallery/fonts/lg.svg new file mode 100644 index 0000000..fe8b075 --- /dev/null +++ b/photo21/static/lightgallery/fonts/lg.svg @@ -0,0 +1,54 @@ + + + + + + +{ + "fontFamily": "lg", + "majorVersion": 2, + "minorVersion": 0, + "fontURL": "", + "copyright": "", + "license": "", + "licenseURL": "", + "description": "Font generated by IcoMoon.", + "version": "Version 2.0", + "fontId": "lg", + "psName": "lg", + "subFamily": "Regular", + "fullName": "lg" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/photo21/static/lightgallery/fonts/lg.ttf b/photo21/static/lightgallery/fonts/lg.ttf new file mode 100644 index 0000000000000000000000000000000000000000..825f4832d409eaebc9684ea59d1e599c364f721d GIT binary patch literal 4756 zcmai2O>7&-6`miGE0W8fU5cbAQR2^vq(n-Jq!mfomSx3GV=Izl*(I6Sa2(6FEGLyE z!s3eQeaD+M>X`kAD2*+4*yC-qlwLp<#@F zyEuR09Nu1xujAdexb({DXFmM1g7HU$xW~^d%%AG|eP-QYAtZMO2x*;vit#x3d(WI* zefczTx-mYA@wugylk=(9dZQTs1>@~!=U+ZYlH^B(C~X)=m*>we{I0mW2jf1-cb#*LhT3J6d_+a`1Q@}WQwDMD16as zQ3DXtL=S^zzPZ5_CKmE0@ICMbCvM=Pw>xil-_~!RyZy7<|NLxo!*xgf!u6$Nv%a}$ ztaOk5Q-dzwQ9vgKoo?QV{5|qTm59(VD0;LG8TI1K?#Kf&wYH1 zko-1d+P%5ojD0u1KT#Ty`v#)Z&uO-yRJ3MuP!=yJXYisbqF6 zpYwr-rAy^23usr&=e1YSt{Kna5~Z}zs8+urf`yY7SuoYBf&o%n@;xL%;)Em~DcQ=% z7GjT3Qv4Q)Z`1O1;X+P|cwB|e?WCVf!s3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bretIq(;num$j2O<25&3QgDs z{P&x%1Ftq4Ubxg^2S&^=VTS)GywQX?@E4mfl!jddQX@M+} zg}p1wtI>t|<@s}StMjL#Ctit8o?JPwva&ox_L3E{Ojb#hERcCX^W+?v!+4&Y0`3HP z1??m`39bXEf_JDifA0K?E6dT*po<> T$r4sSXOiGKDXfAxF literal 0 HcmV?d00001 diff --git a/photo21/static/lightgallery/fonts/lg.woff2 b/photo21/static/lightgallery/fonts/lg.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..2c2e289260bf80880c447749205a7024c34310f0 GIT binary patch literal 2332 zcmV+%3FG#6Pew8T0RR9100|rb3jhEB01}7*00_+h0RR9100000000000000000000 z00006U;u$65eN#LES5?OIsgGS0we=)1Rw>1N(UetsSW_<=W(-oKMAExFsmpPS1K05 zm`JkguSY3=L2BQ9_!?p4ex41!yLOc&r zDT^p(Lo)AyuQlo9HLa2 zByzBWk}@|mNkOuaW+ht7^5wbI?CAO*9J5*jr_QF)i!&HbG#?g{+ddf%B->T{L(HqH&)%|{kM!vaiGD2Wk9^HhF(ny5FXcdS-1k6z*iIF(Do?5A8 zN6jh51JpV{W!W1?#U56Yi%GK;fTGvY`Ex;vf~>k_m+$Yo&4@GKrES#US!7EAXdg}@WV@oiTL(^Q zz5b>N*1ehcK<&7u9k{NNbk=uu6mc911o~bF7|x8yhrZIszRYnSu>LIC%Br1LQcO?$ zlqFa(6>PW_L?r9e-S)L!z8Bgc*?v_;n;e6ho3*dT{UXJ4T|j-qU*+}3AMIeQ&7w5{ zJ5|2S20Gm6E^0Iu zxr&U9MVbTMbkiof$ahDt@J!1SeL`WH+c?jiwrkh2lgr#5D+-rl+M{sGr$$Hw_Cx+f z=kJFf%d{XGW{_SCvJZ+Of}@U+)$+Sk)vEc+yE0H^}yY^rPb zKw5gBJ+@ojxnubM7PPh&TqMIo3#IC;Te8~`h3$r-LPL8|_(W{Rjgah69qi%lg+&I# z{Y}a;ZV9u6p)s1ATmQceY5zSgWmdKoZ@nd<-nLX)*-RBHRuItN=IVrZV&XsZKYsOu zSxN1Vbn>2(Hfky7E!fXci_6;Kg(mtGLoF?7o6mUi>c=f5E2)&D%&F)fmbKinOn9$$ zxC>^uTf76MSjNy0n@MM~Ze9dS3+Qlr`5X5|uUmyU{PBiGNsE);c_&$DShQh71wtxI z-r$px@q$1}kB{)A4SW0Agkx0kGEsZ?f@z_b z#)f@S;pjC0A~5o=|H?>LU z-+M#fHjwR0KQyP;yg!XJM&1mc+--K4aJjcQjq#Vs=DUKfBsFdcFC_^J^IEcAABFm?~JPvLWH6GZ7lJ_ zx^5gWP>(NDJzU#Rbm7Y!t~FKGuQSXgNs?>-Pt3O0_RF&}X~pWPwacX?nq_%Rimdhj zUvwD+zpIz%Q(EMI*b93u78PI6L9s&GsxM1gAG*ZA%Uh*-<=nP{!yB_VrbFJBFgxo> z^i1nV9;1|hpkUVrLaW4^696D#ZC*S}fSu%rvH@3A<%mAobH*tzmjelomOAjHhfJB$ zPkRzQo!Q7;LKT7Qa`SdGMb*RTPMEx1AXH*eG8#_F1-iszG-bNG&kq2g2NnT_yKy6| z0TF%{ZvzAX7=Se@)3#Dt`L|Gt004j=b?yB~9>>q(zr`PK0z(0VMg;KkgbEo4~mUH~pO5l?vLTezY|&tu%iGVZ&~wX_mmvWmQm&hN7E= z!09nKV6dMN+#VwU3TO)P@uPJlMA$IX0})}EWz=IZkiZ9o`}jd3zz1Rkpn;VX0)BiW z5(*)1+eX+18{Z_p?$wA5ZEJV_rZMM0Gwg&NurFE%v|a;VzXw*^K&Ex}`ZaJ^s&9j} zk<`gWyzw8}ZZJPP7nr1my|CGh7|Mri$Q{@q89y~{IrIgCk@oMJR>L0mnF9_D0000L C#$m<) literal 0 HcmV?d00001 diff --git a/photo21/static/lightgallery/images/loading.gif b/photo21/static/lightgallery/images/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..4744c4556c71275769cdd16f1194c2f77cb6153c GIT binary patch literal 4178 zcmd7VX;c&Gng{SoZAq$Xt**i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4nGTs=xWn_z{_<3ZA){<9aRBUsa@Gr-fzsXnVZMYJGw_P8jBxOHD|vAutqo}pvZ2; z!VuRbn0j;tXuH_IbJSJ~=q38?+M9e>;BUXb6!~9=*@?_aJFRx!CNL={0=#T(^v5l# zMpcZ{c>>@Q!$8LMF*`TF`MHy_*RtwEL0FQ6RIt7a1!U}C0dUd?Gi zM$X1StY`6#kv}nv=O_i`-co(z5@!t{3BBQHb+2PyoW-{|P8+I@GIuz_y7aZ^0&g^J z1J>6cAe6LatWY?g`uJ>xo; literal 0 HcmV?d00001 diff --git a/photo21/static/lightgallery/lightgallery.min.js b/photo21/static/lightgallery/lightgallery.min.js new file mode 100644 index 0000000..f8b1ed6 --- /dev/null +++ b/photo21/static/lightgallery/lightgallery.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.2.1 | September 4th 2021 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;il){o=g;break}a===r.length-1&&(o=g)}var d=o.split("-"),h=parseInt(d[0],10),c=parseInt(d[1],10),u=e.width(),m=e.height()-s,p=Math.min(u,h),f=Math.min(m,c),v=Math.min(p/h,f/c);return{width:h*v,height:c*v}}},r=function(t,e,s,n,o){if(o){var r=i(t).find("img").first();if(r.get()){var l=e.get().getBoundingClientRect(),a=l.width,g=e.height()-(s+n),d=r.width(),h=r.height(),c=r.style(),u=(a-d)/2-r.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+i(window).scrollLeft()+l.left,m=(g-h)/2-r.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+i(window).scrollTop()+s;return"translate3d("+(u*=-1)+"px, "+(m*=-1)+"px, 0) scale3d("+d/o.width+", "+h/o.height+", 1)"}}},l=function(t,e,i,s){return'
\n \n
'},a=function(t,e,i,s,n,o){var r="',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),""})));return""+l+r},g=function(t){for(var e=[],i=[],s="",n=0;nr){s=i[l];break}return s},d=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},h=function(t,e,i,s){return'
\n
\n \n Play video\n \n \n \n \n \n \n \n
\n '+(e||"")+'\n \n
'},c=function(t,e,o,r){var l=[],a=function(){for(var t=0,e=0,i=arguments.length;e-1&&(h=d),h&&(e[h]=g.value)}}var c=i(t),u=c.find("img").first().attr("alt"),m=c.attr("title"),p=r?c.attr(r):c.find("img").first().attr("src");e.thumb=p,o&&!e.subHtml&&(e.subHtml=m||u||""),e.alt=u||m||"",l.push(e)})),l},u=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},m={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},p="lgAfterAppendSlide",f="lgInit",v="lgHasVideo",y="lgContainerResize",b="lgUpdateSlides",C="lgAfterAppendSubHtml",I="lgBeforeOpen",w="lgAfterOpen",x="lgSlideItemLoad",S="lgBeforeSlide",T="lgAfterSlide",E="lgPosterClick",O="lgDragStart",L="lgDragMove",D="lgDragEnd",z="lgBeforeNextSlide",G="lgBeforePrevSlide",M="lgBeforeClose",k="lgAfterClose",A=0,B=function(){function s(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(A++,this.lgId=A,this.el=t,this.LGel=i(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return s.prototype.generateSettings=function(e){if(this.settings=t(t({},m),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():u()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},s.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},s.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(f,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},s.prototype.openGalleryOnItemClick=function(){for(var t=this,s=function(s){var o=n.items[s],r=i(o),l=e.generateUUID();r.attr("data-lg-id",l).on("click.lgcustom-item-"+l,(function(e){e.preventDefault();var i=t.settings.index||s;t.openGallery(i,o)}))},n=this,o=0;o '+this.settings.prevHtml+' \n "),".lg-item"!==this.settings.appendSubHtmlTo&&(s='
');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var o=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",r=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",l="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),a=this.settings.closable&&this.settings.showCloseIcon?'':"",g=this.settings.showMaximizeIcon?'':"",d='\n \n ";i(this.settings.container).css("position","relative").append(d),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var h=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(h+="lg-grab "),this.settings.showAfterLoad&&(h+="lg-show-after-load"),this.outer.addClass(h),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append(''),this.counter(),i(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},s.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=o(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var n=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",n)}this.LGel.trigger(y)}},s.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},s.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(b)}else this.closeGallery()},s.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=i(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return c(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},s.prototype.openGallery=function(t,e){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var l="";n.forEach((function(t){l=l+'
'})),this.$inner.append(l),this.addHtml(t);var a="";this.mediaContainerPosition=this.getMediaContainerPosition();var g=this.mediaContainerPosition,d=g.top,h=g.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,h),this.zoomFromOrigin&&e&&(this.currentImageSize=o(e,this.outer,d+h,this.galleryItems[t].__slideVideoInfo&&this.settings.videoMaxSize),a=r(e,this.outer,d,h,this.currentImageSize)),this.zoomFromOrigin&&a||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(I),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=i(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&a){var e=s.getSlideItem(t);e.css("transform",a),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&a||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(w)})),document.body===this.settings.container&&i("html").addClass("lg-on")}},s.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},s.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},s.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},s.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},s.prototype.counter=function(){if(this.settings.counter){var t='
\n '+(this.index+1)+' /\n '+this.galleryItems.length+"
";this.outer.find(this.settings.appendCounterTo).append(t)}},s.prototype.addHtml=function(t){var e,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!s)if(e){var n=e.substring(0,1);"."!==n&&"#"!==n||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?i(this.items).eq(t).find(e).first().html():i(e).first().html())}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(e);else{var o=i(this.getSlideItemId(t));s?o.load(s):o.append('
'+e+"
")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(C,{index:t})},s.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},s.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},s.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},s.prototype.getDummyImageContent=function(t,e,s){var n;if(this.settings.dynamic||(n=i(this.items).eq(e)),n){var o=void 0;if(!(o=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var r="';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},s.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,g=n?'alt="'+n+'"':"",d=' '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(e,i,g):a(i,t,g,o,r,l))+"";e.prepend(d)},s.prototype.onLgObjectLoad=function(t,e,i,s,n){var o=this;n&&this.LGel.trigger(x,{index:e,delay:i||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,e,i,s,n)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('Oops... Failed to load content...')}))}),s)},s.prototype.handleLgObjectLoad=function(t,e,i,s,n){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(x,{index:e,delay:i||0})}),s)},s.prototype.isVideo=function(t,e){if(!t)return this.galleryItems[e].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var i=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),s=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return i?{youtube:i}:s?{vimeo:s}:n?{wistia:n}:void 0},s.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=e.isVideo(t.src,i)}))},s.prototype.loadContent=function(t,e){var s=this,n=this.galleryItems[t],r=i(this.getSlideItemId(t)),c=n.poster,u=n.srcset,m=n.sizes,f=n.sources,y=n.src,b=n.video,C=b&&"string"==typeof b?JSON.parse(b):b;if(n.responsive){var I=n.responsive.split(",");y=g(I)||y}var w=n.__slideVideoInfo,x="",S=!!n.iframe;if(!r.hasClass("lg-loaded")){if(w){var T=this.mediaContainerPosition,E=T.top,O=T.bottom,L=o(this.items[t],this.outer,E+O,w&&this.settings.videoMaxSize);x=this.getVideoContStyle(L)}if(S){var D=l(this.settings.iframeWidth,this.settings.iframeHeight,y,n.iframeTitle);r.prepend(D)}else if(c){var z="",G=!this.lGalleryOn,M=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;M&&(z=this.getDummyImageContent(r,t,""));D=h(c,z||"",x,w);r.prepend(D);var k=(M?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!0,isFirstSlide:G})}),k)}else if(w){D='
';r.prepend(D),this.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!1})}else if(this.setImgMarkup(y,r,t),u||f){var A=r.find(".lg-object");this.initPictureFill(A)}this.LGel.trigger(p,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var B=0,P=0;this.lGalleryOn||(P=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),P&&!i(document.body).hasClass("lg-from-hash")&&(B=P),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if(r.find(".lg-img-wrap").append(a(t,y,"",u,m,n.sources)),u||f){var e=r.find(".lg-object");s.initPictureFill(e)}s.onLgObjectLoad(r,t,P,B,!0);var i=r.find(".lg-object").first();d(i.get())?s.loadContentOnLoad(t,r,B):i.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,r,B)}))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.onLgObjectLoad(r,t,P,B,!1),w&&w.html5&&!c&&r.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},s.prototype.loadContentOnLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},s.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&i("#"+t).remove()})),n},s.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},s.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},s.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},s.prototype.slide=function(t,e,i,s){var n=this,r=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,r),!this.lGalleryOn||r!==t){var l=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var a=this.getSlideItem(t),g=this.getSlideItem(r),d=this.galleryItems[t],h=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),h){var c=this.mediaContainerPosition,u=c.top,m=c.bottom,p=o(this.items[t],this.outer,u+m,h&&this.settings.videoMaxSize);this.resizeVideoSlide(t,p)}if(this.LGel.trigger(S,{prevIndex:r,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(tr&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var f=void 0,v=void 0;l>2?(f=t-1,v=t+1,(0===t&&r===l-1||t===l-1&&0===r)&&(v=0,f=l-1)):(f=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(f).addClass("lg-prev-slide"),a.addClass("lg-current")}else this.makeSlideAnimation(s,a,g);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){n.lGalleryOn&&n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(e?0:this.settings.slideDelay)),setTimeout((function(){n.lgBusy=!1,g.removeClass("lg-slide-progress"),n.LGel.trigger(T,{prevIndex:r,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},s.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},s.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},s.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},s.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var g=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",g);var d=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,d,d),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},s.prototype.touchEnd=function(t,e,s){var n,o=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){o.$container.removeClass("lg-dragging-vertical"),o.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var r=!0;if("horizontal"===o.swipeDirection){n=t.pageX-e.pageX;var l=Math.abs(t.pageX-e.pageX);n<0&&l>o.settings.swipeThreshold?(o.goToNextSlide(!0),r=!1):n>0&&l>o.settings.swipeThreshold&&(o.goToPrevSlide(!0),r=!1)}else if("vertical"===o.swipeDirection){if(n=Math.abs(t.pageY-e.pageY),o.settings.closable&&o.settings.swipeToClose&&n>100)return void o.closeGallery();o.$backdrop.css("opacity",1)}if(o.outer.find(".lg-item").removeAttr("style"),r&&Math.abs(t.pageX-e.pageX)<5){var a=i(s.target);o.isPosterElement(a)&&o.LGel.trigger(E)}o.swipeDirection=void 0})),setTimeout((function(){o.outer.hasClass("lg-dragging")||"lg-slide"===o.settings.mode||o.outer.removeClass("lg-slide")}),this.settings.speed+100)},s.prototype.enableSwipe=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!i(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(i){o&&"swipe"===t.touchAction&&1===i.targetTouches.length&&(s={pageX:i.targetTouches[0].pageX,pageY:i.targetTouches[0].pageY},t.touchMove(e,s,i),n=!0)})),this.$inner.on("touchend.lg",(function(r){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,e,r);else if(o){var l=i(r.target);t.isPosterElement(l)&&t.LGel.trigger(E)}t.touchAction=void 0,o=!1}})))},s.prototype.enableDrag=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);(i(s.target).hasClass("lg-item")||o.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(O))))})),i(window).on("mousemove.lg.global"+this.lgId,(function(i){n&&t.lgOpened&&(o=!0,s={pageX:i.pageX,pageY:i.pageY},t.touchMove(e,s),t.LGel.trigger(L))})),i(window).on("mouseup.lg.global"+this.lgId,(function(r){if(t.lgOpened){var l=i(r.target);o?(o=!1,t.touchEnd(s,e,r),t.LGel.trigger(D)):t.isPosterElement(l)&&t.LGel.trigger(E),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},s.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(i(e.target))&&t.LGel.trigger(E)}))},s.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},s.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},s.prototype.keyPress=function(){var t=this;i(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},s.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},s.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},s.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},s.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(e){!e.deltaY||t.galleryItems.length<2||(e.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),e.preventDefault())}))},s.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},s.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},s.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},s.prototype.invalidateItems=function(){for(var t=0;t\n
\n
\n ';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},o.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",(function(s){t.thumbTotalWidth>t.thumbOuterWidth&&(s.preventDefault(),e.cords.startX=s.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))})),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,(function(s){t.core.lgOpened&&i&&(e.cords.endX=s.pageX,e=t.onThumbTouchMove(e))})),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,(function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))}))},o.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)})),this.$lgThumb.on("touchmove.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))})),this.$lgThumb.on("touchend.lg",(function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0}))},o.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout((function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)}),50),setTimeout((function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")}),200)},o.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},o.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},o.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},o.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},o.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,s=Math.abs(i)/e;return s>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((s+=1)>2&&(s+=1),s+=s*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(s-1,2)+"settings"),i*=s,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)\n \n '},o.prototype.getThumbItemHtml=function(t){for(var e="",i=0;i'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-components-open")})))},o.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,(function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))}))},o.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},o}()})); diff --git a/photo21/static/lightgallery/plugins/zoom/lg-zoom.min.js b/photo21/static/lightgallery/plugins/zoom/lg-zoom.min.js new file mode 100644 index 0000000..3ca1090 --- /dev/null +++ b/photo21/static/lightgallery/plugins/zoom/lg-zoom.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.2.1 | September 4th 2021 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgZoom=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,o=1,i=arguments.length;o':"";this.settings.actualSize&&(t+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},h.prototype.enableZoom=function(t){var e=this,o=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){e.isImageSlide()&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getModifier=function(t,e,o){var i=t;t=Math.abs(t);var s=this.getCurrentTransform(o);if(!s)return 1;var a=1;if("X"===e){var r=Math.sign(parseFloat(s[0]));0===t||180===t?a=1:90===t&&(a=-90===i&&1===r||90===i&&-1===r?-1:1),a*=r}else{var n=Math.sign(parseFloat(s[3]));if(0===t||180===t)a=1;else if(90===t){var l=parseFloat(s[1]),g=parseFloat(s[2]);a=Math.sign(l*g*i*n)}a*=n}return a},h.prototype.getImageSize=function(t,e,o){return 90===Math.abs(e)&&(o="x"===o?"y":"x"),t[{y:"offsetHeight",x:"offsetWidth"}[o]]},h.prototype.getDragCords=function(t,e){return 90===e?{x:t.pageY,y:t.pageX}:{x:t.pageX,y:t.pageY}},h.prototype.getSwipeCords=function(t,e){var o=t.targetTouches[0].pageX,i=t.targetTouches[0].pageY;return 90===e?{x:i,y:o}:{x:o,y:i}},h.prototype.getDragAllowedAxises=function(t,e){e=e||this.scale||1;var o=this.imageYSize*e>this.containerRect.height,i=this.imageXSize*e>this.containerRect.width;return 90===t?{allowX:o,allowY:i}:{allowX:i,allowY:o}},h.prototype.getCurrentTransform=function(t){if(t){var e=window.getComputedStyle(t,null),o=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";return"none"!==o?o.split("(")[1].split(")")[0].split(","):void 0}},h.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.getCurrentTransform(t);return e?Math.round(Math.atan2(parseFloat(e[1]),parseFloat(e[0]))*(180/Math.PI)):0},h.prototype.setZoomEssentials=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get();this.rotateValue=this.getCurrentRotation(e),this.imageYSize=this.getImageSize(t.get(),this.rotateValue,"y"),this.imageXSize=this.getImageSize(t.get(),this.rotateValue,"x"),this.containerRect=this.core.outer.get().getBoundingClientRect(),this.modifierX=this.getModifier(this.rotateValue,"X",e),this.modifierY=this.getModifier(this.rotateValue,"Y",e)},h.prototype.zoomImage=function(t){var e,o,i=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left,s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.containerRect.height-this.imageYSize-n*this.modifierX)/2+this.scrollTop+this.containerRect.top;1===t&&(this.positionChanged=!1);var g=this.getDragAllowedAxises(Math.abs(this.rotateValue),t),c=g.allowY,h=g.allowX;this.positionChanged&&(e=this.left/(this.scale-1),o=this.top/(this.scale-1),this.pageX=Math.abs(e)+i,this.pageY=Math.abs(o)+l,this.positionChanged=!1);var m=this.getPossibleSwipeDragCords(this.rotateValue,t),u=(t-1)*(i-this.pageX),d=(t-1)*(l-this.pageY);h?this.isBeyondPossibleLeft(u,m.minX)?u=m.minX:this.isBeyondPossibleRight(u,m.maxX)&&(u=m.maxX):t>1&&(um.maxX&&(u=m.maxX)),c?this.isBeyondPossibleTop(d,m.minY)?d=m.minY:this.isBeyondPossibleBottom(d,m.maxY)&&(d=m.maxY):t>1&&(dm.maxY&&(d=m.maxY)),this.setZoomStyles({x:u,y:d,scale:t})},h.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first(),i=e.parent();this.scale=t.scale,e.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var s="translate3d("+t.x+"px, "+t.y+"px, 0)";i.css("transform",s),this.left=t.x,this.top=t.y},h.prototype.setActualSize=function(t,e){var o=this;if(this.isImageSlide()&&!this.core.outer.hasClass("lg-first-slide-loading")){var i=this.getCurrentImageActualSizeScale();this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(i),this.setPageCords(e),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),10)}},h.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),o=this.core.galleryItems[t].width;return o?parseFloat(o):e.get().naturalWidth},h.prototype.getActualSizeScale=function(t,e){return t>e?t/e||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},h.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.targetTouches[0].pageX,e.y=t.pageY||t.targetTouches[0].pageY;else{var o=this.core.outer.get().getBoundingClientRect();e.x=o.width/2+o.left,e.y=o.height/2+this.scrollTop+o.top}return e},h.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},h.prototype.beginZoom=function(t){(this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1)?(this.core.outer.addClass("lg-zoomed"),this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)):this.resetZoom();return t>1},h.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},h.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",(function(e){t.$LG(e.target).hasClass("lg-image")&&t.setActualSize(t.core.index,e)})),this.core.outer.on("touchstart.lg",(function(o){var i=t.$LG(o.target);1===o.targetTouches.length&&i.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,o.preventDefault(),t.setActualSize(t.core.index,o)):e=setTimeout((function(){e=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+n+".zoom "+g+".zoom "+c+".zoom",(function(){t.core.lgOpened&&t.isImageSlide()&&(t.setPageCords(),t.setZoomEssentials(),t.zoomImage(t.scale))})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){t.core.outer.find(".lg-current .lg-image").get()&&(t.scale-=t.settings.scale,t.scale=t.getScale(t.scale),t.beginZoom(t.scale),t.zoomImage(t.scale))})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){t.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){t.setActualSize(t.core.index)})),this.core.LGel.on(i+".zoom",(function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1})),this.core.LGel.on(r+".zoom",(function(e){var o=e.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.resetZoom(o),t.isImageSlide()&&t.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1}},h.prototype.zoomIn=function(t){this.isImageSlide()&&(t?this.scale=t:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale))},h.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(t){return Math.sqrt((t.targetTouches[0].pageX-t.targetTouches[1].pageX)*(t.targetTouches[0].pageX-t.targetTouches[1].pageX)+(t.targetTouches[0].pageY-t.targetTouches[1].pageY)*(t.targetTouches[0].pageY-t.targetTouches[1].pageY))},h.prototype.pinchZoom=function(){var t=this,e=0,o=!1,i=1,s=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",(function(o){s=t.core.getSlideItem(t.core.index),t.isImageSlide()&&(2!==o.targetTouches.length||t.core.outer.hasClass("lg-first-slide-loading")||!t.$LG(o.target).hasClass("lg-item")&&!s.get().contains(o.target)||(i=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.core.touchAction="pinch",e=t.getTouchDistance(o)))})),this.core.$inner.on("touchmove.lg",(function(a){if(2===a.targetTouches.length&&"pinch"===t.core.touchAction&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){a.preventDefault();var r=t.getTouchDistance(a),n=e-r;!o&&Math.abs(n)>5&&(o=!0),o&&(t.scale=Math.max(1,i+.008*-n),t.zoomImage(t.scale))}})),this.core.$inner.on("touchend.lg",(function(i){"pinch"===t.core.touchAction&&(t.$LG(i.target).hasClass("lg-item")||s.get().contains(i.target))&&(o=!1,e=0,t.scale<=1?t.resetZoom():(t.scale=t.getScale(t.scale),t.zoomImage(t.scale),t.core.outer.addClass("lg-zoomed")),t.core.touchAction=void 0)}))},h.prototype.touchendZoom=function(t,e,o,i,s,a){var r=e.x-t.x,n=e.y-t.y,l=Math.abs(r)/s+1,g=Math.abs(n)/s+1;l>2&&(l+=1),g>2&&(g+=1),r*=l,n*=g;var c=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),h={};h.x=this.left+r*this.modifierX,h.y=this.top+n*this.modifierY;var m=this.getPossibleSwipeDragCords(a);(Math.abs(r)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(h.y,m.minY)?h.y=m.minY:this.isBeyondPossibleBottom(h.y,m.maxY)&&(h.y=m.maxY)),o&&(this.isBeyondPossibleLeft(h.x,m.minX)?h.x=m.minX:this.isBeyondPossibleRight(h.x,m.maxX)&&(h.x=m.maxX)),i?this.top=h.y:h.y=this.top,o?this.left=h.x:h.x=this.left,this.setZoomSwipeStyles(c,h),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(t,e,o,i,s){var a={};if(i){if(a.y=this.top+(e.y-t.y)*this.modifierY,this.isBeyondPossibleTop(a.y,s.minY)){var r=s.minY-a.y;a.y=s.minY-r/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var n=a.y-s.maxY;a.y=s.maxY+n/6}}else a.y=this.top;if(o){if(a.x=this.left+(e.x-t.x)*this.modifierX,this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var g=a.x-s.maxX;a.x=s.maxX+g/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},h.prototype.isBeyondPossibleRight=function(t,e){return t<=e},h.prototype.isBeyondPossibleTop=function(t,e){return t>=e},h.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},h.prototype.isImageSlide=function(){var t=this.core.galleryItems[this.core.index];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(t,e){var o=e||this.scale||1,i=Math.abs(o),s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.imageYSize-this.containerRect.height)/2+n*this.modifierX,g=this.containerRect.height-this.imageYSize*i+l,c=(this.imageXSize-this.containerRect.width)/2,h=this.containerRect.width-this.imageXSize*i+c,m={minY:l,maxY:g,minX:c,maxX:h};return 90===Math.abs(t)&&(m={minY:c,maxY:h,minX:l,maxX:g}),m},h.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},h.prototype.zoomSwipe=function(){var t,e,o=this,i={},s={},a=!1,r=!1,n=!1,l=new Date,g=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.isImageSlide()&&(g=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||g.get().contains(s.target))&&1===s.targetTouches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",e=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(Math.abs(o.rotateValue));n=a.allowY,((r=a.allowX)||n)&&(i=o.getSwipeCords(s,Math.abs(o.rotateValue))),t=o.getPossibleSwipeDragCords(o.rotateValue),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.targetTouches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||g.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l,Math.abs(o.rotateValue));var c=o.getZoomSwipeCords(i,s,r,n,t);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(e,c))}})),this.core.$inner.on("touchend.lg",(function(t){if("zoomSwipe"===o.core.touchAction&&(o.$LG(t.target).hasClass("lg-item")||g.get().contains(t.target))){if(o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var e=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,r,n,e,o.rotateValue)}}))},h.prototype.zoomDrag=function(){var t,e,o,i,s=this,a={},r={},n=!1,l=!1,g=!1,c=!1;this.core.outer.on("mousedown.lg.zoom",(function(e){if(s.isImageSlide()){var r=s.core.getSlideItem(s.core.index);if(s.$LG(e.target).hasClass("lg-item")||r.get().contains(e.target)){t=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(Math.abs(s.rotateValue));c=l.allowY,g=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(e.target).hasClass("lg-object")&&(g||c)&&(e.preventDefault(),a=s.getDragCords(e,Math.abs(s.rotateValue)),o=s.getPossibleSwipeDragCords(s.rotateValue),n=!0,s.core.outer.get().scrollLeft+=1,s.core.outer.get().scrollLeft-=1,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(t){if(n){l=!0,r=s.getDragCords(t,Math.abs(s.rotateValue));var e=s.getZoomSwipeCords(a,r,g,c,o);s.setZoomSwipeStyles(i,e)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(n){if(e=new Date,n=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==r.x||a.y!==r.y)){r=s.getDragCords(o,Math.abs(s.rotateValue));var i=e.valueOf()-t.valueOf();s.touchendZoom(a,r,g,c,i,s.rotateValue)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom()},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()})); diff --git a/photo21/templates/photologue/gallery_archive.html b/photo21/templates/photologue/gallery_archive.html new file mode 100644 index 0000000..d68fcee --- /dev/null +++ b/photo21/templates/photologue/gallery_archive.html @@ -0,0 +1,36 @@ +{% extends "photologue/root.html" %} +{% load i18n %} + +{% block title %}{% trans "Latest photo galleries" %}{% endblock %} + +{% block content %} +
+
+

{% trans "Latest photo galleries" %}

+
+
+ +
+ +
+ {% if latest %} +
+ {% for gallery in latest %} +
+ {% include "photologue/includes/gallery_sample.html" %} +
+ {% endfor %} +
+ {% else %} +

{% trans "No galleries were found" %}.

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/photo21/templates/photologue/gallery_archive_year.html b/photo21/templates/photologue/gallery_archive_year.html new file mode 100644 index 0000000..63db8b0 --- /dev/null +++ b/photo21/templates/photologue/gallery_archive_year.html @@ -0,0 +1,30 @@ +{% extends "photologue/root.html" %} +{% load i18n %} + +{% block title %}{% blocktrans with show_year=year|date:"Y" %}Galleries for {{ show_year }}{% endblocktrans %}{% endblock %} + +{% block content %} +
+
+

{% blocktrans with show_year=year|date:"Y" %}Galleries for {{ show_year }}{% endblocktrans %}

+
+
+
+ +
+ {% if object_list %} +
+ {% for gallery in object_list %} +
+ {% include "photologue/includes/gallery_sample.html" %} +
+ {% endfor %} +
+ {% else %} +

{% trans "No galleries were found." %}

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/photo21/templates/photologue/gallery_detail.html b/photo21/templates/photologue/gallery_detail.html new file mode 100644 index 0000000..ab7108a --- /dev/null +++ b/photo21/templates/photologue/gallery_detail.html @@ -0,0 +1,38 @@ +{% extends "photologue/root.html" %} +{% load static i18n %} + +{% block title %}{{ gallery.title }}{% endblock %} + +{% block extracss %} + + + +{% endblock %} + +{% block extrajs %} + + + + +{% endblock %} + +{% block content %} +
+
+

{{ gallery.title }}

+

{% trans "Published" %} {{ gallery.date_added }}

+ {% if gallery.description %}

{{ gallery.description|safe }}

{% endif %} + +
+
+{% endblock %} diff --git a/photo21/templates/photologue/includes/gallery_sample.html b/photo21/templates/photologue/includes/gallery_sample.html new file mode 100644 index 0000000..8dcc05c --- /dev/null +++ b/photo21/templates/photologue/includes/gallery_sample.html @@ -0,0 +1,13 @@ +{% load i18n %} + +
+ {% for photo in gallery.sample %} + {{ photo.title }} + {% endfor %} +
+
{{ gallery.title }}
+

{% trans "Published" %} {{ gallery.date_added }}

+ {% if gallery.description %}

{{ gallery.description|safe }}

{% endif %} + +
+
\ No newline at end of file