commit 71665a1fd04963d9e097c82b90d2a42847dd9e51 Author: Robert Schubert Date: Fri Feb 7 05:41:54 2025 +0100 initiale Version (klassische Seitennavigation, keine Themes) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2f3b5a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*~ +.jekyll-cache/ +_site/ +Gemfile.lock diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..ef42346 --- /dev/null +++ b/Gemfile @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +# gem "rails" +gem "jekyll" + +group :jekyll_plugins do + gem "jekyll-youtube" + gem "mini_magick" + gem "exifr", :git => "https://codeberg.org/rwv/exifr.git" + gem "jekyll-exiftag", :git => "https://github.com/jimmyjxiao/jekyll-exiftag.git" + gem "jquery" + gem "nokogiri" +end diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..5fa68c6 --- /dev/null +++ b/_config.yml @@ -0,0 +1,14 @@ +future: true +#plugins: +# - jekyll-youtube +exclude: + - .gitignore +#safe: false +mini_magick: + photoFolders: + source: assets/img/albums + destination: assets/img/thumbnails + resize: "320x240^" + #resize: "320x240!" + gravity: "center" + extent: "320x240" diff --git a/_data/count1.csv b/_data/count1.csv new file mode 100644 index 0000000..9a27826 --- /dev/null +++ b/_data/count1.csv @@ -0,0 +1,9 @@ +Name,Stimmen +Bill Gates,11 +Tedros,2 +Merz,4 +Musk,4 +Höcke,2 +Habeck,5 +Baerbock,3 +Franziskus,1 diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..78d7320 --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,6 @@ +- name: Hauptseite + link: / +- name: Über uns + link: /about.html +- name: Meldungen + link: /blog.html diff --git a/_includes/album.html b/_includes/album.html new file mode 100644 index 0000000..1691ed6 --- /dev/null +++ b/_includes/album.html @@ -0,0 +1,16 @@ +
+ + {%- for image in site.static_files -%} + {%- if image.path contains 'img/albums' and image.path contains include.albumname -%} + + + + {%- endif -%} + {%- endfor -%} + +
+ diff --git a/_includes/datatable.html b/_includes/datatable.html new file mode 100644 index 0000000..271e7a3 --- /dev/null +++ b/_includes/datatable.html @@ -0,0 +1,72 @@ + + {% for row in include.datafile %} + {% if forloop.first %} + + {% for pair in row %} + {% assign column = forloop.index0 %} + + {% endfor %} + + {% endif %} + + {% tablerow pair in row %} + {{ pair[1] }} + {% endtablerow %} + {% endfor %} +
{{ pair[0] }}
+ diff --git a/_includes/navigation.html b/_includes/navigation.html new file mode 100644 index 0000000..34ae27b --- /dev/null +++ b/_includes/navigation.html @@ -0,0 +1,15 @@ + diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..5e7fef1 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,21 @@ + + + + + {{ page.title }} | Scherbengericht + + + + + + + + + + + + + {% include navigation.html %} + {{ content }} + + diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..584775b --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,7 @@ +--- +layout: default +--- +

{{ page.title }}

+

{{ page.date | date_to_string }}

+ +{{ content }} diff --git a/_plugins/jekyll_minimagick.rb b/_plugins/jekyll_minimagick.rb new file mode 100644 index 0000000..ce74c7d --- /dev/null +++ b/_plugins/jekyll_minimagick.rb @@ -0,0 +1,80 @@ +require 'mini_magick' + +module Jekyll + module JekyllMinimagick + + class GeneratedImageFile < Jekyll::StaticFile + # Initialize a new GeneratedImage. + # +site+ is the Site + # +base+ is the String path to the + # +dir+ is the String path between and the file + # +name+ is the String filename of the file + # +preset+ is the Preset hash from the config. + # + # Returns + def initialize(site, base, dir, name, preset) + @site = site + @base = base + @dir = dir + @name = name + @dst_dir = preset.delete('destination') + @src_dir = preset.delete('source') + @commands = preset + @relative_path = File.join(*[@dir, @name].compact) + @extname = File.extname(@name) + end + + # Obtains source file path by substituting the preset's source directory + # for the destination directory. + # + # Returns source file path. + def path + File.join(@base, @dir.sub(@dst_dir, @src_dir), @name) + end + + # Use MiniMagick to create a derivative image at the destination + # specified (if the original is modified). + # +dest+ is the String path to the destination dir + # + # Returns false if the file was not modified since last time (no-op). + def write(dest) + dest_path = destination(dest) + + return false if File.exist? dest_path and !modified? + self.class.mtimes[path] = mtime + + FileUtils.mkdir_p(File.dirname(dest_path)) + image = ::MiniMagick::Image.open(path) + image.combine_options do |c| + @commands.each_pair do |command, arg| + c.send command, arg + end + end + image.write dest_path + + true + end + + end + + class MiniMagickGenerator < Generator + safe true + + # Find all image files in the source directories of the presets specified + # in the site config. Add a GeneratedImageFile to the static_files stack + # for later processing. + def generate(site) + return unless site.config['mini_magick'] + + site.config['mini_magick'].each_pair do |name, preset| + Dir.chdir preset['source'] do + Dir.glob(File.join("**", "*.{png,jpg,jpeg,gif}")) do |source| + site.static_files << GeneratedImageFile.new(site, site.source, preset['destination'], source, preset.clone) + end + end + end + end + end + + end +end diff --git a/_posts/2025-02-02-gallery.md b/_posts/2025-02-02-gallery.md new file mode 100644 index 0000000..ae409d3 --- /dev/null +++ b/_posts/2025-02-02-gallery.md @@ -0,0 +1,14 @@ +--- +layout: post +title: "Eindrücke ..." +--- +So könnte ein Bericht vom Event aussehen: + +

Stimmen:

+{% include datatable.html datafile=site.data.count1 id="count1" %} + +

Video:

+{% youtube "https://www.youtube.com/watch?v=ho8-vK0L1_8" %} + +

Fotos:

+{% include album.html albumname="testgal" %} diff --git a/_posts/2025-02-02-herald.md b/_posts/2025-02-02-herald.md new file mode 100644 index 0000000..cbbcd3f --- /dev/null +++ b/_posts/2025-02-02-herald.md @@ -0,0 +1,14 @@ +--- +layout: post +title: "Ankündigung: erster Termin am 22.2.2025 in Dresden" +--- + +Wir laden alle herzlich ein, +am 22. Februar auf dem Neumarkt in Dresden, +[zwischen Frauenkirche und Martin-Luther-Denkmal](https://www.openstreetmap.org/#map=19/51.051655/13.741195), +an unserem ersten Versuch teilzunehmen! + +Abgestimmt werden kann zwischen 12 und 19 Uhr, +danach werden die Stimmen ausgezählt und +öffentlich vorgetragen. + diff --git a/_sass/main.scss b/_sass/main.scss new file mode 100644 index 0000000..deac9e1 --- /dev/null +++ b/_sass/main.scss @@ -0,0 +1,34 @@ +.current-site { + color: green; +} +body { + font-size: 24px; + max-width: 72ch; +} +.larger { + font-size: larger; +} +.xx-large { + font-size: xx-large; +} +.wrap { + display: flex; + max-width: max-content; +} +.wrap1 { + margin: 0px; + width: 30%; +} +.wrap2 { + margin: 0px; /* remove all margins to fit two divs in the container */ + width: 70%; +} +@media (max-width: 767px) { + .wrap { + flex-direction: column; + } + .wrap1, + .wrap2 { + width: auto; + } +} diff --git a/about.md b/about.md new file mode 100644 index 0000000..e59120e --- /dev/null +++ b/about.md @@ -0,0 +1,13 @@ +--- +title: Über uns +layout: default +--- +# Über uns + +Wir sind Bürger der Stadt Dresden, +ohne Zugehörigkeit zu politischen Parteien, +Vereinen oder Organisationen. + +Wir suchen angesichts der gegenwärtigen +**Krise der Demokratie** (oder des Staates) +nach Ideen für eine Erneuerung des politischen Systems. diff --git a/assets/css/lightgallery-bundle.css b/assets/css/lightgallery-bundle.css new file mode 100644 index 0000000..b876f1e --- /dev/null +++ b/assets/css/lightgallery-bundle.css @@ -0,0 +1,1443 @@ +@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: 1084; + 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-item:not(.lg-zoomable) .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont { + opacity: 0; + -moz-transform: scale3d(0.5, 0.5, 0.5); + -o-transform: scale3d(0.5, 0.5, 0.5); + -ms-transform: scale3d(0.5, 0.5, 0.5); + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + will-change: transform, opacity; + -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; + transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important; +} +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont, +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont { + opacity: 1; + -moz-transform: scale3d(1, 1, 1); + -o-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); +} + +.lg-icon:focus-visible { + color: #fff; + border-radius: 3px; + outline: 1px dashed rgba(255, 255, 255, 0.6); +} + +.lg-toolbar .lg-icon:focus-visible { + border-radius: 8px; + outline-offset: -5px; +} + +.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: rgb(169, 7, 7); +} +.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); +} + +.lg-outer .lg-video-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-video-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-video-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} +.lg-outer .lg-video-object { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 100%; + top: 0; + bottom: 0; + z-index: 3; +} +.lg-outer .lg-video-poster { + z-index: 1; +} +.lg-outer .lg-has-video .lg-video-object { + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.3s ease-in; + -o-transition: opacity 0.3s ease-in; + transition: opacity 0.3s ease-in; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster, +.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button { + opacity: 0 !important; +} +.lg-outer .lg-has-video.lg-video-loaded .lg-video-object { + opacity: 1; +} + +@keyframes lg-play-stroke { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -35px; + } + 100% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -124px; + } +} +@keyframes lg-play-rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.lg-video-play-button { + width: 18%; + max-width: 140px; + position: absolute; + top: 50%; + left: 50%; + z-index: 2; + cursor: pointer; + transform: translate(-50%, -50%) scale(1); + will-change: opacity, transform; + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + -o-transition: -o-transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; + transition: transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28), opacity 0.1s; +} +.lg-video-play-button:hover .lg-video-play-icon-bg, +.lg-video-play-button:hover .lg-video-play-icon { + opacity: 1; +} + +.lg-video-play-icon-bg { + fill: none; + stroke-width: 3%; + stroke: #fcfcfc; + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} + +.lg-video-play-icon-circle { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + fill: none; + stroke-width: 3%; + stroke: rgba(30, 30, 30, 0.9); + stroke-opacity: 1; + stroke-linecap: round; + stroke-dasharray: 200; + stroke-dashoffset: 200; +} + +.lg-video-play-icon { + position: absolute; + width: 25%; + max-width: 120px; + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + opacity: 0.6; + will-change: opacity; + -webkit-transition: opacity 0.12s ease-in; + -o-transition: opacity 0.12s ease-in; + transition: opacity 0.12s ease-in; +} +.lg-video-play-icon .lg-video-play-icon-inner { + fill: #fcfcfc; +} + +.lg-video-loading .lg-video-play-icon-circle { + animation: lg-play-rotate 2s linear 0.25s infinite, lg-play-stroke 1.5s ease-in-out 0.25s infinite; +} + +.lg-video-loaded .lg-video-play-button { + opacity: 0; + transform: translate(-50%, -50%) scale(0.7); +} + +.lg-progress-bar { + background-color: #333; + height: 5px; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1083; + opacity: 0; + will-change: opacity; + -webkit-transition: opacity 0.08s ease 0s; + -moz-transition: opacity 0.08s ease 0s; + -o-transition: opacity 0.08s ease 0s; + transition: opacity 0.08s ease 0s; +} +.lg-progress-bar .lg-progress { + background-color: rgb(169, 7, 7); + height: 5px; + width: 0; +} +.lg-progress-bar.lg-start .lg-progress { + width: 100%; +} +.lg-show-autoplay .lg-progress-bar { + opacity: 1; +} + +.lg-autoplay-button:after { + content: "\e01d"; +} +.lg-show-autoplay .lg-autoplay-button:after { + content: "\e01a"; +} +.lg-single-item .lg-autoplay-button { + opacity: 0.75; + pointer-events: none; +} + +.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); + -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-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition { + transition: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition { + transform: scale3d(1, 1, 1) translate3d(-50%, -50%, 0px) !important; + max-width: none !important; + max-height: none !important; + top: 50% !important; + left: 50% !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x { + transform: scale3d(1, 1, 1) translate3d(-50%, 0, 0px) !important; + top: 0 !important; + left: 50% !important; + max-width: none !important; + max-height: none !important; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y, +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y { + transform: scale3d(1, 1, 1) translate3d(0, -50%, 0px) !important; + top: 50% !important; + left: 0% !important; + max-width: none !important; + max-height: none !important; +} + +.lg-icon.lg-zoom-in:after { + content: "\e311"; +} +.lg-actual-size .lg-icon.lg-zoom-in { + opacity: 1; + pointer-events: auto; +} +.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; +} + +.lg-outer .lg-pager-outer { + text-align: center; + z-index: 1080; + height: 10px; + margin-bottom: 10px; +} +.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { + overflow: visible; +} +.lg-outer.lg-single-item .lg-pager-outer { + display: none; +} +.lg-outer .lg-pager-cont { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; + vertical-align: top; + margin: 0 5px; +} +.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.lg-outer .lg-pager-cont.lg-pager-active .lg-pager { + box-shadow: 0 0 0 2px white inset; +} +.lg-outer .lg-pager-thumb-cont { + background-color: #fff; + color: #fff; + bottom: 100%; + height: 83px; + left: 0; + margin-bottom: 20px; + margin-left: -60px; + opacity: 0; + padding: 5px; + position: absolute; + width: 120px; + border-radius: 3px; + will-change: transform, opacity; + -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; + -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s; + transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); +} +.lg-outer .lg-pager-thumb-cont img { + width: 100%; + height: 100%; +} +.lg-outer .lg-pager { + background-color: rgba(255, 255, 255, 0.5); + border-radius: 50%; + box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; + display: block; + height: 12px; + -webkit-transition: box-shadow 0.3s ease 0s; + -o-transition: box-shadow 0.3s ease 0s; + transition: box-shadow 0.3s ease 0s; + width: 12px; +} +.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { + box-shadow: 0 0 0 8px white inset; +} +.lg-outer .lg-caret { + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px dashed; + bottom: -10px; + display: inline-block; + height: 0; + left: 50%; + margin-left: -5px; + position: absolute; + vertical-align: middle; + width: 0; +} + +.lg-fullscreen:after { + content: "\e20c"; +} +.lg-fullscreen-on .lg-fullscreen:after { + content: "\e20d"; +} + +.lg-outer .lg-dropdown-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: absolute; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer.lg-dropdown-active .lg-dropdown, +.lg-outer.lg-dropdown-active .lg-dropdown-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-dropdown-active .lg-share { + color: #fff; +} +.lg-outer .lg-dropdown { + background-color: #fff; + border-radius: 2px; + font-size: 14px; + list-style-type: none; + margin: 0; + padding: 10px 0; + position: absolute; + right: 0; + text-align: left; + top: 50px; + opacity: 0; + visibility: hidden; + -moz-transform: translate3d(0, 5px, 0); + -o-transform: translate3d(0, 5px, 0); + -ms-transform: translate3d(0, 5px, 0); + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + will-change: visibility, opacity, transform; + -webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + -o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; + transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s; +} +.lg-outer .lg-dropdown:after { + content: ""; + display: block; + height: 0; + width: 0; + position: absolute; + border: 8px solid transparent; + border-bottom-color: #fff; + right: 16px; + top: -16px; +} +.lg-outer .lg-dropdown > li:last-child { + margin-bottom: 0px; +} +.lg-outer .lg-dropdown > li:hover a { + color: #333; +} +.lg-outer .lg-dropdown a { + color: #333; + display: block; + white-space: pre; + padding: 4px 12px; + font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; +} +.lg-outer .lg-dropdown a:hover { + background-color: rgba(0, 0, 0, 0.07); +} +.lg-outer .lg-dropdown .lg-dropdown-text { + display: inline-block; + line-height: 1; + margin-top: -3px; + vertical-align: middle; +} +.lg-outer .lg-dropdown .lg-icon { + color: #333; + display: inline-block; + float: none; + font-size: 20px; + height: auto; + line-height: 1; + margin-right: 8px; + padding: 0; + vertical-align: middle; + width: auto; +} +.lg-outer .lg-share { + position: relative; +} +.lg-outer .lg-share:after { + content: "\e80d"; +} +.lg-outer .lg-share-facebook .lg-icon { + color: #3b5998; +} +.lg-outer .lg-share-facebook .lg-icon:after { + content: "\e904"; +} +.lg-outer .lg-share-twitter .lg-icon { + color: #00aced; +} +.lg-outer .lg-share-twitter .lg-icon:after { + content: "\e907"; +} +.lg-outer .lg-share-pinterest .lg-icon { + color: #cb2027; +} +.lg-outer .lg-share-pinterest .lg-icon:after { + content: "\e906"; +} + +.lg-comment-box { + width: 420px; + max-width: 100%; + position: absolute; + right: 0; + top: 0; + bottom: 0; + z-index: 9999; + background-color: #fff; + will-change: transform; + -moz-transform: translate3d(100%, 0, 0); + -o-transform: translate3d(100%, 0, 0); + -ms-transform: translate3d(100%, 0, 0); + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-comment-box .lg-comment-title { + margin: 0; + color: #fff; + font-size: 18px; +} +.lg-comment-box .lg-comment-header { + background-color: #000; + padding: 12px 20px; + position: absolute; + left: 0; + right: 0; + top: 0; +} +.lg-comment-box .lg-comment-body { + height: 100% !important; + padding-top: 43px !important; + width: 100% !important; +} +.lg-comment-box .fb-comments { + height: 100%; + width: 100%; + background: url("../img/loading.gif") no-repeat scroll center center #fff; + overflow-y: auto; + display: inline-block; +} +.lg-comment-box .fb-comments[fb-xfbml-state=rendered] { + background-image: none; +} +.lg-comment-box .fb-comments > span { + max-width: 100%; +} +.lg-comment-box .lg-comment-close { + position: absolute; + right: 5px; + top: 12px; + cursor: pointer; + font-size: 20px; + color: #999; + will-change: color; + -webkit-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; +} +.lg-comment-box .lg-comment-close:hover { + color: #fff; +} +.lg-comment-box .lg-comment-close:after { + content: "\e070"; +} +.lg-comment-box iframe { + max-width: 100% !important; + width: 100% !important; +} +.lg-comment-box #disqus_thread { + padding: 0 20px; +} + +.lg-outer .lg-comment-overlay { + background-color: rgba(0, 0, 0, 0.25); + bottom: 0; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + z-index: 1081; + opacity: 0; + visibility: hidden; + will-change: visibility, opacity; + -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; + transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s; +} +.lg-outer .lg-comment-toggle:after { + content: "\e908"; +} +.lg-outer.lg-comment-active .lg-comment-overlay { + -webkit-transition-delay: 0s; + transition-delay: 0s; + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); + opacity: 1; + visibility: visible; +} +.lg-outer.lg-comment-active .lg-comment-toggle { + color: #fff; +} +.lg-outer.lg-comment-active .lg-comment-box { + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + +.lg-outer .lg-img-rotate { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.4s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer[data-lg-slide-type=video] .lg-rotate-left, +.lg-outer[data-lg-slide-type=video] .lg-rotate-right, +.lg-outer[data-lg-slide-type=video] .lg-flip-ver, +.lg-outer[data-lg-slide-type=video] .lg-flip-hor, .lg-outer[data-lg-slide-type=iframe] .lg-rotate-left, +.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver, +.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor { + opacity: 0.75; + pointer-events: none; +} +.lg-outer .lg-img-rotate:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.lg-rotate-left:after { + content: "\e900"; +} + +.lg-rotate-right:after { + content: "\e901"; +} + +.lg-icon.lg-flip-hor, .lg-icon.lg-flip-ver { + font-size: 26px; +} + +.lg-flip-ver:after { + content: "\e903"; +} + +.lg-flip-hor:after { + content: "\e902"; +} + +.lg-medium-zoom-item { + cursor: zoom-in; +} + +.lg-medium-zoom .lg-outer { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grab img.lg-object { + cursor: zoom-out; +} +.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object { + cursor: zoom-out; +} + +.lg-relative-caption .lg-outer .lg-sub-html { + white-space: normal; + bottom: auto; + padding: 0; + background-image: none; +} +.lg-relative-caption .lg-outer .lg-relative-caption-item { + opacity: 0; + padding: 16px 0; + transition: 0.5s opacity ease; +} +.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item { + 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-overlay-open { + overflow: hidden; +} + +.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 { + 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-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-outer .lg-media-cont { + text-align: center; + display: inline-block; + vertical-align: middle; + position: relative; +} +.lg-outer .lg-media-cont .lg-object { + width: 100% !important; + height: 100% !important; +} +.lg-outer .lg-has-iframe .lg-media-cont { + -webkit-overflow-scrolling: touch; + overflow: auto; +} + +.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/assets/css/lightgallery-bundle.min.css b/assets/css/lightgallery-bundle.min.css new file mode 100644 index 0000000..da7c3ce --- /dev/null +++ b/assets/css/lightgallery-bundle.min.css @@ -0,0 +1 @@ +@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:400;font-style:normal;font-display:block}.lg-icon{font-family:lg!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-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,.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:1084;outline:0;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 .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .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,.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 .2s linear;-o-transition:color .2s linear;transition:color .2s linear;background:0 0;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 .2s ease-out 0s;-o-transition:opacity .2s ease-out 0s;transition:opacity .2s ease-out 0s}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.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,.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-next,.lg-closing .lg-prev,.lg-closing .lg-sub-html,.lg-closing .lg-toolbar{opacity:0;-webkit-transition:-webkit-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-moz-transition:-moz-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;-o-transition:-o-transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear;transition:transform .08 cubic-bezier(0,0,.25,1) 0s,opacity .08 cubic-bezier(0,0,.25,1) 0s,color .08 linear}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable) .lg-video-cont{opacity:0;-moz-transform:scale3d(.5,.5,.5);-o-transform:scale3d(.5,.5,.5);-ms-transform:scale3d(.5,.5,.5);-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);will-change:transform,opacity;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-img-wrap,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-media-cont,body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item:not(.lg-zoomable).lg-complete .lg-video-cont{opacity:1;-moz-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.lg-icon:focus-visible{color:#fff;border-radius:3px;outline:1px dashed rgba(255,255,255,.6)}.lg-toolbar .lg-icon:focus-visible{border-radius:8px;outline-offset:-5px}.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 .25s ease;-o-transition:border-color .25s ease;transition:border-color .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(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.lg-outer .lg-video-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-video-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-video-cont{-webkit-overflow-scrolling:touch;overflow:auto}.lg-outer .lg-video-object{position:absolute;left:0;right:0;width:100%;height:100%;top:0;bottom:0;z-index:3}.lg-outer .lg-video-poster{z-index:1}.lg-outer .lg-has-video .lg-video-object{opacity:0;will-change:opacity;-webkit-transition:opacity .3s ease-in;-o-transition:opacity .3s ease-in;transition:opacity .3s ease-in}.lg-outer .lg-has-video.lg-video-loaded .lg-video-play-button,.lg-outer .lg-has-video.lg-video-loaded .lg-video-poster{opacity:0!important}.lg-outer .lg-has-video.lg-video-loaded .lg-video-object{opacity:1}@keyframes lg-play-stroke{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes lg-play-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.lg-video-play-button{width:18%;max-width:140px;position:absolute;top:50%;left:50%;z-index:2;cursor:pointer;transform:translate(-50%,-50%) scale(1);will-change:opacity,transform;-webkit-transition:-webkit-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-moz-transition:-moz-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;-o-transition:-o-transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s;transition:transform .25s cubic-bezier(.17,.88,.32,1.28),opacity .1s}.lg-video-play-button:hover .lg-video-play-icon,.lg-video-play-button:hover .lg-video-play-icon-bg{opacity:1}.lg-video-play-icon-bg{fill:none;stroke-width:3%;stroke:#fcfcfc;opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon-circle{position:absolute;top:0;left:0;bottom:0;right:0;fill:none;stroke-width:3%;stroke:rgba(30,30,30,.9);stroke-opacity:1;stroke-linecap:round;stroke-dasharray:200;stroke-dashoffset:200}.lg-video-play-icon{position:absolute;width:25%;max-width:120px;left:50%;top:50%;transform:translate3d(-50%,-50%,0);opacity:.6;will-change:opacity;-webkit-transition:opacity .12s ease-in;-o-transition:opacity .12s ease-in;transition:opacity .12s ease-in}.lg-video-play-icon .lg-video-play-icon-inner{fill:#fcfcfc}.lg-video-loading .lg-video-play-icon-circle{animation:lg-play-rotate 2s linear .25s infinite,lg-play-stroke 1.5s ease-in-out .25s infinite}.lg-video-loaded .lg-video-play-button{opacity:0;transform:translate(-50%,-50%) scale(.7)}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;will-change:opacity;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-single-item .lg-autoplay-button{opacity:.75;pointer-events:none}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{will-change:transform;-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s;transition:transform .5s cubic-bezier(.12,.415,.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 .8s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .8s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .8s cubic-bezier(0,0,.25,1) 0s;transition:transform .8s cubic-bezier(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-dummy-img,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-moz-transition:-moz-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-o-transition:-o-transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;transition:transform .5s cubic-bezier(.12,.415,.01,1.19) 0s,opacity .15s!important;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.no-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.no-transition{transition:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition{transform:scale3d(1,1,1) translate3d(-50%,-50%,0)!important;max-width:none!important;max-height:none!important;top:50%!important;left:50%!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-x,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-x{transform:scale3d(1,1,1) translate3d(-50%,0,0)!important;top:0!important;left:50%!important;max-width:none!important;max-height:none!important}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-dummy-img.reset-transition-y,.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image.reset-transition-y{transform:scale3d(1,1,1) translate3d(0,-50%,0)!important;top:50%!important;left:0!important;max-width:none!important;max-height:none!important}.lg-icon.lg-zoom-in:after{content:"\e311"}.lg-actual-size .lg-icon.lg-zoom-in{opacity:1;pointer-events:auto}.lg-icon.lg-actual-size{font-size:20px}.lg-icon.lg-actual-size:after{content:"\e033"}.lg-icon.lg-zoom-out{opacity:.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.lg-first-slide-loading .lg-actual-size,.lg-outer.lg-first-slide-loading .lg-zoom-in,.lg-outer.lg-first-slide-loading .lg-zoom-out,.lg-outer[data-lg-slide-type=iframe] .lg-actual-size,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-in,.lg-outer[data-lg-slide-type=iframe] .lg-zoom-out,.lg-outer[data-lg-slide-type=video] .lg-actual-size,.lg-outer[data-lg-slide-type=video] .lg-zoom-in,.lg-outer[data-lg-slide-type=video] .lg-zoom-out{opacity:.75;pointer-events:none}.lg-outer .lg-pager-outer{text-align:center;z-index:1080;height:10px;margin-bottom:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer.lg-single-item .lg-pager-outer{display:none}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#fff;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;will-change:transform,opacity;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer .lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:absolute;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active .lg-dropdown,.lg-outer.lg-dropdown-active .lg-dropdown-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-dropdown-active .lg-share{color:#fff}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);will-change:visibility,opacity,transform;-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#fff;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer .lg-share{position:relative}.lg-outer .lg-share:after{content:"\e80d"}.lg-outer .lg-share-facebook .lg-icon{color:#3b5998}.lg-outer .lg-share-facebook .lg-icon:after{content:"\e904"}.lg-outer .lg-share-twitter .lg-icon{color:#00aced}.lg-outer .lg-share-twitter .lg-icon:after{content:"\e907"}.lg-outer .lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer .lg-share-pinterest .lg-icon:after{content:"\e906"}.lg-comment-box{width:420px;max-width:100%;position:absolute;right:0;top:0;bottom:0;z-index:9999;background-color:#fff;will-change:transform;-moz-transform:translate3d(100%,0,0);-o-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-comment-box .lg-comment-title{margin:0;color:#fff;font-size:18px}.lg-comment-box .lg-comment-header{background-color:#000;padding:12px 20px;position:absolute;left:0;right:0;top:0}.lg-comment-box .lg-comment-body{height:100%!important;padding-top:43px!important;width:100%!important}.lg-comment-box .fb-comments{height:100%;width:100%;background:url(../images/loading.gif) no-repeat scroll center center #fff;overflow-y:auto;display:inline-block}.lg-comment-box .fb-comments[fb-xfbml-state=rendered]{background-image:none}.lg-comment-box .fb-comments>span{max-width:100%}.lg-comment-box .lg-comment-close{position:absolute;right:5px;top:12px;cursor:pointer;font-size:20px;color:#999;will-change:color;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-comment-box .lg-comment-close:hover{color:#fff}.lg-comment-box .lg-comment-close:after{content:"\e070"}.lg-comment-box iframe{max-width:100%!important;width:100%!important}.lg-comment-box #disqus_thread{padding:0 20px}.lg-outer .lg-comment-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;will-change:visibility,opacity;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer .lg-comment-toggle:after{content:"\e908"}.lg-outer.lg-comment-active .lg-comment-overlay{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer.lg-comment-active .lg-comment-toggle{color:#fff}.lg-outer.lg-comment-active .lg-comment-box{-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-img-rotate{position:absolute;left:0;right:0;top:0;bottom:0;-webkit-transition:-webkit-transform .4s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .4s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .4s cubic-bezier(0,0,.25,1) 0s;transition:transform .4s cubic-bezier(0,0,.25,1) 0s}.lg-outer[data-lg-slide-type=iframe] .lg-flip-hor,.lg-outer[data-lg-slide-type=iframe] .lg-flip-ver,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-left,.lg-outer[data-lg-slide-type=iframe] .lg-rotate-right,.lg-outer[data-lg-slide-type=video] .lg-flip-hor,.lg-outer[data-lg-slide-type=video] .lg-flip-ver,.lg-outer[data-lg-slide-type=video] .lg-rotate-left,.lg-outer[data-lg-slide-type=video] .lg-rotate-right{opacity:.75;pointer-events:none}.lg-outer .lg-img-rotate:before{content:"";display:inline-block;height:100%;vertical-align:middle}.lg-rotate-left:after{content:"\e900"}.lg-rotate-right:after{content:"\e901"}.lg-icon.lg-flip-hor,.lg-icon.lg-flip-ver{font-size:26px}.lg-flip-ver:after{content:"\e903"}.lg-flip-hor:after{content:"\e902"}.lg-medium-zoom-item{cursor:zoom-in}.lg-medium-zoom .lg-outer{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grab img.lg-object{cursor:zoom-out}.lg-medium-zoom .lg-outer.lg-grabbing img.lg-object{cursor:zoom-out}.lg-relative-caption .lg-outer .lg-sub-html{white-space:normal;bottom:auto;padding:0;background-image:none}.lg-relative-caption .lg-outer .lg-relative-caption-item{opacity:0;padding:16px 0;transition:.5s opacity ease}.lg-relative-caption .lg-outer .lg-show-caption .lg-relative-caption-item{opacity:1}.lg-group:after{content:"";display:table;clear:both}.lg-container{display:none;outline:0}.lg-container.lg-show{display:block}.lg-on{scroll-behavior:unset}.lg-overlay-open{overflow:hidden}.lg-hide-sub-html .lg-sub-html,.lg-next,.lg-pager-outer,.lg-prev,.lg-toolbar{opacity:0;will-change:transform,opacity;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s,opacity .25s cubic-bezier(0,0,.25,1) 0s}.lg-show-in .lg-next,.lg-show-in .lg-pager-outer,.lg-show-in .lg-prev,.lg-show-in .lg-toolbar{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:.001;outline:0;will-change:auto;overflow:hidden;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .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-current,.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-prev-slide{-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-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-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{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-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer.lg-css .lg-current{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item: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-empty-html .lg-sub-html,.lg-outer .lg-empty-html.lg-sub-html{display:none}.lg-outer.lg-hide-download .lg-download{opacity:.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 .2s ease-out .15s}.lg-outer .lg-media-cont{text-align:center;display:inline-block;vertical-align:middle;position:relative}.lg-outer .lg-media-cont .lg-object{width:100%!important;height:100%!important}.lg-outer .lg-has-iframe .lg-media-cont{-webkit-overflow-scrolling:touch;overflow:auto}.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-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-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-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-moz-transition:-moz-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;-o-transition:-o-transform 1s cubic-bezier(.175,.885,.32,1.275) 0s;transition:transform 1s cubic-bezier(.175,.885,.32,1.275) 0s}.lg-css3.lg-use-css3 .lg-item.lg-start-end-progress{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s;transition:transform 1s cubic-bezier(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-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .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 .35s ease-out 0s;-moz-transition:-moz-transform .35s ease-out 0s;-o-transition:-o-transform .35s ease-out 0s;transition:transform .35s ease-out 0s;z-index:1080;position:absolute;bottom:0;right:0;left:0} \ No newline at end of file diff --git a/assets/css/styles.scss b/assets/css/styles.scss new file mode 100644 index 0000000..9e5cbc6 --- /dev/null +++ b/assets/css/styles.scss @@ -0,0 +1,3 @@ +--- +--- +@import "main"; diff --git a/assets/fonts/lg.svg b/assets/fonts/lg.svg new file mode 100644 index 0000000..fe8b075 --- /dev/null +++ b/assets/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/assets/fonts/lg.ttf b/assets/fonts/lg.ttf new file mode 100644 index 0000000..825f483 Binary files /dev/null and b/assets/fonts/lg.ttf differ diff --git a/assets/fonts/lg.woff b/assets/fonts/lg.woff new file mode 100644 index 0000000..fd02a6f Binary files /dev/null and b/assets/fonts/lg.woff differ diff --git a/assets/fonts/lg.woff2 b/assets/fonts/lg.woff2 new file mode 100644 index 0000000..2c2e289 Binary files /dev/null and b/assets/fonts/lg.woff2 differ diff --git a/assets/img/albums/testgal/altman12.jpg b/assets/img/albums/testgal/altman12.jpg new file mode 100644 index 0000000..8ddab94 Binary files /dev/null and b/assets/img/albums/testgal/altman12.jpg differ diff --git a/assets/img/albums/testgal/baerbock-selenskij2.jpg b/assets/img/albums/testgal/baerbock-selenskij2.jpg new file mode 100644 index 0000000..d697264 Binary files /dev/null and b/assets/img/albums/testgal/baerbock-selenskij2.jpg differ diff --git a/assets/img/albums/testgal/baerbock-un2.jpg b/assets/img/albums/testgal/baerbock-un2.jpg new file mode 100644 index 0000000..10d067b Binary files /dev/null and b/assets/img/albums/testgal/baerbock-un2.jpg differ diff --git a/assets/img/albums/testgal/baerbock2.jpg b/assets/img/albums/testgal/baerbock2.jpg new file mode 100644 index 0000000..7e162c5 Binary files /dev/null and b/assets/img/albums/testgal/baerbock2.jpg differ diff --git a/assets/img/albums/testgal/bourla2.jpg b/assets/img/albums/testgal/bourla2.jpg new file mode 100644 index 0000000..50fc310 Binary files /dev/null and b/assets/img/albums/testgal/bourla2.jpg differ diff --git a/assets/img/albums/testgal/fink-wef2.jpg b/assets/img/albums/testgal/fink-wef2.jpg new file mode 100644 index 0000000..6cff5cb Binary files /dev/null and b/assets/img/albums/testgal/fink-wef2.jpg differ diff --git a/assets/img/albums/testgal/frank-elisabeth2.jpg b/assets/img/albums/testgal/frank-elisabeth2.jpg new file mode 100644 index 0000000..db3157e Binary files /dev/null and b/assets/img/albums/testgal/frank-elisabeth2.jpg differ diff --git a/assets/img/albums/testgal/frank12.jpg b/assets/img/albums/testgal/frank12.jpg new file mode 100644 index 0000000..57df7bd Binary files /dev/null and b/assets/img/albums/testgal/frank12.jpg differ diff --git a/assets/img/albums/testgal/gates2.jpg b/assets/img/albums/testgal/gates2.jpg new file mode 100644 index 0000000..b5a8f8d Binary files /dev/null and b/assets/img/albums/testgal/gates2.jpg differ diff --git a/assets/img/albums/testgal/höcke2.jpg b/assets/img/albums/testgal/höcke2.jpg new file mode 100644 index 0000000..54d6594 Binary files /dev/null and b/assets/img/albums/testgal/höcke2.jpg differ diff --git a/assets/img/albums/testgal/lauterbach2.jpg b/assets/img/albums/testgal/lauterbach2.jpg new file mode 100644 index 0000000..d50c2b5 Binary files /dev/null and b/assets/img/albums/testgal/lauterbach2.jpg differ diff --git a/assets/img/albums/testgal/leyen-bourla2.jpg b/assets/img/albums/testgal/leyen-bourla2.jpg new file mode 100644 index 0000000..5c6c8ac Binary files /dev/null and b/assets/img/albums/testgal/leyen-bourla2.jpg differ diff --git a/assets/img/albums/testgal/leyen2.jpg b/assets/img/albums/testgal/leyen2.jpg new file mode 100644 index 0000000..a3127e6 Binary files /dev/null and b/assets/img/albums/testgal/leyen2.jpg differ diff --git a/assets/img/albums/testgal/merz2.jpg b/assets/img/albums/testgal/merz2.jpg new file mode 100644 index 0000000..bbad013 Binary files /dev/null and b/assets/img/albums/testgal/merz2.jpg differ diff --git a/assets/img/albums/testgal/musk2.jpg b/assets/img/albums/testgal/musk2.jpg new file mode 100644 index 0000000..38607e6 Binary files /dev/null and b/assets/img/albums/testgal/musk2.jpg differ diff --git a/assets/img/albums/testgal/papperger2.jpg b/assets/img/albums/testgal/papperger2.jpg new file mode 100644 index 0000000..931d689 Binary files /dev/null and b/assets/img/albums/testgal/papperger2.jpg differ diff --git a/assets/img/albums/testgal/putin2.jpg b/assets/img/albums/testgal/putin2.jpg new file mode 100644 index 0000000..0bfd3d9 Binary files /dev/null and b/assets/img/albums/testgal/putin2.jpg differ diff --git a/assets/img/albums/testgal/rutte-willem2.jpg b/assets/img/albums/testgal/rutte-willem2.jpg new file mode 100644 index 0000000..ca1cc7b Binary files /dev/null and b/assets/img/albums/testgal/rutte-willem2.jpg differ diff --git a/assets/img/albums/testgal/rutte2.jpg b/assets/img/albums/testgal/rutte2.jpg new file mode 100644 index 0000000..a579b9d Binary files /dev/null and b/assets/img/albums/testgal/rutte2.jpg differ diff --git a/assets/img/albums/testgal/schmidt2.jpg b/assets/img/albums/testgal/schmidt2.jpg new file mode 100644 index 0000000..3ec0fe9 Binary files /dev/null and b/assets/img/albums/testgal/schmidt2.jpg differ diff --git a/assets/img/albums/testgal/scholz2.jpg b/assets/img/albums/testgal/scholz2.jpg new file mode 100644 index 0000000..e67bddf Binary files /dev/null and b/assets/img/albums/testgal/scholz2.jpg differ diff --git a/assets/img/albums/testgal/schwab-merkel-wef2.jpg b/assets/img/albums/testgal/schwab-merkel-wef2.jpg new file mode 100644 index 0000000..f21d383 Binary files /dev/null and b/assets/img/albums/testgal/schwab-merkel-wef2.jpg differ diff --git a/assets/img/albums/testgal/schwab2.jpg b/assets/img/albums/testgal/schwab2.jpg new file mode 100644 index 0000000..370e3cf Binary files /dev/null and b/assets/img/albums/testgal/schwab2.jpg differ diff --git a/assets/img/albums/testgal/strack2.jpg b/assets/img/albums/testgal/strack2.jpg new file mode 100644 index 0000000..bb35617 Binary files /dev/null and b/assets/img/albums/testgal/strack2.jpg differ diff --git a/assets/img/albums/testgal/söder2.jpg b/assets/img/albums/testgal/söder2.jpg new file mode 100644 index 0000000..a759b94 Binary files /dev/null and b/assets/img/albums/testgal/söder2.jpg differ diff --git a/assets/img/albums/testgal/tedros2.jpg b/assets/img/albums/testgal/tedros2.jpg new file mode 100644 index 0000000..854a878 Binary files /dev/null and b/assets/img/albums/testgal/tedros2.jpg differ diff --git a/assets/img/albums/testgal/thiel2.jpg b/assets/img/albums/testgal/thiel2.jpg new file mode 100644 index 0000000..783503b Binary files /dev/null and b/assets/img/albums/testgal/thiel2.jpg differ diff --git a/assets/img/albums/testgal/trump-vereidigung2.jpg b/assets/img/albums/testgal/trump-vereidigung2.jpg new file mode 100644 index 0000000..126fa27 Binary files /dev/null and b/assets/img/albums/testgal/trump-vereidigung2.jpg differ diff --git a/assets/img/albums/testgal/trump2.jpg b/assets/img/albums/testgal/trump2.jpg new file mode 100644 index 0000000..aafb70e Binary files /dev/null and b/assets/img/albums/testgal/trump2.jpg differ diff --git a/assets/img/albums/testgal/trump22.jpg b/assets/img/albums/testgal/trump22.jpg new file mode 100644 index 0000000..5a3b1b4 Binary files /dev/null and b/assets/img/albums/testgal/trump22.jpg differ diff --git a/assets/img/albums/testgal/wagenknecht2.jpg b/assets/img/albums/testgal/wagenknecht2.jpg new file mode 100644 index 0000000..faabfac Binary files /dev/null and b/assets/img/albums/testgal/wagenknecht2.jpg differ diff --git a/assets/img/albums/testgal/wahlurne2.jpg b/assets/img/albums/testgal/wahlurne2.jpg new file mode 100644 index 0000000..25d668c Binary files /dev/null and b/assets/img/albums/testgal/wahlurne2.jpg differ diff --git a/assets/img/albums/testgal/weidel2.jpg b/assets/img/albums/testgal/weidel2.jpg new file mode 100644 index 0000000..5597acd Binary files /dev/null and b/assets/img/albums/testgal/weidel2.jpg differ diff --git a/assets/img/albums/testgal/willem-beatrix2.jpg b/assets/img/albums/testgal/willem-beatrix2.jpg new file mode 100644 index 0000000..a53116a Binary files /dev/null and b/assets/img/albums/testgal/willem-beatrix2.jpg differ diff --git a/assets/img/loading.gif b/assets/img/loading.gif new file mode 100644 index 0000000..4744c45 Binary files /dev/null and b/assets/img/loading.gif differ diff --git a/assets/img/scales-of-justice.jpg b/assets/img/scales-of-justice.jpg new file mode 100644 index 0000000..45c01b5 Binary files /dev/null and b/assets/img/scales-of-justice.jpg differ diff --git a/assets/img/scherbe_perikles.svg b/assets/img/scherbe_perikles.svg new file mode 100644 index 0000000..e2c47e8 --- /dev/null +++ b/assets/img/scherbe_perikles.svg @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/assets/img/wahlurne.jpg b/assets/img/wahlurne.jpg new file mode 100644 index 0000000..5396943 Binary files /dev/null and b/assets/img/wahlurne.jpg differ diff --git a/assets/js/lightgallery.min.js b/assets/js/lightgallery.min.js new file mode 100644 index 0000000..a5bc0b3 --- /dev/null +++ b/assets/js/lightgallery.min.js @@ -0,0 +1,8 @@ +/** + * lightgallery | 2.8.2 | November 28th 2024 + * 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;i";e.append(s)}else e.html(t)}))},E=function(t,e,i,s){void 0===i&&(i=0);var n=x(t).attr("data-lg-size")||s;if(n){var o=n.split(",");if(o[1])for(var r=window.innerWidth,l=0;lr){n=a;break}l===o.length-1&&(n=a)}var d=n.split("-"),g=parseInt(d[0],10),h=parseInt(d[1],10),c=e.width(),u=e.height()-i,m=Math.min(c,g),p=Math.min(u,h),f=Math.min(m/g,p/h);return{width:g*f,height:h*f}}},O=function(t,e,i,s,n){if(n){var o=x(t).find("img").first();if(o.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+s),d=o.width(),g=o.height(),h=o.style(),c=(l-d)/2-o.offset().left+(parseFloat(h.paddingLeft)||0)+(parseFloat(h.borderLeft)||0)+x(window).scrollLeft()+r.left,u=(a-g)/2-o.offset().top+(parseFloat(h.paddingTop)||0)+(parseFloat(h.borderTop)||0)+x(window).scrollTop()+i;return"translate3d("+(c*=-1)+"px, "+(u*=-1)+"px, 0) scale3d("+d/n.width+", "+g/n.height+", 1)"}}},L=function(t,e,i,s,n,o){return'
\n \n
'},D=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},z=function(t){for(var e=[],i=[],s="",n=0;nr){s=i[l];break}return s},M=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},G=function(t,e,i,s,n){var o="";o=n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5";var r=e;return"string"!=typeof e&&(r=e.outerHTML),'
\n
\n \n '+s+'\n \n \n \n \n \n \n \n
\n '+r+'\n \n
'},k=function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,(function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility}))},A=function(t,e,i,s){var n=[],o=function(){for(var t=0,e=0,i=arguments.length;e-1&&(d=a),d&&(e[d]=l.value)}}var g=x(t),h=g.find("img").first().attr("alt"),c=g.attr("title"),u=s?g.attr(s):g.find("img").first().attr("src");e.thumb=u,i&&!e.subHtml&&(e.subHtml=c||h||""),e.alt=h||c||"",n.push(e)})),console.log(n,"dynamicElements"),n},B=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},P=function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),o=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:o?{wistia:o}:void 0},F=0,H=function(){function w(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(F++,this.lgId=F,this.el=t,this.LGel=x(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 w.prototype.generateSettings=function(e){if(this.settings=t(t({},C),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():B()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},w.prototype.normalizeSettings=function(){if(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){var t=this.settings.container;if("function"==typeof t)this.settings.container=t();else if("string"==typeof t){var e=document.querySelector(t);this.settings.container=null!=e?e:document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},w.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(i,{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()},w.prototype.openGalleryOnItemClick=function(){for(var t=this,e=function(e){var s=i.items[e],n=x(s),o=I.generateUUID();n.attr("data-lg-id",o).on("click.lgcustom-item-"+o,(function(i){i.preventDefault();var n=t.settings.index||e;t.openGallery(n,s)}))},i=this,s=0;s '+this.settings.prevHtml+' \n "),".lg-item"!==this.settings.appendSubHtmlTo&&(i='
');var s="";this.settings.allowMediaOverlap&&(s+="lg-media-overlap ");var n=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'':"",a=this.settings.showMaximizeIcon?'':"",d='\n \n ";x(this.settings.container).append(d),document.body!==this.settings.container&&x(this.settings.container).css("position","relative"),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 g=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(g+="lg-grab "),this.outer.addClass(g),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(),x(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},w.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=E(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var o=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",o)}this.LGel.trigger(n)}},w.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},w.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(o)}else this.closeGallery()},w.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=x(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 A(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},w.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},w.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(x("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;x(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),x(document.body).addClass("lg-overlay-open")}},w.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(x(document.body).css("padding-right",this.bodyPaddingRight+"px"),x(document.body).removeClass("lg-overlay-open"))},w.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var s=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=s;var n="";s.forEach((function(t){n=n+'
'})),this.$inner.append(n),this.addHtml(t);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,d=r.top,g=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,g);var h=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=E(e,this.outer,d+g,h&&this.settings.videoMaxSize),o=O(e,this.outer,d,g,this.currentImageSize)),this.zoomFromOrigin&&o||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){i.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(l),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=x(window).scrollTop(),setTimeout((function(){if(i.zoomFromOrigin&&o){var e=i.getSlideItem(t);e.css("transform",o),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")}),10),setTimeout((function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()}),i.settings.backdropDuration+50),i.zoomFromOrigin&&o||setTimeout((function(){i.outer.addClass("lg-visible")}),i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger(a)})),document.body===this.settings.container&&x("html").addClass("lg-on")}},w.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}},w.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")},w.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)},w.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.")}},w.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)}},w.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var s=e.substring(0,1);"."!==s&&"#"!==s||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?x(this.items).eq(t).find(e).first().html():x(e).first().html())}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?T(i,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(e);else{var n=x(this.getSlideItemId(t));i?T(i,n,"append"):n.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(r,{index:t})},w.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)},w.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":""},w.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},w.prototype.getDummyImageContent=function(t,e,i){var s;if(this.settings.dynamic||(s=x(this.items).eq(e)),s){var n=void 0;if(!(n=this.settings.exThumbImage?s.attr(this.settings.exThumbImage):s.find("img").first().attr("src")))return"";var o=this.getDummyImgStyles(this.currentImageSize),r=document.createElement("img");return r.alt=i||"",r.src=n,r.className="lg-dummy-img",r.style.cssText=o,t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},w.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,a="",d=n?'alt="'+n+'"':"";a=this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,d):D(i,t,d,o,r,l);var g=document.createElement("picture");g.className="lg-img-wrap",x(g).append(a),e.prepend(g)},w.prototype.onSlideObjectLoad=function(t,e,i,s){var n=t.find(".lg-object").first();M(n.get())||e?i():(n.on("load.lg error.lg",(function(){i&&i()})),n.on("error.lg",(function(){s&&s()})))},w.prototype.onLgObjectLoad=function(t,e,i,s,n,o){var r=this;this.onSlideObjectLoad(t,o,(function(){r.triggerSlideItemLoad(t,e,i,s,n)}),(function(){t.addClass("lg-complete lg-complete_"),t.html(''+r.settings.strings.mediaLoadingFailed+"")}))},w.prototype.triggerSlideItemLoad=function(t,e,i,s,n){var o=this,r=this.galleryItems[e],l=n&&"video"===this.getSlideType(r)&&!r.poster?s:0;setTimeout((function(){t.addClass("lg-complete lg-complete_"),o.LGel.trigger(d,{index:e,delay:i||0,isFirstSlide:n})}),l)},w.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},w.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=P(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")}))},w.prototype.loadContent=function(t,i){var n=this,o=this.galleryItems[t],r=x(this.getSlideItemId(t)),l=o.poster,a=o.srcset,d=o.sizes,g=o.sources,h=o.src,c=o.video,u=c&&"string"==typeof c?JSON.parse(c):c;if(o.responsive){var m=o.responsive.split(",");h=z(m)||h}var p=o.__slideVideoInfo,f="",y=!!o.iframe,v=!this.lGalleryOn,b=0;if(v&&(b=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!r.hasClass("lg-loaded")){if(p){var C=this.mediaContainerPosition,I=C.top,w=C.bottom,S=E(this.items[t],this.outer,I+w,p&&this.settings.videoMaxSize);f=this.getVideoContStyle(S)}if(y){var T=L(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,h,o.iframeTitle);r.prepend(T)}else if(l){var O="";v&&this.zoomFromOrigin&&this.currentImageSize&&(O=this.getDummyImageContent(r,t,""));T=G(l,O||"",f,this.settings.strings.playVideo,p);r.prepend(T)}else if(p){T='
';r.prepend(T)}else if(this.setImgMarkup(h,r,t),a||g){var M=r.find(".lg-object");this.initPictureFill(M)}(l||p)&&this.LGel.trigger(s,{index:t,src:h,html5Video:u,hasPoster:!!l}),this.LGel.trigger(e,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var k=0;b&&!x(document.body).hasClass("lg-from-hash")&&(k=b),this.isFirstSlideWithZoomAnimation()&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if("image"===n.getSlideType(o)){var e=o.alt,i=e?'alt="'+e+'"':"";if(r.find(".lg-img-wrap").append(D(t,h,i,a,d,o.sources)),a||g){var s=r.find(".lg-object");n.initPictureFill(s)}}("image"===n.getSlideType(o)||"video"===n.getSlideType(o)&&l)&&(n.onLgObjectLoad(r,t,b,k,!0,!1),n.onSlideObjectLoad(r,!(!p||!p.html5||l),(function(){n.loadContentOnFirstSlideLoad(t,r,k)}),(function(){n.loadContentOnFirstSlideLoad(t,r,k)})))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(o)||l)||this.onLgObjectLoad(r,t,b,k,v,!(!p||!p.html5||l)),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){n.preload(t)})))},w.prototype.loadContentOnFirstSlideLoad=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)},w.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===s.indexOf(t)&&x("#"+t).remove()})),s},w.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},w.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)}}},w.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)},w.prototype.slide=function(t,e,i,s){var n=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var r=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var l=this.getSlideItem(t),a=this.getSlideItem(o),d=this.galleryItems[t],c=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),c){var u=this.mediaContainerPosition,m=u.top,p=u.bottom,f=E(this.items[t],this.outer,m+p,c&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(g,{prevIndex:o,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(to&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var y=void 0,v=void 0;r>2?(y=t-1,v=t+1,(0===t&&o===r-1||t===r-1&&0===o)&&(v=0,y=r-1)):(y=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(y).addClass("lg-prev-slide"),l.addClass("lg-current")}else this.makeSlideAnimation(s,l,a);this.lGalleryOn?setTimeout((function(){n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout((function(){n.lgBusy=!1,a.removeClass("lg-slide-progress"),n.LGel.trigger(h,{prevIndex:o,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},w.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},w.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},w.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},w.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 d=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",d);var g=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,g,g),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},w.prototype.touchEnd=function(t,e,i){var s,n=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){n.$container.removeClass("lg-dragging-vertical"),n.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if("horizontal"===n.swipeDirection){s=t.pageX-e.pageX;var r=Math.abs(t.pageX-e.pageX);s<0&&r>n.settings.swipeThreshold?(n.goToNextSlide(!0),o=!1):s>0&&r>n.settings.swipeThreshold&&(n.goToPrevSlide(!0),o=!1)}else if("vertical"===n.swipeDirection){if(s=Math.abs(t.pageY-e.pageY),n.settings.closable&&n.settings.swipeToClose&&s>100)return void n.closeGallery();n.$backdrop.css("opacity",1)}if(n.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(t.pageX-e.pageX)<5){var l=x(i.target);n.isPosterElement(l)&&n.LGel.trigger(c)}n.swipeDirection=void 0})),setTimeout((function(){n.outer.hasClass("lg-dragging")||"lg-slide"===n.settings.mode||n.outer.removeClass("lg-slide")}),this.settings.speed+100)},w.prototype.enableSwipe=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);!x(i.target).hasClass("lg-item")&&!s.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(n=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){n&&"swipe"===t.touchAction&&1===o.touches.length&&(i={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},t.touchMove(e,i,o),s=!0)})),this.$inner.on("touchend.lg",(function(o){if("swipe"===t.touchAction){if(s)s=!1,t.touchEnd(i,e,o);else if(n){var r=x(o.target);t.isPosterElement(r)&&t.LGel.trigger(c)}t.touchAction=void 0,n=!1}})))},w.prototype.enableDrag=function(){var t=this,e={},i={},s=!1,n=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(i){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);(x(i.target).hasClass("lg-item")||n.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},s=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(u))))})),x(window).on("mousemove.lg.global"+this.lgId,(function(o){s&&t.lgOpened&&(n=!0,i={pageX:o.pageX,pageY:o.pageY},t.touchMove(e,i),t.LGel.trigger(m))})),x(window).on("mouseup.lg.global"+this.lgId,(function(o){if(t.lgOpened){var r=x(o.target);n?(n=!1,t.touchEnd(i,e,o),t.LGel.trigger(p)):t.isPosterElement(r)&&t.LGel.trigger(c),s&&(s=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},w.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(x(e.target))&&t.LGel.trigger(c)}))},w.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")},w.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(y,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(y,{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)))},w.prototype.keyPress=function(){var t=this;x(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()))}))},w.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()}))},w.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")}},w.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)")},w.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",(function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var s=(new Date).getTime();s-e<1e3||(e=s,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}}))},w.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")||t.hasClass("lg-img-rotate")},w.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())},w.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},w.prototype.invalidateItems=function(){for(var t=0;t" + htmlContent + ""; + element.append(contentDiv); + } + else { + element.html(htmlContent); + } + }); + }, + /** + * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option + */ + getSize: function (el, container, spacing, defaultLgSize) { + if (spacing === void 0) { spacing = 0; } + var LGel = $LG(el); + var lgSize = LGel.attr('data-lg-size') || defaultLgSize; + if (!lgSize) { + return; + } + var isResponsiveSizes = lgSize.split(','); + // if at-least two viewport sizes are available + if (isResponsiveSizes[1]) { + var wWidth = window.innerWidth; + for (var i = 0; i < isResponsiveSizes.length; i++) { + var size_1 = isResponsiveSizes[i]; + var responsiveWidth = parseInt(size_1.split('-')[2], 10); + if (responsiveWidth > wWidth) { + lgSize = size_1; + break; + } + // take last item as last option + if (i === isResponsiveSizes.length - 1) { + lgSize = size_1; + } + } + } + var size = lgSize.split('-'); + var width = parseInt(size[0], 10); + var height = parseInt(size[1], 10); + var cWidth = container.width(); + var cHeight = container.height() - spacing; + var maxWidth = Math.min(cWidth, width); + var maxHeight = Math.min(cHeight, height); + var ratio = Math.min(maxWidth / width, maxHeight / height); + return { width: width * ratio, height: height * ratio }; + }, + /** + * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option + * @param {jQuery Element} + * @returns {String} Transform CSS string + */ + getTransform: function (el, container, top, bottom, imageSize) { + if (!imageSize) { + return; + } + var LGel = $LG(el).find('img').first(); + if (!LGel.get()) { + return; + } + var containerRect = container.get().getBoundingClientRect(); + var wWidth = containerRect.width; + // using innerWidth to include mobile safari bottom bar + var wHeight = container.height() - (top + bottom); + var elWidth = LGel.width(); + var elHeight = LGel.height(); + var elStyle = LGel.style(); + var x = (wWidth - elWidth) / 2 - + LGel.offset().left + + (parseFloat(elStyle.paddingLeft) || 0) + + (parseFloat(elStyle.borderLeft) || 0) + + $LG(window).scrollLeft() + + containerRect.left; + var y = (wHeight - elHeight) / 2 - + LGel.offset().top + + (parseFloat(elStyle.paddingTop) || 0) + + (parseFloat(elStyle.borderTop) || 0) + + $LG(window).scrollTop() + + top; + var scX = elWidth / imageSize.width; + var scY = elHeight / imageSize.height; + var transform = 'translate3d(' + + (x *= -1) + + 'px, ' + + (y *= -1) + + 'px, 0) scale3d(' + + scX + + ', ' + + scY + + ', 1)'; + return transform; + }, + getIframeMarkup: function (iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) { + var title = iframeTitle ? 'title="' + iframeTitle + '"' : ''; + return "
\n \n
"; + }, + getImgMarkup: function (index, src, altAttr, srcset, sizes, sources) { + var srcsetAttr = srcset ? "srcset=\"" + srcset + "\"" : ''; + var sizesAttr = sizes ? "sizes=\"" + sizes + "\"" : ''; + var imgMarkup = ""; + var sourceTag = ''; + if (sources) { + var sourceObj = typeof sources === 'string' ? JSON.parse(sources) : sources; + sourceTag = sourceObj.map(function (source) { + var attrs = ''; + Object.keys(source).forEach(function (key) { + // Do not remove the first space as it is required to separate the attributes + attrs += " " + key + "=\"" + source[key] + "\""; + }); + return ""; + }); + } + return "" + sourceTag + imgMarkup; + }, + // Get src from responsive src + getResponsiveSrc: function (srcItms) { + var rsWidth = []; + var rsSrc = []; + var src = ''; + for (var i = 0; i < srcItms.length; i++) { + var _src = srcItms[i].split(' '); + // Manage empty space + if (_src[0] === '') { + _src.splice(0, 1); + } + rsSrc.push(_src[0]); + rsWidth.push(_src[1]); + } + var wWidth = window.innerWidth; + for (var j = 0; j < rsWidth.length; j++) { + if (parseInt(rsWidth[j], 10) > wWidth) { + src = rsSrc[j]; + break; + } + } + return src; + }, + isImageLoaded: function (img) { + if (!img) + return false; + // During the onload event, IE correctly identifies any images that + // weren’t downloaded as not complete. Others should too. Gecko-based + // browsers act like NS4 in that they report this incorrectly. + if (!img.complete) { + return false; + } + // However, they do have two very useful properties: naturalWidth and + // naturalHeight. These give the true size of the image. If it failed + // to load, either of these should be zero. + if (img.naturalWidth === 0) { + return false; + } + // No other way of checking: assume it’s ok. + return true; + }, + getVideoPosterMarkup: function (_poster, dummyImg, videoContStyle, playVideoString, _isVideo) { + var videoClass = ''; + if (_isVideo && _isVideo.youtube) { + videoClass = 'lg-has-youtube'; + } + else if (_isVideo && _isVideo.vimeo) { + videoClass = 'lg-has-vimeo'; + } + else { + videoClass = 'lg-has-html5'; + } + var _dummy = dummyImg; + if (typeof dummyImg !== 'string') { + _dummy = dummyImg.outerHTML; + } + return "
\n
\n \n " + playVideoString + "\n \n \n \n \n \n \n \n
\n " + _dummy + "\n \n
"; + }, + getFocusableElements: function (container) { + var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'); + var visibleElements = [].filter.call(elements, function (element) { + var style = window.getComputedStyle(element); + return style.display !== 'none' && style.visibility !== 'hidden'; + }); + return visibleElements; + }, + /** + * @desc Create dynamic elements array from gallery items when dynamic option is false + * It helps to avoid frequent DOM interaction + * and avoid multiple checks for dynamic elments + * + * @returns {Array} dynamicEl + */ + getDynamicOptions: function (items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) { + var dynamicElements = []; + var availableDynamicOptions = __spreadArrays(defaultDynamicOptions, extraProps); + [].forEach.call(items, function (item) { + var dynamicEl = {}; + for (var i = 0; i < item.attributes.length; i++) { + var attr = item.attributes[i]; + if (attr.specified) { + var dynamicAttr = convertToData(attr.name); + var label = ''; + if (availableDynamicOptions.indexOf(dynamicAttr) > -1) { + label = dynamicAttr; + } + if (label) { + dynamicEl[label] = attr.value; + } + } + } + var currentItem = $LG(item); + var alt = currentItem.find('img').first().attr('alt'); + var title = currentItem.attr('title'); + var thumb = exThumbImage + ? currentItem.attr(exThumbImage) + : currentItem.find('img').first().attr('src'); + dynamicEl.thumb = thumb; + if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) { + dynamicEl.subHtml = title || alt || ''; + } + dynamicEl.alt = alt || title || ''; + dynamicElements.push(dynamicEl); + }); + console.log(dynamicElements, 'dynamicElements'); + return dynamicElements; + }, + isMobile: function () { + return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + }, + /** + * @desc Check the given src is video + * @param {String} src + * @return {Object} video type + * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } + * + * @todo - this information can be moved to dynamicEl to avoid frequent calls + */ + isVideo: function (src, isHTML5VIdeo, index) { + if (!src) { + if (isHTML5VIdeo) { + return { + html5: true, + }; + } + else { + console.error('lightGallery :- data-src is not provided on slide item ' + + (index + 1) + + '. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/'); + return; + } + } + var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i); + var vimeo = src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i); + var wistia = src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/); + if (youtube) { + return { + youtube: youtube, + }; + } + else if (vimeo) { + return { + vimeo: vimeo, + }; + } + else if (wistia) { + return { + wistia: wistia, + }; + } + }, + }; + + // @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio + // @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html + // Unique id for each gallery + var lgId = 0; + var LightGallery = /** @class */ (function () { + function LightGallery(element, options) { + this.lgOpened = false; + this.index = 0; + // lightGallery modules + this.plugins = []; + // false when lightGallery load first slide content; + this.lGalleryOn = false; + // True when a slide animation is in progress + this.lgBusy = false; + this.currentItemsInDom = []; + // Scroll top value before lightGallery is opened + this.prevScrollTop = 0; + this.bodyPaddingRight = 0; + this.isDummyImageRemoved = false; + this.dragOrSwipeEnabled = false; + this.mediaContainerPosition = { + top: 0, + bottom: 0, + }; + if (!element) { + return this; + } + lgId++; + this.lgId = lgId; + this.el = element; + this.LGel = $LG(element); + this.generateSettings(options); + this.buildModules(); + // When using dynamic mode, ensure dynamicEl is an array + if (this.settings.dynamic && + this.settings.dynamicEl !== undefined && + !Array.isArray(this.settings.dynamicEl)) { + throw 'When using dynamic mode, you must also define dynamicEl as an Array.'; + } + this.galleryItems = this.getItems(); + this.normalizeSettings(); + // Gallery items + this.init(); + this.validateLicense(); + return this; + } + LightGallery.prototype.generateSettings = function (options) { + // lightGallery settings + this.settings = __assign(__assign({}, lightGalleryCoreSettings), options); + if (this.settings.isMobile && + typeof this.settings.isMobile === 'function' + ? this.settings.isMobile() + : utils.isMobile()) { + var mobileSettings = __assign(__assign({}, this.settings.mobileSettings), this.settings.mobileSettings); + this.settings = __assign(__assign({}, this.settings), mobileSettings); + } + }; + LightGallery.prototype.normalizeSettings = function () { + if (this.settings.slideEndAnimation) { + this.settings.hideControlOnEnd = false; + } + if (!this.settings.closable) { + this.settings.swipeToClose = false; + } + // And reset it on close to get the correct value next time + this.zoomFromOrigin = this.settings.zoomFromOrigin; + // At the moment, Zoom from image doesn't support dynamic options + // @todo add zoomFromOrigin support for dynamic images + if (this.settings.dynamic) { + this.zoomFromOrigin = false; + } + if (this.settings.container) { + var container = this.settings.container; + if (typeof container === 'function') { + this.settings.container = container(); + } + else if (typeof container === 'string') { + var el = document.querySelector(container); + this.settings.container = el !== null && el !== void 0 ? el : document.body; + } + } + else { + this.settings.container = document.body; + } + // settings.preload should not be grater than $item.length + this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length); + }; + LightGallery.prototype.init = function () { + var _this = this; + this.addSlideVideoInfo(this.galleryItems); + this.buildStructure(); + this.LGel.trigger(lGEvents.init, { + instance: this, + }); + if (this.settings.keyPress) { + this.keyPress(); + } + setTimeout(function () { + _this.enableDrag(); + _this.enableSwipe(); + _this.triggerPosterClick(); + }, 50); + this.arrow(); + if (this.settings.mousewheel) { + this.mousewheel(); + } + if (!this.settings.dynamic) { + this.openGalleryOnItemClick(); + } + }; + LightGallery.prototype.openGalleryOnItemClick = function () { + var _this = this; + var _loop_1 = function (index) { + var element = this_1.items[index]; + var $element = $LG(element); + // Using different namespace for click because click event should not unbind if selector is same object('this') + // @todo manage all event listners - should have namespace that represent element + var uuid = lgQuery.generateUUID(); + $element + .attr('data-lg-id', uuid) + .on("click.lgcustom-item-" + uuid, function (e) { + e.preventDefault(); + var currentItemIndex = _this.settings.index || index; + _this.openGallery(currentItemIndex, element); + }); + }; + var this_1 = this; + // Using for loop instead of using bubbling as the items can be any html element. + for (var index = 0; index < this.items.length; index++) { + _loop_1(index); + } + }; + /** + * Module constructor + * Modules are build incrementally. + * Gallery should be opened only once all the modules are initialized. + * use moduleBuildTimeout to make sure this + */ + LightGallery.prototype.buildModules = function () { + var _this = this; + this.settings.plugins.forEach(function (plugin) { + _this.plugins.push(new plugin(_this, $LG)); + }); + }; + LightGallery.prototype.validateLicense = function () { + if (!this.settings.licenseKey) { + console.error('Please provide a valid license key'); + } + else if (this.settings.licenseKey === '0000-0000-000-0000') { + console.warn("lightGallery: " + this.settings.licenseKey + " license key is not valid for production use"); + } + }; + LightGallery.prototype.getSlideItem = function (index) { + return $LG(this.getSlideItemId(index)); + }; + LightGallery.prototype.getSlideItemId = function (index) { + return "#lg-item-" + this.lgId + "-" + index; + }; + LightGallery.prototype.getIdName = function (id) { + return id + "-" + this.lgId; + }; + LightGallery.prototype.getElementById = function (id) { + return $LG("#" + this.getIdName(id)); + }; + LightGallery.prototype.manageSingleSlideClassName = function () { + if (this.galleryItems.length < 2) { + this.outer.addClass('lg-single-item'); + } + else { + this.outer.removeClass('lg-single-item'); + } + }; + LightGallery.prototype.buildStructure = function () { + var _this = this; + var container = this.$container && this.$container.get(); + if (container) { + return; + } + var controls = ''; + var subHtmlCont = ''; + // Create controls + if (this.settings.controls) { + controls = "\n "; + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + subHtmlCont = + '
'; + } + var addClasses = ''; + if (this.settings.allowMediaOverlap) { + // Do not remove space before last single quote + addClasses += 'lg-media-overlap '; + } + var ariaLabelledby = this.settings.ariaLabelledby + ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' + : ''; + var ariaDescribedby = this.settings.ariaDescribedby + ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' + : ''; + var containerClassName = "lg-container " + this.settings.addClass + " " + (document.body !== this.settings.container ? 'lg-inline' : ''); + var closeIcon = this.settings.closable && this.settings.showCloseIcon + ? "" + : ''; + var maximizeIcon = this.settings.showMaximizeIcon + ? "" + : ''; + var template = "\n
\n
\n\n
\n\n
\n
\n
\n " + controls + "\n
\n
\n " + maximizeIcon + "\n " + closeIcon + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-outer' + ? subHtmlCont + : '') + "\n
\n " + (this.settings.appendSubHtmlTo === '.lg-sub-html' + ? subHtmlCont + : '') + "\n
\n
\n
\n "; + $LG(this.settings.container).append(template); + if (document.body !== this.settings.container) { + $LG(this.settings.container).css('position', 'relative'); + } + 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 outerClassNames = this.settings.mode + " "; + this.manageSingleSlideClassName(); + if (this.settings.enableDrag) { + outerClassNames += 'lg-grab '; + } + this.outer.addClass(outerClassNames); + this.$inner.css('transition-timing-function', this.settings.easing); + this.$inner.css('transition-duration', this.settings.speed + 'ms'); + if (this.settings.download) { + this.$toolbar.append(""); + } + this.counter(); + $LG(window).on("resize.lg.global" + this.lgId + " orientationchange.lg.global" + this.lgId, function () { + _this.refreshOnResize(); + }); + this.hideBars(); + this.manageCloseGallery(); + this.toggleMaximize(); + this.initModules(); + }; + LightGallery.prototype.refreshOnResize = function () { + if (this.lgOpened) { + var currentGalleryItem = this.galleryItems[this.index]; + var __slideVideoInfo = currentGalleryItem.__slideVideoInfo; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top_1 = _a.top, bottom = _a.bottom; + this.currentImageSize = utils.getSize(this.items[this.index], this.outer, top_1 + bottom, __slideVideoInfo && this.settings.videoMaxSize); + if (__slideVideoInfo) { + this.resizeVideoSlide(this.index, this.currentImageSize); + } + if (this.zoomFromOrigin && !this.isDummyImageRemoved) { + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + this.outer + .find('.lg-current .lg-dummy-img') + .first() + .attr('style', imgStyle); + } + this.LGel.trigger(lGEvents.containerResize); + } + }; + LightGallery.prototype.resizeVideoSlide = function (index, imageSize) { + var lgVideoStyle = this.getVideoContStyle(imageSize); + var currentSlide = this.getSlideItem(index); + currentSlide.find('.lg-video-cont').attr('style', lgVideoStyle); + }; + /** + * Update slides dynamically. + * Add, edit or delete slides dynamically when lightGallery is opened. + * Modify the current gallery items and pass it via updateSlides method + * @note + * - Do not mutate existing lightGallery items directly. + * - Always pass new list of gallery items + * - You need to take care of thumbnails outside the gallery if any + * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method. + * @param items Gallery items + * @param index After the update operation, which slide gallery should navigate to + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * + * // Adding slides dynamically + * let galleryItems = [ + * // Access existing lightGallery items + * // galleryItems are automatically generated internally from the gallery HTML markup + * // or directly from galleryItems when dynamic gallery is used + * ...plugin.galleryItems, + * ...[ + * { + * src: 'img/img-1.png', + * thumb: 'img/thumb1.png', + * }, + * ], + * ]; + * plugin.updateSlides( + * galleryItems, + * plugin.index, + * ); + * + * + * // Remove slides dynamically + * galleryItems = JSON.parse( + * JSON.stringify(updateSlideInstance.galleryItems), + * ); + * galleryItems.shift(); + * updateSlideInstance.updateSlides(galleryItems, 1); + * @see Demo + */ + LightGallery.prototype.updateSlides = function (items, index) { + if (this.index > items.length - 1) { + this.index = items.length - 1; + } + if (items.length === 1) { + this.index = 0; + } + if (!items.length) { + this.closeGallery(); + return; + } + var currentSrc = this.galleryItems[index].src; + this.galleryItems = items; + this.updateControls(); + this.$inner.empty(); + this.currentItemsInDom = []; + var _index = 0; + // Find the current index based on source value of the slide + this.galleryItems.some(function (galleryItem, itemIndex) { + if (galleryItem.src === currentSrc) { + _index = itemIndex; + return true; + } + return false; + }); + this.currentItemsInDom = this.organizeSlideItems(_index, -1); + this.loadContent(_index, true); + this.getSlideItem(_index).addClass('lg-current'); + this.index = _index; + this.updateCurrentCounter(_index); + this.LGel.trigger(lGEvents.updateSlides); + }; + // Get gallery items based on multiple conditions + LightGallery.prototype.getItems = function () { + // Gallery items + this.items = []; + if (!this.settings.dynamic) { + if (this.settings.selector === 'this') { + this.items.push(this.el); + } + else if (this.settings.selector) { + if (typeof this.settings.selector === 'string') { + if (this.settings.selectWithin) { + var selectWithin = $LG(this.settings.selectWithin); + this.items = selectWithin + .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 utils.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage); + } + else { + return this.settings.dynamicEl || []; + } + }; + LightGallery.prototype.shouldHideScrollbar = function () { + return (this.settings.hideScrollbar && + document.body === this.settings.container); + }; + LightGallery.prototype.hideScrollbar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + this.bodyPaddingRight = parseFloat($LG('body').style().paddingRight); + var bodyRect = document.documentElement.getBoundingClientRect(); + var scrollbarWidth = window.innerWidth - bodyRect.width; + $LG(document.body).css('padding-right', scrollbarWidth + this.bodyPaddingRight + 'px'); + $LG(document.body).addClass('lg-overlay-open'); + }; + LightGallery.prototype.resetScrollBar = function () { + if (!this.shouldHideScrollbar()) { + return; + } + $LG(document.body).css('padding-right', this.bodyPaddingRight + 'px'); + $LG(document.body).removeClass('lg-overlay-open'); + }; + /** + * Open lightGallery. + * Open gallery with specific slide by passing index of the slide as parameter. + * @category lGPublicMethods + * @param {Number} index - index of the slide + * @param {HTMLElement} element - Which image lightGallery should zoom from + * + * @example + * const $dynamicGallery = document.getElementById('dynamic-gallery-demo'); + * const dynamicGallery = lightGallery($dynamicGallery, { + * dynamic: true, + * dynamicEl: [ + * { + * src: 'img/1.jpg', + * thumb: 'img/thumb-1.jpg', + * subHtml: '

Image 1 title

Image 1 descriptions.

', + * }, + * ... + * ], + * }); + * $dynamicGallery.addEventListener('click', function () { + * // Starts with third item.(Optional). + * // This is useful if you want use dynamic mode with + * // custom thumbnails (thumbnails outside gallery), + * dynamicGallery.openGallery(2); + * }); + * + */ + LightGallery.prototype.openGallery = function (index, element) { + var _this = this; + if (index === void 0) { index = this.settings.index; } + // prevent accidental double execution + if (this.lgOpened) + return; + this.lgOpened = true; + this.outer.removeClass('lg-hide-items'); + this.hideScrollbar(); + // Add display block, but still has opacity 0 + this.$container.addClass('lg-show'); + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index); + this.currentItemsInDom = itemsToBeInsertedToDom; + var items = ''; + itemsToBeInsertedToDom.forEach(function (item) { + items = items + ("
"); + }); + this.$inner.append(items); + this.addHtml(index); + var transform = ''; + this.mediaContainerPosition = this.getMediaContainerPosition(); + var _a = this.mediaContainerPosition, top = _a.top, bottom = _a.bottom; + if (!this.settings.allowMediaOverlap) { + this.setMediaContainerPosition(top, bottom); + } + var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo; + if (this.zoomFromOrigin && element) { + this.currentImageSize = utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize); + transform = utils.getTransform(element, this.outer, top, bottom, this.currentImageSize); + } + if (!this.zoomFromOrigin || !transform) { + this.outer.addClass(this.settings.startClass); + this.getSlideItem(index).removeClass('lg-complete'); + } + var timeout = this.settings.zoomFromOrigin + ? 100 + : this.settings.backdropDuration; + setTimeout(function () { + _this.outer.addClass('lg-components-open'); + }, timeout); + this.index = index; + this.LGel.trigger(lGEvents.beforeOpen); + // add class lg-current to remove initial transition + this.getSlideItem(index).addClass('lg-current'); + this.lGalleryOn = false; + // Store the current scroll top value to scroll back after closing the gallery.. + this.prevScrollTop = $LG(window).scrollTop(); + setTimeout(function () { + // Need to check both zoomFromOrigin and transform values as we need to set set the + // default opening animation if user missed to add the lg-size attribute + if (_this.zoomFromOrigin && transform) { + var currentSlide_1 = _this.getSlideItem(index); + currentSlide_1.css('transform', transform); + setTimeout(function () { + currentSlide_1 + .addClass('lg-start-progress lg-start-end-progress') + .css('transition-duration', _this.settings.startAnimationDuration + 'ms'); + _this.outer.addClass('lg-zoom-from-image'); + }); + setTimeout(function () { + currentSlide_1.css('transform', 'translate3d(0, 0, 0)'); + }, 100); + } + setTimeout(function () { + _this.$backdrop.addClass('in'); + _this.$container.addClass('lg-show-in'); + }, 10); + setTimeout(function () { + if (_this.settings.trapFocus && + document.body === _this.settings.container) { + _this.trapFocus(); + } + }, _this.settings.backdropDuration + 50); + // lg-visible class resets gallery opacity to 1 + if (!_this.zoomFromOrigin || !transform) { + setTimeout(function () { + _this.outer.addClass('lg-visible'); + }, _this.settings.backdropDuration); + } + // initiate slide function + _this.slide(index, false, false, false); + _this.LGel.trigger(lGEvents.afterOpen); + }); + if (document.body === this.settings.container) { + $LG('html').addClass('lg-on'); + } + }; + /** + * Note - Changing the position of the media on every slide transition creates a flickering effect. + * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption. + * if you have dynamic captions for each media, + * you can provide an appropriate height for the captions via allowMediaOverlap option + */ + LightGallery.prototype.getMediaContainerPosition = function () { + if (this.settings.allowMediaOverlap) { + return { + top: 0, + bottom: 0, + }; + } + var top = this.$toolbar.get().clientHeight || 0; + var subHtml = this.outer.find('.lg-components .lg-sub-html').get(); + var captionHeight = this.settings.defaultCaptionHeight || + (subHtml && subHtml.clientHeight) || + 0; + var thumbContainer = this.outer.find('.lg-thumb-outer').get(); + var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0; + var bottom = thumbHeight + captionHeight; + return { + top: top, + bottom: bottom, + }; + }; + LightGallery.prototype.setMediaContainerPosition = function (top, bottom) { + if (top === void 0) { top = 0; } + if (bottom === void 0) { bottom = 0; } + this.$content.css('top', top + 'px').css('bottom', bottom + 'px'); + }; + LightGallery.prototype.hideBars = function () { + var _this = this; + // Hide controllers if mouse doesn't move for some period + setTimeout(function () { + _this.outer.removeClass('lg-hide-items'); + if (_this.settings.hideBarsDelay > 0) { + _this.outer.on('mousemove.lg click.lg touchstart.lg', function () { + _this.outer.removeClass('lg-hide-items'); + clearTimeout(_this.hideBarTimeout); + // Timeout will be cleared on each slide movement also + _this.hideBarTimeout = setTimeout(function () { + _this.outer.addClass('lg-hide-items'); + }, _this.settings.hideBarsDelay); + }); + _this.outer.trigger('mousemove.lg'); + } + }, this.settings.showBarsAfter); + }; + LightGallery.prototype.initPictureFill = function ($img) { + if (this.settings.supportLegacyBrowser) { + try { + picturefill({ + elements: [$img.get()], + }); + } + catch (e) { + console.warn('lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.'); + } + } + }; + /** + * @desc Create image counter + * Ex: 1/10 + */ + LightGallery.prototype.counter = function () { + if (this.settings.counter) { + var counterHtml = "
\n " + (this.index + 1) + " /\n " + this.galleryItems.length + "
"; + this.outer.find(this.settings.appendCounterTo).append(counterHtml); + } + }; + /** + * @desc add sub-html into the slide + * @param {Number} index - index of the slide + */ + LightGallery.prototype.addHtml = function (index) { + var subHtml; + var subHtmlUrl; + if (this.galleryItems[index].subHtmlUrl) { + subHtmlUrl = this.galleryItems[index].subHtmlUrl; + } + else { + subHtml = this.galleryItems[index].subHtml; + } + if (!subHtmlUrl) { + if (subHtml) { + // get first letter of sub-html + // if first letter starts with . or # get the html form the jQuery object + var fL = subHtml.substring(0, 1); + if (fL === '.' || fL === '#') { + if (this.settings.subHtmlSelectorRelative && + !this.settings.dynamic) { + subHtml = $LG(this.items) + .eq(index) + .find(subHtml) + .first() + .html(); + } + else { + subHtml = $LG(subHtml).first().html(); + } + } + } + else { + subHtml = ''; + } + } + if (this.settings.appendSubHtmlTo !== '.lg-item') { + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, this.outer.find('.lg-sub-html'), 'replace'); + } + else { + this.outer.find('.lg-sub-html').html(subHtml); + } + } + else { + var currentSlide = $LG(this.getSlideItemId(index)); + if (subHtmlUrl) { + utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, 'append'); + } + else { + currentSlide.append("
" + subHtml + "
"); + } + } + // Add lg-empty-html class if title doesn't exist + if (typeof subHtml !== 'undefined' && subHtml !== null) { + if (subHtml === '') { + this.outer + .find(this.settings.appendSubHtmlTo) + .addClass('lg-empty-html'); + } + else { + this.outer + .find(this.settings.appendSubHtmlTo) + .removeClass('lg-empty-html'); + } + } + this.LGel.trigger(lGEvents.afterAppendSubHtml, { + index: index, + }); + }; + /** + * @desc Preload slides + * @param {Number} index - index of the slide + * @todo preload not working for the first slide, Also, should work for the first and last slide as well + */ + LightGallery.prototype.preload = function (index) { + for (var i = 1; i <= this.settings.preload; i++) { + if (i >= this.galleryItems.length - index) { + break; + } + this.loadContent(index + i, false); + } + for (var j = 1; j <= this.settings.preload; j++) { + if (index - j < 0) { + break; + } + this.loadContent(index - j, false); + } + }; + LightGallery.prototype.getDummyImgStyles = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n margin-left: -" + imageSize.width / 2 + "px;\n margin-top: -" + imageSize.height / 2 + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getVideoContStyle = function (imageSize) { + if (!imageSize) + return ''; + return "width:" + imageSize.width + "px;\n height:" + imageSize.height + "px"; + }; + LightGallery.prototype.getDummyImageContent = function ($currentSlide, index, alt) { + var $currentItem; + if (!this.settings.dynamic) { + $currentItem = $LG(this.items).eq(index); + } + if ($currentItem) { + var _dummyImgSrc = void 0; + if (!this.settings.exThumbImage) { + _dummyImgSrc = $currentItem.find('img').first().attr('src'); + } + else { + _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage); + } + if (!_dummyImgSrc) + return ''; + var imgStyle = this.getDummyImgStyles(this.currentImageSize); + var dummyImgContentImg = document.createElement('img'); + dummyImgContentImg.alt = alt || ''; + dummyImgContentImg.src = _dummyImgSrc; + dummyImgContentImg.className = "lg-dummy-img"; + dummyImgContentImg.style.cssText = imgStyle; + $currentSlide.addClass('lg-first-slide'); + this.outer.addClass('lg-first-slide-loading'); + return dummyImgContentImg; + } + return ''; + }; + LightGallery.prototype.setImgMarkup = function (src, $currentSlide, index) { + var currentGalleryItem = this.galleryItems[index]; + var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + // Use the thumbnail as dummy image which will be resized to actual image size and + // displayed on top of actual image + var imgContent = ''; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + if (this.isFirstSlideWithZoomAnimation()) { + imgContent = this.getDummyImageContent($currentSlide, index, altAttr); + } + else { + imgContent = utils.getImgMarkup(index, src, altAttr, srcset, sizes, sources); + } + var picture = document.createElement('picture'); + picture.className = 'lg-img-wrap'; + $LG(picture).append(imgContent); + $currentSlide.prepend(picture); + }; + LightGallery.prototype.onSlideObjectLoad = function ($slide, isHTML5VideoWithoutPoster, onLoad, onError) { + var mediaObject = $slide.find('.lg-object').first(); + if (utils.isImageLoaded(mediaObject.get()) || + isHTML5VideoWithoutPoster) { + onLoad(); + } + else { + mediaObject.on('load.lg error.lg', function () { + onLoad && onLoad(); + }); + mediaObject.on('error.lg', function () { + onError && onError(); + }); + } + }; + /** + * + * @param $el Current slide item + * @param index + * @param delay Delay is 0 except first time + * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin + * @param isFirstSlide + */ + LightGallery.prototype.onLgObjectLoad = function (currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) { + var _this = this; + this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function () { + _this.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide); + }, function () { + currentSlide.addClass('lg-complete lg-complete_'); + currentSlide.html('' + + _this.settings.strings['mediaLoadingFailed'] + + ''); + }); + }; + LightGallery.prototype.triggerSlideItemLoad = function ($currentSlide, index, delay, speed, isFirstSlide) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + // Adding delay for video slides without poster for better performance and user experience + // Videos should start playing once once the gallery is completely loaded + var _speed = isFirstSlide && + this.getSlideType(currentGalleryItem) === 'video' && + !currentGalleryItem.poster + ? speed + : 0; + setTimeout(function () { + $currentSlide.addClass('lg-complete lg-complete_'); + _this.LGel.trigger(lGEvents.slideItemLoad, { + index: index, + delay: delay || 0, + isFirstSlide: isFirstSlide, + }); + }, _speed); + }; + LightGallery.prototype.isFirstSlideWithZoomAnimation = function () { + return !!(!this.lGalleryOn && + this.zoomFromOrigin && + this.currentImageSize); + }; + // Add video slideInfo + LightGallery.prototype.addSlideVideoInfo = function (items) { + var _this = this; + items.forEach(function (element, index) { + element.__slideVideoInfo = utils.isVideo(element.src, !!element.video, index); + if (element.__slideVideoInfo && + _this.settings.loadYouTubePoster && + !element.poster && + element.__slideVideoInfo.youtube) { + element.poster = "//img.youtube.com/vi/" + element.__slideVideoInfo.youtube[1] + "/maxresdefault.jpg"; + } + }); + }; + /** + * Load slide content into slide. + * This is used to load content into slides that is not visible too + * @param {Number} index - index of the slide. + * @param {Boolean} rec - if true call loadcontent() function again. + */ + LightGallery.prototype.loadContent = function (index, rec) { + var _this = this; + var currentGalleryItem = this.galleryItems[index]; + var $currentSlide = $LG(this.getSlideItemId(index)); + var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; + var src = currentGalleryItem.src; + var video = currentGalleryItem.video; + var _html5Video = video && typeof video === 'string' ? JSON.parse(video) : video; + if (currentGalleryItem.responsive) { + var srcDyItms = currentGalleryItem.responsive.split(','); + src = utils.getResponsiveSrc(srcDyItms) || src; + } + var videoInfo = currentGalleryItem.__slideVideoInfo; + var lgVideoStyle = ''; + var iframe = !!currentGalleryItem.iframe; + var isFirstSlide = !this.lGalleryOn; + // delay for adding complete class. it is 0 except first time. + var delay = 0; + if (isFirstSlide) { + if (this.zoomFromOrigin && this.currentImageSize) { + delay = this.settings.startAnimationDuration + 10; + } + else { + delay = this.settings.backdropDuration + 10; + } + } + if (!$currentSlide.hasClass('lg-loaded')) { + if (videoInfo) { + var _a = this.mediaContainerPosition, top_2 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_2 + bottom, videoInfo && this.settings.videoMaxSize); + lgVideoStyle = this.getVideoContStyle(videoSize); + } + if (iframe) { + var markup = utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle); + $currentSlide.prepend(markup); + } + else if (poster) { + var dummyImg = ''; + var hasStartAnimation = isFirstSlide && + this.zoomFromOrigin && + this.currentImageSize; + if (hasStartAnimation) { + dummyImg = this.getDummyImageContent($currentSlide, index, ''); + } + var markup = utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo); + $currentSlide.prepend(markup); + } + else if (videoInfo) { + var markup = "
"; + $currentSlide.prepend(markup); + } + else { + this.setImgMarkup(src, $currentSlide, index); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + this.initPictureFill($img); + } + } + if (poster || videoInfo) { + this.LGel.trigger(lGEvents.hasVideo, { + index: index, + src: src, + html5Video: _html5Video, + hasPoster: !!poster, + }); + } + this.LGel.trigger(lGEvents.afterAppendSlide, { index: index }); + if (this.lGalleryOn && + this.settings.appendSubHtmlTo === '.lg-item') { + this.addHtml(index); + } + } + // For first time add some delay for displaying the start animation. + var _speed = 0; + // Do not change the delay value because it is required for zoom plugin. + // If gallery opened from direct url (hash) speed value should be 0 + if (delay && !$LG(document.body).hasClass('lg-from-hash')) { + _speed = delay; + } + // Only for first slide and zoomFromOrigin is enabled + if (this.isFirstSlideWithZoomAnimation()) { + setTimeout(function () { + $currentSlide + .removeClass('lg-start-end-progress lg-start-progress') + .removeAttr('style'); + }, this.settings.startAnimationDuration + 100); + if (!$currentSlide.hasClass('lg-loaded')) { + setTimeout(function () { + if (_this.getSlideType(currentGalleryItem) === 'image') { + var alt = currentGalleryItem.alt; + var altAttr = alt ? 'alt="' + alt + '"' : ''; + $currentSlide + .find('.lg-img-wrap') + .append(utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources)); + if (srcset || sources) { + var $img = $currentSlide.find('.lg-object'); + _this.initPictureFill($img); + } + } + if (_this.getSlideType(currentGalleryItem) === 'image' || + (_this.getSlideType(currentGalleryItem) === 'video' && + poster)) { + _this.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); + // load remaining slides once the slide is completely loaded + _this.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }, function () { + _this.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); + }); + } + }, this.settings.startAnimationDuration + 100); + } + } + // SLide content has been added to dom + $currentSlide.addClass('lg-loaded'); + if (!this.isFirstSlideWithZoomAnimation() || + (this.getSlideType(currentGalleryItem) === 'video' && !poster)) { + this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster)); + } + // When gallery is opened once content is loaded (second time) need to add lg-complete class for css styling + if ((!this.zoomFromOrigin || !this.currentImageSize) && + $currentSlide.hasClass('lg-complete_') && + !this.lGalleryOn) { + setTimeout(function () { + $currentSlide.addClass('lg-complete'); + }, this.settings.backdropDuration); + } + // Content loaded + // Need to set lGalleryOn before calling preload function + this.lGalleryOn = true; + if (rec === true) { + if (!$currentSlide.hasClass('lg-complete_')) { + $currentSlide + .find('.lg-object') + .first() + .on('load.lg error.lg', function () { + _this.preload(index); + }); + } + else { + this.preload(index); + } + } + }; + /** + * @desc Remove dummy image content and load next slides + * Called only for the first time if zoomFromOrigin animation is enabled + * @param index + * @param $currentSlide + * @param speed + */ + LightGallery.prototype.loadContentOnFirstSlideLoad = function (index, $currentSlide, speed) { + var _this = this; + setTimeout(function () { + $currentSlide.find('.lg-dummy-img').remove(); + $currentSlide.removeClass('lg-first-slide'); + _this.outer.removeClass('lg-first-slide-loading'); + _this.isDummyImageRemoved = true; + _this.preload(index); + }, speed + 300); + }; + LightGallery.prototype.getItemsToBeInsertedToDom = function (index, prevIndex, numberOfItems) { + var _this = this; + if (numberOfItems === void 0) { numberOfItems = 0; } + var itemsToBeInsertedToDom = []; + // Minimum 2 items should be there + var possibleNumberOfItems = Math.max(numberOfItems, 3); + possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length); + var prevIndexItem = "lg-item-" + this.lgId + "-" + prevIndex; + if (this.galleryItems.length <= 3) { + this.galleryItems.forEach(function (_element, index) { + itemsToBeInsertedToDom.push("lg-item-" + _this.lgId + "-" + index); + }); + return itemsToBeInsertedToDom; + } + if (index < (this.galleryItems.length - 1) / 2) { + for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index + idx + 1)); + } + } + else { + for (var idx = index; idx <= this.galleryItems.length - 1 && + idx < index + possibleNumberOfItems / 2; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + idx); + } + var numberOfExistingItems = itemsToBeInsertedToDom.length; + for (var idx = 0; idx < possibleNumberOfItems - numberOfExistingItems; idx++) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (index - idx - 1)); + } + } + if (this.settings.loop) { + if (index === this.galleryItems.length - 1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + 0); + } + else if (index === 0) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + (this.galleryItems.length - 1)); + } + } + if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) { + itemsToBeInsertedToDom.push("lg-item-" + this.lgId + "-" + prevIndex); + } + return itemsToBeInsertedToDom; + }; + LightGallery.prototype.organizeSlideItems = function (index, prevIndex) { + var _this = this; + var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom); + itemsToBeInsertedToDom.forEach(function (item) { + if (_this.currentItemsInDom.indexOf(item) === -1) { + _this.$inner.append("
"); + } + }); + this.currentItemsInDom.forEach(function (item) { + if (itemsToBeInsertedToDom.indexOf(item) === -1) { + $LG("#" + item).remove(); + } + }); + return itemsToBeInsertedToDom; + }; + /** + * Get previous index of the slide + */ + LightGallery.prototype.getPreviousSlideIndex = function () { + var prevIndex = 0; + try { + var currentItemId = this.outer + .find('.lg-current') + .first() + .attr('id'); + prevIndex = parseInt(currentItemId.split('-')[3]) || 0; + } + catch (error) { + prevIndex = 0; + } + return prevIndex; + }; + LightGallery.prototype.setDownloadValue = function (index) { + if (this.settings.download) { + var currentGalleryItem = this.galleryItems[index]; + var hideDownloadBtn = currentGalleryItem.downloadUrl === false || + currentGalleryItem.downloadUrl === 'false'; + if (hideDownloadBtn) { + this.outer.addClass('lg-hide-download'); + } + else { + var $download = this.getElementById('lg-download'); + this.outer.removeClass('lg-hide-download'); + $download.attr('href', currentGalleryItem.downloadUrl || + currentGalleryItem.src); + if (currentGalleryItem.download) { + $download.attr('download', currentGalleryItem.download); + } + } + } + }; + LightGallery.prototype.makeSlideAnimation = function (direction, currentSlideItem, previousSlideItem) { + var _this = this; + if (this.lGalleryOn) { + previousSlideItem.addClass('lg-slide-progress'); + } + setTimeout(function () { + // remove all transitions + _this.outer.addClass('lg-no-trans'); + _this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-next-slide'); + if (direction === 'prev') { + //prevslide + currentSlideItem.addClass('lg-prev-slide'); + previousSlideItem.addClass('lg-next-slide'); + } + else { + // next slide + currentSlideItem.addClass('lg-next-slide'); + previousSlideItem.addClass('lg-prev-slide'); + } + // give 50 ms for browser to add/remove class + setTimeout(function () { + _this.outer.find('.lg-item').removeClass('lg-current'); + currentSlideItem.addClass('lg-current'); + // reset all transitions + _this.outer.removeClass('lg-no-trans'); + }, 50); + }, this.lGalleryOn ? this.settings.slideDelay : 0); + }; + /** + * Goto a specific slide. + * @param {Number} index - index of the slide + * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag + * @param {Boolean} fromThumb - true if slide function called via thumbnail click + * @param {String} direction - Direction of the slide(next/prev) + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // to go to 3rd slide + * plugin.slide(2); + * + */ + LightGallery.prototype.slide = function (index, fromTouch, fromThumb, direction) { + var _this = this; + var prevIndex = this.getPreviousSlideIndex(); + this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); + // Prevent multiple call, Required for hsh plugin + if (this.lGalleryOn && prevIndex === index) { + return; + } + var numberOfGalleryItems = this.galleryItems.length; + if (!this.lgBusy) { + if (this.settings.counter) { + this.updateCurrentCounter(index); + } + var currentSlideItem = this.getSlideItem(index); + var previousSlideItem_1 = this.getSlideItem(prevIndex); + var currentGalleryItem = this.galleryItems[index]; + var videoInfo = currentGalleryItem.__slideVideoInfo; + this.outer.attr('data-lg-slide-type', this.getSlideType(currentGalleryItem)); + this.setDownloadValue(index); + if (videoInfo) { + var _a = this.mediaContainerPosition, top_3 = _a.top, bottom = _a.bottom; + var videoSize = utils.getSize(this.items[index], this.outer, top_3 + bottom, videoInfo && this.settings.videoMaxSize); + this.resizeVideoSlide(index, videoSize); + } + this.LGel.trigger(lGEvents.beforeSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: !!fromTouch, + fromThumb: !!fromThumb, + }); + this.lgBusy = true; + clearTimeout(this.hideBarTimeout); + this.arrowDisable(index); + if (!direction) { + if (index < prevIndex) { + direction = 'prev'; + } + else if (index > prevIndex) { + direction = 'next'; + } + } + if (!fromTouch) { + this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem_1); + } + else { + this.outer + .find('.lg-item') + .removeClass('lg-prev-slide lg-current lg-next-slide'); + var touchPrev = void 0; + var touchNext = void 0; + if (numberOfGalleryItems > 2) { + touchPrev = index - 1; + touchNext = index + 1; + if (index === 0 && prevIndex === numberOfGalleryItems - 1) { + // next slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + else if (index === numberOfGalleryItems - 1 && + prevIndex === 0) { + // prev slide + touchNext = 0; + touchPrev = numberOfGalleryItems - 1; + } + } + else { + touchPrev = 0; + touchNext = 1; + } + if (direction === 'prev') { + this.getSlideItem(touchNext).addClass('lg-next-slide'); + } + else { + this.getSlideItem(touchPrev).addClass('lg-prev-slide'); + } + currentSlideItem.addClass('lg-current'); + } + // Do not put load content in set timeout as it needs to load immediately when the gallery is opened + if (!this.lGalleryOn) { + this.loadContent(index, true); + } + else { + setTimeout(function () { + _this.loadContent(index, true); + // Add title if this.settings.appendSubHtmlTo === lg-sub-html + if (_this.settings.appendSubHtmlTo !== '.lg-item') { + _this.addHtml(index); + } + }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay)); + } + setTimeout(function () { + _this.lgBusy = false; + previousSlideItem_1.removeClass('lg-slide-progress'); + _this.LGel.trigger(lGEvents.afterSlide, { + prevIndex: prevIndex, + index: index, + fromTouch: fromTouch, + fromThumb: fromThumb, + }); + }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay)); + } + this.index = index; + }; + LightGallery.prototype.updateCurrentCounter = function (index) { + this.getElementById('lg-counter-current').html(index + 1 + ''); + }; + LightGallery.prototype.updateCounterTotal = function () { + this.getElementById('lg-counter-all').html(this.galleryItems.length + ''); + }; + LightGallery.prototype.getSlideType = function (item) { + if (item.__slideVideoInfo) { + return 'video'; + } + else if (item.iframe) { + return 'iframe'; + } + else { + return 'image'; + } + }; + LightGallery.prototype.touchMove = function (startCoords, endCoords, e) { + var distanceX = endCoords.pageX - startCoords.pageX; + var distanceY = endCoords.pageY - startCoords.pageY; + var allowSwipe = false; + if (this.swipeDirection) { + allowSwipe = true; + } + else { + if (Math.abs(distanceX) > 15) { + this.swipeDirection = 'horizontal'; + allowSwipe = true; + } + else if (Math.abs(distanceY) > 15) { + this.swipeDirection = 'vertical'; + allowSwipe = true; + } + } + if (!allowSwipe) { + return; + } + var $currentSlide = this.getSlideItem(this.index); + if (this.swipeDirection === 'horizontal') { + e === null || e === void 0 ? void 0 : e.preventDefault(); + // reset opacity and transition duration + this.outer.addClass('lg-dragging'); + // move current slide + this.setTranslate($currentSlide, distanceX, 0); + // move next and prev slide with current slide + var width = $currentSlide.get().offsetWidth; + var slideWidthAmount = (width * 15) / 100; + var gutter = slideWidthAmount - Math.abs((distanceX * 10) / 100); + this.setTranslate(this.outer.find('.lg-prev-slide').first(), -width + distanceX - gutter, 0); + this.setTranslate(this.outer.find('.lg-next-slide').first(), width + distanceX + gutter, 0); + } + else if (this.swipeDirection === 'vertical') { + if (this.settings.swipeToClose) { + e === null || e === void 0 ? void 0 : e.preventDefault(); + this.$container.addClass('lg-dragging-vertical'); + var opacity = 1 - Math.abs(distanceY) / window.innerHeight; + this.$backdrop.css('opacity', opacity); + var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2); + this.setTranslate($currentSlide, 0, distanceY, scale, scale); + if (Math.abs(distanceY) > 100) { + this.outer + .addClass('lg-hide-items') + .removeClass('lg-components-open'); + } + } + } + }; + LightGallery.prototype.touchEnd = function (endCoords, startCoords, event) { + var _this = this; + var distance; + // keep slide animation for any mode while dragg/swipe + if (this.settings.mode !== 'lg-slide') { + this.outer.addClass('lg-slide'); + } + // set transition duration + setTimeout(function () { + _this.$container.removeClass('lg-dragging-vertical'); + _this.outer + .removeClass('lg-dragging lg-hide-items') + .addClass('lg-components-open'); + var triggerClick = true; + if (_this.swipeDirection === 'horizontal') { + distance = endCoords.pageX - startCoords.pageX; + var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX); + if (distance < 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToNextSlide(true); + triggerClick = false; + } + else if (distance > 0 && + distanceAbs > _this.settings.swipeThreshold) { + _this.goToPrevSlide(true); + triggerClick = false; + } + } + else if (_this.swipeDirection === 'vertical') { + distance = Math.abs(endCoords.pageY - startCoords.pageY); + if (_this.settings.closable && + _this.settings.swipeToClose && + distance > 100) { + _this.closeGallery(); + return; + } + else { + _this.$backdrop.css('opacity', 1); + } + } + _this.outer.find('.lg-item').removeAttr('style'); + if (triggerClick && + Math.abs(endCoords.pageX - startCoords.pageX) < 5) { + // Trigger click if distance is less than 5 pix + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.swipeDirection = undefined; + }); + // remove slide class once drag/swipe is completed if mode is not slide + setTimeout(function () { + if (!_this.outer.hasClass('lg-dragging') && + _this.settings.mode !== 'lg-slide') { + _this.outer.removeClass('lg-slide'); + } + }, this.settings.speed + 100); + }; + LightGallery.prototype.enableSwipe = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isMoved = false; + var isSwiping = false; + if (this.settings.enableSwipe) { + this.$inner.on('touchstart.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if (($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) && + !_this.outer.hasClass('lg-zoomed') && + !_this.lgBusy && + e.touches.length === 1) { + isSwiping = true; + _this.touchAction = 'swipe'; + _this.manageSwipeClass(); + startCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + } + }); + this.$inner.on('touchmove.lg', function (e) { + if (isSwiping && + _this.touchAction === 'swipe' && + e.touches.length === 1) { + endCoords = { + pageX: e.touches[0].pageX, + pageY: e.touches[0].pageY, + }; + _this.touchMove(startCoords, endCoords, e); + isMoved = true; + } + }); + this.$inner.on('touchend.lg', function (event) { + if (_this.touchAction === 'swipe') { + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + } + else if (isSwiping) { + var target = $LG(event.target); + if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + } + _this.touchAction = undefined; + isSwiping = false; + } + }); + } + }; + LightGallery.prototype.enableDrag = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isDraging = false; + var isMoved = false; + if (this.settings.enableDrag) { + this.outer.on('mousedown.lg', function (e) { + _this.dragOrSwipeEnabled = true; + var $item = _this.getSlideItem(_this.index); + if ($LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) { + if (!_this.outer.hasClass('lg-zoomed') && !_this.lgBusy) { + e.preventDefault(); + if (!_this.lgBusy) { + _this.manageSwipeClass(); + startCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + isDraging = true; + // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 + _this.outer.get().scrollLeft += 1; + _this.outer.get().scrollLeft -= 1; + // * + _this.outer + .removeClass('lg-grab') + .addClass('lg-grabbing'); + _this.LGel.trigger(lGEvents.dragStart); + } + } + } + }); + $LG(window).on("mousemove.lg.global" + this.lgId, function (e) { + if (isDraging && _this.lgOpened) { + isMoved = true; + endCoords = { + pageX: e.pageX, + pageY: e.pageY, + }; + _this.touchMove(startCoords, endCoords); + _this.LGel.trigger(lGEvents.dragMove); + } + }); + $LG(window).on("mouseup.lg.global" + this.lgId, function (event) { + if (!_this.lgOpened) { + return; + } + var target = $LG(event.target); + if (isMoved) { + isMoved = false; + _this.touchEnd(endCoords, startCoords, event); + _this.LGel.trigger(lGEvents.dragEnd); + } + else if (_this.isPosterElement(target)) { + _this.LGel.trigger(lGEvents.posterClick); + } + // Prevent execution on click + if (isDraging) { + isDraging = false; + _this.outer.removeClass('lg-grabbing').addClass('lg-grab'); + } + }); + } + }; + LightGallery.prototype.triggerPosterClick = function () { + var _this = this; + this.$inner.on('click.lg', function (event) { + if (!_this.dragOrSwipeEnabled && + _this.isPosterElement($LG(event.target))) { + _this.LGel.trigger(lGEvents.posterClick); + } + }); + }; + LightGallery.prototype.manageSwipeClass = function () { + var _touchNext = this.index + 1; + var _touchPrev = this.index - 1; + if (this.settings.loop && this.galleryItems.length > 2) { + if (this.index === 0) { + _touchPrev = this.galleryItems.length - 1; + } + else if (this.index === this.galleryItems.length - 1) { + _touchNext = 0; + } + } + this.outer.find('.lg-item').removeClass('lg-next-slide lg-prev-slide'); + if (_touchPrev > -1) { + this.getSlideItem(_touchPrev).addClass('lg-prev-slide'); + } + this.getSlideItem(_touchNext).addClass('lg-next-slide'); + }; + /** + * Go to next slide + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.goToNextSlide(); + * @see Demo + */ + LightGallery.prototype.goToNextSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index + 1 < this.galleryItems.length) { + this.index++; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else { + if (_loop) { + this.index = 0; + this.LGel.trigger(lGEvents.beforeNextSlide, { + index: this.index, + }); + this.slide(this.index, !!fromTouch, false, 'next'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-right-end'); + setTimeout(function () { + _this.outer.removeClass('lg-right-end'); + }, 400); + } + } + } + }; + /** + * Go to previous slides + * @param {Boolean} fromTouch - true if slide function called via touch event + * @category lGPublicMethods + * @example + * const plugin = lightGallery({}); + * plugin.goToPrevSlide(); + * @see Demo + * + */ + LightGallery.prototype.goToPrevSlide = function (fromTouch) { + var _this = this; + var _loop = this.settings.loop; + if (fromTouch && this.galleryItems.length < 3) { + _loop = false; + } + if (!this.lgBusy) { + if (this.index > 0) { + this.index--; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else { + if (_loop) { + this.index = this.galleryItems.length - 1; + this.LGel.trigger(lGEvents.beforePrevSlide, { + index: this.index, + fromTouch: fromTouch, + }); + this.slide(this.index, !!fromTouch, false, 'prev'); + } + else if (this.settings.slideEndAnimation && !fromTouch) { + this.outer.addClass('lg-left-end'); + setTimeout(function () { + _this.outer.removeClass('lg-left-end'); + }, 400); + } + } + } + }; + LightGallery.prototype.keyPress = function () { + var _this = this; + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (_this.lgOpened && + _this.settings.escKey === true && + e.keyCode === 27) { + e.preventDefault(); + if (_this.settings.allowMediaOverlap && + _this.outer.hasClass('lg-can-toggle') && + _this.outer.hasClass('lg-components-open')) { + _this.outer.removeClass('lg-components-open'); + } + else { + _this.closeGallery(); + } + } + if (_this.lgOpened && _this.galleryItems.length > 1) { + if (e.keyCode === 37) { + e.preventDefault(); + _this.goToPrevSlide(); + } + if (e.keyCode === 39) { + e.preventDefault(); + _this.goToNextSlide(); + } + } + }); + }; + LightGallery.prototype.arrow = function () { + var _this = this; + this.getElementById('lg-prev').on('click.lg', function () { + _this.goToPrevSlide(); + }); + this.getElementById('lg-next').on('click.lg', function () { + _this.goToNextSlide(); + }); + }; + LightGallery.prototype.arrowDisable = function (index) { + // Disable arrows if settings.hideControlOnEnd is true + if (!this.settings.loop && this.settings.hideControlOnEnd) { + var $prev = this.getElementById('lg-prev'); + var $next = this.getElementById('lg-next'); + if (index + 1 === this.galleryItems.length) { + $next.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $next.removeAttr('disabled').removeClass('disabled'); + } + if (index === 0) { + $prev.attr('disabled', 'disabled').addClass('disabled'); + } + else { + $prev.removeAttr('disabled').removeClass('disabled'); + } + } + }; + LightGallery.prototype.setTranslate = function ($el, xValue, yValue, scaleX, scaleY) { + if (scaleX === void 0) { scaleX = 1; } + if (scaleY === void 0) { scaleY = 1; } + $el.css('transform', 'translate3d(' + + xValue + + 'px, ' + + yValue + + 'px, 0px) scale3d(' + + scaleX + + ', ' + + scaleY + + ', 1)'); + }; + LightGallery.prototype.mousewheel = function () { + var _this = this; + var lastCall = 0; + this.outer.on('wheel.lg', function (e) { + if (!e.deltaY || _this.galleryItems.length < 2) { + return; + } + e.preventDefault(); + var now = new Date().getTime(); + if (now - lastCall < 1000) { + return; + } + lastCall = now; + if (e.deltaY > 0) { + _this.goToNextSlide(); + } + else if (e.deltaY < 0) { + _this.goToPrevSlide(); + } + }); + }; + LightGallery.prototype.isSlideElement = function (target) { + return (target.hasClass('lg-outer') || + target.hasClass('lg-item') || + target.hasClass('lg-img-wrap') || + target.hasClass('lg-img-rotate')); + }; + LightGallery.prototype.isPosterElement = function (target) { + var playButton = this.getSlideItem(this.index) + .find('.lg-video-play-button') + .get(); + return (target.hasClass('lg-video-poster') || + target.hasClass('lg-video-play-button') || + (playButton && playButton.contains(target.get()))); + }; + /** + * Maximize minimize inline gallery. + * @category lGPublicMethods + */ + LightGallery.prototype.toggleMaximize = function () { + var _this = this; + this.getElementById('lg-maximize').on('click.lg', function () { + _this.$container.toggleClass('lg-inline'); + _this.refreshOnResize(); + }); + }; + LightGallery.prototype.invalidateItems = function () { + for (var index = 0; index < this.items.length; index++) { + var element = this.items[index]; + var $element = $LG(element); + $element.off("click.lgcustom-item-" + $element.attr('data-lg-id')); + } + }; + LightGallery.prototype.trapFocus = function () { + var _this = this; + this.$container.get().focus({ + preventScroll: true, + }); + $LG(window).on("keydown.lg.global" + this.lgId, function (e) { + if (!_this.lgOpened) { + return; + } + var isTabPressed = e.key === 'Tab' || e.keyCode === 9; + if (!isTabPressed) { + return; + } + var focusableEls = utils.getFocusableElements(_this.$container.get()); + var firstFocusableEl = focusableEls[0]; + var lastFocusableEl = focusableEls[focusableEls.length - 1]; + if (e.shiftKey) { + if (document.activeElement === firstFocusableEl) { + lastFocusableEl.focus(); + e.preventDefault(); + } + } + else { + if (document.activeElement === lastFocusableEl) { + firstFocusableEl.focus(); + e.preventDefault(); + } + } + }); + }; + LightGallery.prototype.manageCloseGallery = function () { + var _this = this; + if (!this.settings.closable) + return; + var mousedown = false; + this.getElementById('lg-close').on('click.lg', function () { + _this.closeGallery(); + }); + if (this.settings.closeOnTap) { + // If you drag the slide and release outside gallery gets close on chrome + // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer + this.outer.on('mousedown.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target)) { + mousedown = true; + } + else { + mousedown = false; + } + }); + this.outer.on('mousemove.lg', function () { + mousedown = false; + }); + this.outer.on('mouseup.lg', function (e) { + var target = $LG(e.target); + if (_this.isSlideElement(target) && mousedown) { + if (!_this.outer.hasClass('lg-dragging')) { + _this.closeGallery(); + } + } + }); + } + }; + /** + * Close lightGallery if it is opened. + * + * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery + * @return returns the estimated time to close gallery completely including the close animation duration + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.closeGallery(); + * + */ + LightGallery.prototype.closeGallery = function (force) { + var _this = this; + if (!this.lgOpened || (!this.settings.closable && !force)) { + return 0; + } + this.LGel.trigger(lGEvents.beforeClose); + if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) { + $LG(window).scrollTop(this.prevScrollTop); + } + var currentItem = this.items[this.index]; + var transform; + if (this.zoomFromOrigin && currentItem) { + var _a = this.mediaContainerPosition, top_4 = _a.top, bottom = _a.bottom; + var _b = this.galleryItems[this.index], __slideVideoInfo = _b.__slideVideoInfo, poster = _b.poster; + var imageSize = utils.getSize(currentItem, this.outer, top_4 + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize); + transform = utils.getTransform(currentItem, this.outer, top_4, bottom, imageSize); + } + if (this.zoomFromOrigin && transform) { + this.outer.addClass('lg-closing lg-zoom-from-image'); + this.getSlideItem(this.index) + .addClass('lg-start-end-progress') + .css('transition-duration', this.settings.startAnimationDuration + 'ms') + .css('transform', transform); + } + else { + this.outer.addClass('lg-hide-items'); + // lg-zoom-from-image is used for setting the opacity to 1 if zoomFromOrigin is true + // If the closing item doesn't have the lg-size attribute, remove this class to avoid the closing css conflicts + this.outer.removeClass('lg-zoom-from-image'); + } + // Unbind all events added by lightGallery + // @todo + //this.$el.off('.lg.tm'); + this.destroyModules(); + this.lGalleryOn = false; + this.isDummyImageRemoved = false; + this.zoomFromOrigin = this.settings.zoomFromOrigin; + clearTimeout(this.hideBarTimeout); + this.hideBarTimeout = false; + $LG('html').removeClass('lg-on'); + this.outer.removeClass('lg-visible lg-components-open'); + // Resetting opacity to 0 isd required as vertical swipe to close function adds inline opacity. + this.$backdrop.removeClass('in').css('opacity', 0); + var removeTimeout = this.zoomFromOrigin && transform + ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration) + : this.settings.backdropDuration; + this.$container.removeClass('lg-show-in'); + // Once the closign animation is completed and gallery is invisible + setTimeout(function () { + if (_this.zoomFromOrigin && transform) { + _this.outer.removeClass('lg-zoom-from-image'); + } + _this.$container.removeClass('lg-show'); + // Reset scrollbar + _this.resetScrollBar(); + // Need to remove inline opacity as it is used in the stylesheet as well + _this.$backdrop + .removeAttr('style') + .css('transition-duration', _this.settings.backdropDuration + 'ms'); + _this.outer.removeClass("lg-closing " + _this.settings.startClass); + _this.getSlideItem(_this.index).removeClass('lg-start-end-progress'); + _this.$inner.empty(); + if (_this.lgOpened) { + _this.LGel.trigger(lGEvents.afterClose, { + instance: _this, + }); + } + if (_this.$container.get()) { + _this.$container.get().blur(); + } + _this.lgOpened = false; + }, removeTimeout + 100); + return removeTimeout + 100; + }; + LightGallery.prototype.initModules = function () { + this.plugins.forEach(function (module) { + try { + module.init(); + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly initiated"); + } + }); + }; + LightGallery.prototype.destroyModules = function (destroy) { + this.plugins.forEach(function (module) { + try { + if (destroy) { + module.destroy(); + } + else { + module.closeGallery && module.closeGallery(); + } + } + catch (err) { + console.warn("lightGallery:- make sure lightGallery module is properly destroyed"); + } + }); + }; + /** + * Refresh lightGallery with new set of children. + * + * @description This is useful to update the gallery when the child elements are changed without calling destroy method. + * + * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery + * @see Demo + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * // Delete or add children, then call + * plugin.refresh(); + * + */ + LightGallery.prototype.refresh = function (galleryItems) { + if (!this.settings.dynamic) { + this.invalidateItems(); + } + if (galleryItems) { + this.galleryItems = galleryItems; + } + else { + this.galleryItems = this.getItems(); + } + this.updateControls(); + this.openGalleryOnItemClick(); + this.LGel.trigger(lGEvents.updateSlides); + }; + LightGallery.prototype.updateControls = function () { + this.addSlideVideoInfo(this.galleryItems); + this.updateCounterTotal(); + this.manageSingleSlideClassName(); + }; + LightGallery.prototype.destroyGallery = function () { + this.destroyModules(true); + if (!this.settings.dynamic) { + this.invalidateItems(); + } + $LG(window).off(".lg.global" + this.lgId); + this.LGel.off('.lg'); + this.$container.remove(); + }; + /** + * Destroy lightGallery. + * Destroy lightGallery and its plugin instances completely + * + * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance. + * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed. + * You can use refresh method most of the times. + * @category lGPublicMethods + * @example + * const plugin = lightGallery(); + * plugin.destroy(); + * + */ + LightGallery.prototype.destroy = function () { + var closeTimeout = this.closeGallery(true); + if (closeTimeout) { + setTimeout(this.destroyGallery.bind(this), closeTimeout); + } + else { + this.destroyGallery(); + } + return closeTimeout; + }; + return LightGallery; + }()); + + function lightGallery(el, options) { + return new LightGallery(el, options); + } + + return lightGallery; + +}))); diff --git a/assets/js/plugins/lg-hash.umd.js b/assets/js/plugins/lg-hash.umd.js new file mode 100644 index 0000000..dbdf14c --- /dev/null +++ b/assets/js/plugins/lg-hash.umd.js @@ -0,0 +1,206 @@ +/*! + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgHash = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var hashSettings = { + hash: true, + galleryId: '1', + customSlideName: false, + }; + + var Hash = /** @class */ (function () { + function Hash(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, hashSettings), this.core.settings); + return this; + } + Hash.prototype.init = function () { + var _this = this; + if (!this.settings.hash) { + return; + } + this.oldHash = window.location.hash; + setTimeout(function () { + _this.buildFromHash(); + }, 100); + // Change hash value on after each slide transition + this.core.LGel.on(lGEvents.afterSlide + ".hash", this.onAfterSlide.bind(this)); + this.core.LGel.on(lGEvents.afterClose + ".hash", this.onCloseAfter.bind(this)); + // Listen hash change and change the slide according to slide value + this.$LG(window).on("hashchange.lg.hash.global" + this.core.lgId, this.onHashchange.bind(this)); + }; + Hash.prototype.onAfterSlide = function (event) { + var slideName = this.core.galleryItems[event.detail.index].slideName; + slideName = this.settings.customSlideName + ? slideName || event.detail.index + : event.detail.index; + if (history.replaceState) { + history.replaceState(null, '', window.location.pathname + + window.location.search + + '#lg=' + + this.settings.galleryId + + '&slide=' + + slideName); + } + else { + window.location.hash = + 'lg=' + this.settings.galleryId + '&slide=' + slideName; + } + }; + /** + * Get index of the slide from custom slideName. Has to be a public method. Used in hash plugin + * @param {String} hash + * @returns {Number} Index of the slide. + */ + Hash.prototype.getIndexFromUrl = function (hash) { + if (hash === void 0) { hash = window.location.hash; } + var slideName = hash.split('&slide=')[1]; + var _idx = 0; + if (this.settings.customSlideName) { + for (var index = 0; index < this.core.galleryItems.length; index++) { + var dynamicEl = this.core.galleryItems[index]; + if (dynamicEl.slideName === slideName) { + _idx = index; + break; + } + } + } + else { + _idx = parseInt(slideName, 10); + } + return isNaN(_idx) ? 0 : _idx; + }; + // Build Gallery if gallery id exist in the URL + Hash.prototype.buildFromHash = function () { + // if dynamic option is enabled execute immediately + var _hash = window.location.hash; + if (_hash.indexOf('lg=' + this.settings.galleryId) > 0) { + // This class is used to remove the initial animation if galleryId present in the URL + this.$LG(document.body).addClass('lg-from-hash'); + var index = this.getIndexFromUrl(_hash); + this.core.openGallery(index); + return true; + } + }; + Hash.prototype.onCloseAfter = function () { + // Reset to old hash value + if (this.oldHash && + this.oldHash.indexOf('lg=' + this.settings.galleryId) < 0) { + if (history.replaceState) { + history.replaceState(null, '', this.oldHash); + } + else { + window.location.hash = this.oldHash; + } + } + else { + if (history.replaceState) { + history.replaceState(null, document.title, window.location.pathname + window.location.search); + } + else { + window.location.hash = ''; + } + } + }; + Hash.prototype.onHashchange = function () { + if (!this.core.lgOpened) + return; + var _hash = window.location.hash; + var index = this.getIndexFromUrl(_hash); + // it galleryId doesn't exist in the url close the gallery + if (_hash.indexOf('lg=' + this.settings.galleryId) > -1) { + this.core.slide(index, false, false); + } + else if (this.core.lGalleryOn) { + this.core.closeGallery(); + } + }; + Hash.prototype.closeGallery = function () { + if (this.settings.hash) { + this.$LG(document.body).removeClass('lg-from-hash'); + } + }; + Hash.prototype.destroy = function () { + this.core.LGel.off('.lg.hash'); + this.core.LGel.off('.hash'); + this.$LG(window).off("hashchange.lg.hash.global" + this.core.lgId); + }; + return Hash; + }()); + + return Hash; + +}))); + diff --git a/assets/js/plugins/lg-share.umd.js b/assets/js/plugins/lg-share.umd.js new file mode 100644 index 0000000..520e924 --- /dev/null +++ b/assets/js/plugins/lg-share.umd.js @@ -0,0 +1,226 @@ +/*! + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgShare = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + } + + var shareSettings = { + share: true, + facebook: true, + facebookDropdownText: 'Facebook', + twitter: true, + twitterDropdownText: 'Twitter', + pinterest: true, + pinterestDropdownText: 'Pinterest', + additionalShareOptions: [], + sharePluginStrings: { share: 'Share' }, + }; + + function getFacebookShareLink(galleryItem) { + var facebookBaseUrl = '//www.facebook.com/sharer/sharer.php?u='; + return (facebookBaseUrl + + encodeURIComponent(galleryItem.facebookShareUrl || window.location.href)); + } + + function getTwitterShareLink(galleryItem) { + var twitterBaseUrl = '//twitter.com/intent/tweet?text='; + var url = encodeURIComponent(galleryItem.twitterShareUrl || window.location.href); + var text = galleryItem.tweetText; + return twitterBaseUrl + text + '&url=' + url; + } + + function getPinterestShareLink(galleryItem) { + var pinterestBaseUrl = 'http://www.pinterest.com/pin/create/button/?url='; + var description = galleryItem.pinterestText; + var media = encodeURIComponent(galleryItem.src); + var url = encodeURIComponent(galleryItem.pinterestShareUrl || window.location.href); + return (pinterestBaseUrl + + url + + '&media=' + + media + + '&description=' + + description); + } + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var Share = /** @class */ (function () { + function Share(instance) { + this.shareOptions = []; + // get lightGallery core plugin instance + this.core = instance; + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, shareSettings), this.core.settings); + return this; + } + Share.prototype.init = function () { + if (!this.settings.share) { + return; + } + this.shareOptions = __spreadArrays(this.getDefaultShareOptions(), this.settings.additionalShareOptions); + this.setLgShareMarkup(); + this.core.outer + .find('.lg-share .lg-dropdown') + .append(this.getShareListHtml()); + this.core.LGel.on(lGEvents.afterSlide + ".share", this.onAfterSlide.bind(this)); + }; + Share.prototype.getShareListHtml = function () { + var shareHtml = ''; + this.shareOptions.forEach(function (shareOption) { + shareHtml += shareOption.dropdownHTML; + }); + return shareHtml; + }; + Share.prototype.setLgShareMarkup = function () { + var _this = this; + this.core.$toolbar.append(""); + this.core.outer.append('
'); + var $shareButton = this.core.outer.find('.lg-share'); + $shareButton.first().on('click.lg', function () { + _this.core.outer.toggleClass('lg-dropdown-active'); + if (_this.core.outer.hasClass('lg-dropdown-active')) { + _this.core.outer.attr('aria-expanded', true); + } + else { + _this.core.outer.attr('aria-expanded', false); + } + }); + this.core.outer + .find('.lg-dropdown-overlay') + .first() + .on('click.lg', function () { + _this.core.outer.removeClass('lg-dropdown-active'); + _this.core.outer.attr('aria-expanded', false); + }); + }; + Share.prototype.onAfterSlide = function (event) { + var _this = this; + var index = event.detail.index; + var currentItem = this.core.galleryItems[index]; + setTimeout(function () { + _this.shareOptions.forEach(function (shareOption) { + var selector = shareOption.selector; + _this.core.outer + .find(selector) + .attr('href', shareOption.generateLink(currentItem)); + }); + }, 100); + }; + Share.prototype.getShareListItemHTML = function (type, text) { + return "
  • " + text + "
  • "; + }; + Share.prototype.getDefaultShareOptions = function () { + return __spreadArrays((this.settings.facebook + ? [ + { + type: 'facebook', + generateLink: getFacebookShareLink, + dropdownHTML: this.getShareListItemHTML('facebook', this.settings.facebookDropdownText), + selector: '.lg-share-facebook', + }, + ] + : []), (this.settings.twitter + ? [ + { + type: 'twitter', + generateLink: getTwitterShareLink, + dropdownHTML: this.getShareListItemHTML('twitter', this.settings.twitterDropdownText), + selector: '.lg-share-twitter', + }, + ] + : []), (this.settings.pinterest + ? [ + { + type: 'pinterest', + generateLink: getPinterestShareLink, + dropdownHTML: this.getShareListItemHTML('pinterest', this.settings.pinterestDropdownText), + selector: '.lg-share-pinterest', + }, + ] + : [])); + }; + Share.prototype.destroy = function () { + this.core.outer.find('.lg-dropdown-overlay').remove(); + this.core.outer.find('.lg-share').remove(); + this.core.LGel.off('.lg.share'); + this.core.LGel.off('.share'); + }; + return Share; + }()); + + return Share; + +}))); diff --git a/assets/js/plugins/lg-thumbnail.umd.js b/assets/js/plugins/lg-thumbnail.umd.js new file mode 100644 index 0000000..787060f --- /dev/null +++ b/assets/js/plugins/lg-thumbnail.umd.js @@ -0,0 +1,494 @@ +/*! + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgThumbnail = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + var thumbnailsSettings = { + thumbnail: true, + animateThumb: true, + currentPagerPosition: 'middle', + alignThumbnails: 'middle', + thumbWidth: 100, + thumbHeight: '80px', + thumbMargin: 5, + appendThumbnailsTo: '.lg-components', + toggleThumb: false, + enableThumbDrag: true, + enableThumbSwipe: true, + thumbnailSwipeThreshold: 10, + loadYouTubeThumbnail: true, + youTubeThumbSize: 1, + thumbnailPluginStrings: { + toggleThumbnails: 'Toggle thumbnails', + }, + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var Thumbnail = /** @class */ (function () { + function Thumbnail(instance, $LG) { + this.thumbOuterWidth = 0; + this.thumbTotalWidth = 0; + this.translateX = 0; + this.thumbClickable = false; + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + return this; + } + Thumbnail.prototype.init = function () { + // extend module default settings with lightGallery core settings + this.settings = __assign(__assign({}, thumbnailsSettings), this.core.settings); + this.thumbOuterWidth = 0; + this.thumbTotalWidth = + this.core.galleryItems.length * + (this.settings.thumbWidth + this.settings.thumbMargin); + // Thumbnail animation value + this.translateX = 0; + this.setAnimateThumbStyles(); + if (!this.core.settings.allowMediaOverlap) { + this.settings.toggleThumb = false; + } + if (this.settings.thumbnail) { + this.build(); + if (this.settings.animateThumb) { + if (this.settings.enableThumbDrag) { + this.enableThumbDrag(); + } + if (this.settings.enableThumbSwipe) { + this.enableThumbSwipe(); + } + this.thumbClickable = false; + } + else { + this.thumbClickable = true; + } + this.toggleThumbBar(); + this.thumbKeyPress(); + } + }; + Thumbnail.prototype.build = function () { + var _this = this; + this.setThumbMarkup(); + this.manageActiveClassOnSlideChange(); + this.$lgThumb.first().on('click.lg touchend.lg', function (e) { + var $target = _this.$LG(e.target); + if (!$target.hasAttribute('data-lg-item-id')) { + return; + } + setTimeout(function () { + // In IE9 and bellow touch does not support + // Go to slide if browser does not support css transitions + if (_this.thumbClickable && !_this.core.lgBusy) { + var index = parseInt($target.attr('data-lg-item-id')); + _this.core.slide(index, false, true, false); + } + }, 50); + }); + this.core.LGel.on(lGEvents.beforeSlide + ".thumb", function (event) { + var index = event.detail.index; + _this.animateThumb(index); + }); + this.core.LGel.on(lGEvents.beforeOpen + ".thumb", function () { + _this.thumbOuterWidth = _this.core.outer.get().offsetWidth; + }); + this.core.LGel.on(lGEvents.updateSlides + ".thumb", function () { + _this.rebuildThumbnails(); + }); + this.core.LGel.on(lGEvents.containerResize + ".thumb", function () { + if (!_this.core.lgOpened) + return; + setTimeout(function () { + _this.thumbOuterWidth = _this.core.outer.get().offsetWidth; + _this.animateThumb(_this.core.index); + _this.thumbOuterWidth = _this.core.outer.get().offsetWidth; + }, 50); + }); + }; + Thumbnail.prototype.setThumbMarkup = function () { + var thumbOuterClassNames = 'lg-thumb-outer '; + if (this.settings.alignThumbnails) { + thumbOuterClassNames += "lg-thumb-align-" + this.settings.alignThumbnails; + } + var html = "
    \n
    \n
    \n
    "; + this.core.outer.addClass('lg-has-thumb'); + if (this.settings.appendThumbnailsTo === '.lg-components') { + this.core.$lgComponents.append(html); + } + else { + this.core.outer.append(html); + } + this.$thumbOuter = this.core.outer.find('.lg-thumb-outer').first(); + this.$lgThumb = this.core.outer.find('.lg-thumb').first(); + if (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); + }; + Thumbnail.prototype.enableThumbDrag = function () { + var _this = this; + var thumbDragUtils = { + cords: { + startX: 0, + endX: 0, + }, + isMoved: false, + newTranslateX: 0, + startTime: new Date(), + endTime: new Date(), + touchMoveTime: 0, + }; + var isDragging = false; + this.$thumbOuter.addClass('lg-grab'); + this.core.outer + .find('.lg-thumb') + .first() + .on('mousedown.lg.thumb', function (e) { + if (_this.thumbTotalWidth > _this.thumbOuterWidth) { + // execute only on .lg-object + e.preventDefault(); + thumbDragUtils.cords.startX = e.pageX; + thumbDragUtils.startTime = new Date(); + _this.thumbClickable = false; + isDragging = true; + // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 + _this.core.outer.get().scrollLeft += 1; + _this.core.outer.get().scrollLeft -= 1; + // * + _this.$thumbOuter + .removeClass('lg-grab') + .addClass('lg-grabbing'); + } + }); + this.$LG(window).on("mousemove.lg.thumb.global" + this.core.lgId, function (e) { + if (!_this.core.lgOpened) + return; + if (isDragging) { + thumbDragUtils.cords.endX = e.pageX; + thumbDragUtils = _this.onThumbTouchMove(thumbDragUtils); + } + }); + this.$LG(window).on("mouseup.lg.thumb.global" + this.core.lgId, function () { + if (!_this.core.lgOpened) + return; + if (thumbDragUtils.isMoved) { + thumbDragUtils = _this.onThumbTouchEnd(thumbDragUtils); + } + else { + _this.thumbClickable = true; + } + if (isDragging) { + isDragging = false; + _this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab'); + } + }); + }; + Thumbnail.prototype.enableThumbSwipe = function () { + var _this = this; + var thumbDragUtils = { + cords: { + startX: 0, + endX: 0, + }, + isMoved: false, + newTranslateX: 0, + startTime: new Date(), + endTime: new Date(), + touchMoveTime: 0, + }; + this.$lgThumb.on('touchstart.lg', function (e) { + if (_this.thumbTotalWidth > _this.thumbOuterWidth) { + e.preventDefault(); + thumbDragUtils.cords.startX = e.targetTouches[0].pageX; + _this.thumbClickable = false; + thumbDragUtils.startTime = new Date(); + } + }); + this.$lgThumb.on('touchmove.lg', function (e) { + if (_this.thumbTotalWidth > _this.thumbOuterWidth) { + e.preventDefault(); + thumbDragUtils.cords.endX = e.targetTouches[0].pageX; + thumbDragUtils = _this.onThumbTouchMove(thumbDragUtils); + } + }); + this.$lgThumb.on('touchend.lg', function () { + if (thumbDragUtils.isMoved) { + thumbDragUtils = _this.onThumbTouchEnd(thumbDragUtils); + } + else { + _this.thumbClickable = true; + } + }); + }; + // Rebuild thumbnails + Thumbnail.prototype.rebuildThumbnails = function () { + var _this = this; + // Remove transitions + this.$thumbOuter.addClass('lg-rebuilding-thumbnails'); + setTimeout(function () { + _this.thumbTotalWidth = + _this.core.galleryItems.length * + (_this.settings.thumbWidth + _this.settings.thumbMargin); + _this.$lgThumb.css('width', _this.thumbTotalWidth + 'px'); + _this.$lgThumb.empty(); + _this.setThumbItemHtml(_this.core.galleryItems); + _this.animateThumb(_this.core.index); + }, 50); + setTimeout(function () { + _this.$thumbOuter.removeClass('lg-rebuilding-thumbnails'); + }, 200); + }; + // @ts-check + Thumbnail.prototype.setTranslate = function (value) { + this.$lgThumb.css('transform', 'translate3d(-' + value + 'px, 0px, 0px)'); + }; + Thumbnail.prototype.getPossibleTransformX = function (left) { + if (left > this.thumbTotalWidth - this.thumbOuterWidth) { + left = this.thumbTotalWidth - this.thumbOuterWidth; + } + if (left < 0) { + left = 0; + } + return left; + }; + Thumbnail.prototype.animateThumb = function (index) { + this.$lgThumb.css('transition-duration', this.core.settings.speed + 'ms'); + if (this.settings.animateThumb) { + var position = 0; + switch (this.settings.currentPagerPosition) { + case 'left': + position = 0; + break; + case 'middle': + position = + this.thumbOuterWidth / 2 - this.settings.thumbWidth / 2; + break; + case 'right': + position = this.thumbOuterWidth - this.settings.thumbWidth; + } + this.translateX = + (this.settings.thumbWidth + this.settings.thumbMargin) * index - + 1 - + position; + if (this.translateX > this.thumbTotalWidth - this.thumbOuterWidth) { + this.translateX = this.thumbTotalWidth - this.thumbOuterWidth; + } + if (this.translateX < 0) { + this.translateX = 0; + } + this.setTranslate(this.translateX); + } + }; + Thumbnail.prototype.onThumbTouchMove = function (thumbDragUtils) { + thumbDragUtils.newTranslateX = this.translateX; + thumbDragUtils.isMoved = true; + thumbDragUtils.touchMoveTime = new Date().valueOf(); + thumbDragUtils.newTranslateX -= + thumbDragUtils.cords.endX - thumbDragUtils.cords.startX; + thumbDragUtils.newTranslateX = this.getPossibleTransformX(thumbDragUtils.newTranslateX); + // move current slide + this.setTranslate(thumbDragUtils.newTranslateX); + this.$thumbOuter.addClass('lg-dragging'); + return thumbDragUtils; + }; + Thumbnail.prototype.onThumbTouchEnd = function (thumbDragUtils) { + thumbDragUtils.isMoved = false; + thumbDragUtils.endTime = new Date(); + this.$thumbOuter.removeClass('lg-dragging'); + var touchDuration = thumbDragUtils.endTime.valueOf() - + thumbDragUtils.startTime.valueOf(); + var distanceXnew = thumbDragUtils.cords.endX - thumbDragUtils.cords.startX; + var speedX = Math.abs(distanceXnew) / touchDuration; + // Some magical numbers + // Can be improved + if (speedX > 0.15 && + thumbDragUtils.endTime.valueOf() - thumbDragUtils.touchMoveTime < 30) { + speedX += 1; + if (speedX > 2) { + speedX += 1; + } + speedX = + speedX + + speedX * (Math.abs(distanceXnew) / this.thumbOuterWidth); + this.$lgThumb.css('transition-duration', Math.min(speedX - 1, 2) + 'settings'); + distanceXnew = distanceXnew * speedX; + this.translateX = this.getPossibleTransformX(this.translateX - distanceXnew); + this.setTranslate(this.translateX); + } + else { + this.translateX = thumbDragUtils.newTranslateX; + } + if (Math.abs(thumbDragUtils.cords.endX - thumbDragUtils.cords.startX) < + this.settings.thumbnailSwipeThreshold) { + this.thumbClickable = true; + } + return thumbDragUtils; + }; + Thumbnail.prototype.getThumbHtml = function (thumb, index, alt) { + var slideVideoInfo = this.core.galleryItems[index].__slideVideoInfo || {}; + var thumbImg; + if (slideVideoInfo.youtube) { + if (this.settings.loadYouTubeThumbnail) { + thumbImg = + '//img.youtube.com/vi/' + + slideVideoInfo.youtube[1] + + '/' + + this.settings.youTubeThumbSize + + '.jpg'; + } + else { + thumbImg = thumb; + } + } + else { + thumbImg = thumb; + } + var div = document.createElement('div'); + div.setAttribute('data-lg-item-id', index + ''); + div.className = "lg-thumb-item " + (index === this.core.index ? 'active' : ''); + div.style.cssText = "width: " + this.settings.thumbWidth + "px; height: " + this.settings.thumbHeight + "; margin-right: " + this.settings.thumbMargin + "px;"; + var img = document.createElement('img'); + img.alt = alt || ''; + img.setAttribute('data-lg-item-id', index + ''); + img.src = thumbImg; + div.appendChild(img); + return div; + }; + Thumbnail.prototype.setThumbItemHtml = function (items) { + for (var i = 0; i < items.length; i++) { + var thumb = this.getThumbHtml(items[i].thumb, i, items[i].alt); + this.$lgThumb.append(thumb); + } + }; + Thumbnail.prototype.setAnimateThumbStyles = function () { + if (this.settings.animateThumb) { + this.core.outer.addClass('lg-animate-thumb'); + } + }; + // Manage thumbnail active calss + Thumbnail.prototype.manageActiveClassOnSlideChange = function () { + var _this = this; + // manage active class for thumbnail + this.core.LGel.on(lGEvents.beforeSlide + ".thumb", function (event) { + var $thumb = _this.core.outer.find('.lg-thumb-item'); + var index = event.detail.index; + $thumb.removeClass('active'); + $thumb.eq(index).addClass('active'); + }); + }; + // Toggle thumbnail bar + Thumbnail.prototype.toggleThumbBar = function () { + var _this = this; + if (this.settings.toggleThumb) { + this.core.outer.addClass('lg-can-toggle'); + this.core.$toolbar.append(''); + this.core.outer + .find('.lg-toggle-thumb') + .first() + .on('click.lg', function () { + _this.core.outer.toggleClass('lg-components-open'); + }); + } + }; + Thumbnail.prototype.thumbKeyPress = function () { + var _this = this; + this.$LG(window).on("keydown.lg.thumb.global" + this.core.lgId, function (e) { + if (!_this.core.lgOpened || !_this.settings.toggleThumb) + return; + if (e.keyCode === 38) { + e.preventDefault(); + _this.core.outer.addClass('lg-components-open'); + } + else if (e.keyCode === 40) { + e.preventDefault(); + _this.core.outer.removeClass('lg-components-open'); + } + }); + }; + Thumbnail.prototype.destroy = function () { + if (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'); + } + }; + return Thumbnail; + }()); + + return Thumbnail; + +}))); diff --git a/assets/js/plugins/lg-zoom.umd.js b/assets/js/plugins/lg-zoom.umd.js new file mode 100644 index 0000000..1466591 --- /dev/null +++ b/assets/js/plugins/lg-zoom.umd.js @@ -0,0 +1,987 @@ +/*! + * lightgallery | 2.8.2 | November 28th 2024 + * http://www.lightgalleryjs.com/ + * Copyright (c) 2020 Sachin Neravath; + * @license GPLv3 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgZoom = factory()); +}(this, (function () { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + var zoomSettings = { + scale: 1, + zoom: true, + infiniteZoom: true, + actualSize: true, + showZoomInOutIcons: false, + actualSizeIcons: { + zoomIn: 'lg-zoom-in', + zoomOut: 'lg-zoom-out', + }, + enableZoomAfter: 300, + zoomPluginStrings: { + zoomIn: 'Zoom in', + zoomOut: 'Zoom out', + viewActualSize: 'View actual size', + }, + }; + + /** + * List of lightGallery events + * All events should be documented here + * Below interfaces are used to build the website documentations + * */ + var lGEvents = { + afterAppendSlide: 'lgAfterAppendSlide', + init: 'lgInit', + hasVideo: 'lgHasVideo', + containerResize: 'lgContainerResize', + updateSlides: 'lgUpdateSlides', + afterAppendSubHtml: 'lgAfterAppendSubHtml', + beforeOpen: 'lgBeforeOpen', + afterOpen: 'lgAfterOpen', + slideItemLoad: 'lgSlideItemLoad', + beforeSlide: 'lgBeforeSlide', + afterSlide: 'lgAfterSlide', + posterClick: 'lgPosterClick', + dragStart: 'lgDragStart', + dragMove: 'lgDragMove', + dragEnd: 'lgDragEnd', + beforeNextSlide: 'lgBeforeNextSlide', + beforePrevSlide: 'lgBeforePrevSlide', + beforeClose: 'lgBeforeClose', + afterClose: 'lgAfterClose', + rotateLeft: 'lgRotateLeft', + rotateRight: 'lgRotateRight', + flipHorizontal: 'lgFlipHorizontal', + flipVertical: 'lgFlipVertical', + autoplay: 'lgAutoplay', + autoplayStart: 'lgAutoplayStart', + autoplayStop: 'lgAutoplayStop', + }; + + var ZOOM_TRANSITION_DURATION = 500; + var Zoom = /** @class */ (function () { + function Zoom(instance, $LG) { + // get lightGallery core plugin instance + this.core = instance; + this.$LG = $LG; + this.settings = __assign(__assign({}, zoomSettings), this.core.settings); + return this; + } + // Append Zoom controls. Actual size, Zoom-in, Zoom-out + Zoom.prototype.buildTemplates = function () { + var zoomIcons = this.settings.showZoomInOutIcons + ? "" + : ''; + if (this.settings.actualSize) { + zoomIcons += ""; + } + this.core.outer.addClass('lg-use-transition-for-zoom'); + this.core.$toolbar.first().append(zoomIcons); + }; + /** + * @desc Enable zoom option only once the image is completely loaded + * If zoomFromOrigin is true, Zoom is enabled once the dummy image has been inserted + * + * Zoom styles are defined under lg-zoomable CSS class. + */ + Zoom.prototype.enableZoom = function (event) { + var _this = this; + // delay will be 0 except first time + var _speed = this.settings.enableZoomAfter + event.detail.delay; + // set _speed value 0 if gallery opened from direct url and if it is first slide + if (this.$LG('body').first().hasClass('lg-from-hash') && + event.detail.delay) { + // will execute only once + _speed = 0; + } + else { + // Remove lg-from-hash to enable starting animation. + this.$LG('body').first().removeClass('lg-from-hash'); + } + this.zoomableTimeout = setTimeout(function () { + if (!_this.isImageSlide(_this.core.index)) { + return; + } + _this.core.getSlideItem(event.detail.index).addClass('lg-zoomable'); + if (event.detail.index === _this.core.index) { + _this.setZoomEssentials(); + } + }, _speed + 30); + }; + Zoom.prototype.enableZoomOnSlideItemLoad = function () { + // Add zoomable class + this.core.LGel.on(lGEvents.slideItemLoad + ".zoom", this.enableZoom.bind(this)); + }; + Zoom.prototype.getDragCords = function (e) { + return { + x: e.pageX, + y: e.pageY, + }; + }; + Zoom.prototype.getSwipeCords = function (e) { + var x = e.touches[0].pageX; + var y = e.touches[0].pageY; + return { + x: x, + y: y, + }; + }; + Zoom.prototype.getDragAllowedAxises = function (scale, scaleDiff) { + if (!this.containerRect) { + return { + allowX: false, + allowY: false, + }; + } + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-image') + .first() + .get(); + var height = 0; + var width = 0; + var rect = $image.getBoundingClientRect(); + if (scale) { + height = $image.offsetHeight * scale; + width = $image.offsetWidth * scale; + } + else if (scaleDiff) { + height = rect.height + scaleDiff * rect.height; + width = rect.width + scaleDiff * rect.width; + } + else { + height = rect.height; + width = rect.width; + } + var allowY = height > this.containerRect.height; + var allowX = width > this.containerRect.width; + return { + allowX: allowX, + allowY: allowY, + }; + }; + Zoom.prototype.setZoomEssentials = function () { + this.containerRect = this.core.$content.get().getBoundingClientRect(); + }; + /** + * @desc Image zoom + * Translate the wrap and scale the image to get better user experience + * + * @param {String} scale - Zoom decrement/increment value + */ + Zoom.prototype.zoomImage = function (scale, scaleDiff, reposition, resetToMax) { + if (Math.abs(scaleDiff) <= 0) + return; + var offsetX = this.containerRect.width / 2 + this.containerRect.left; + var offsetY = this.containerRect.height / 2 + + this.containerRect.top + + this.scrollTop; + var originalX; + var originalY; + if (scale === 1) { + this.positionChanged = false; + } + var dragAllowedAxises = this.getDragAllowedAxises(0, scaleDiff); + var allowY = dragAllowedAxises.allowY, allowX = dragAllowedAxises.allowX; + if (this.positionChanged) { + originalX = this.left / (this.scale - scaleDiff); + originalY = this.top / (this.scale - scaleDiff); + this.pageX = offsetX - originalX; + this.pageY = offsetY - originalY; + this.positionChanged = false; + } + var possibleSwipeCords = this.getPossibleSwipeDragCords(scaleDiff); + var x; + var y; + var _x = offsetX - this.pageX; + var _y = offsetY - this.pageY; + if (scale - scaleDiff > 1) { + var scaleVal = (scale - scaleDiff) / Math.abs(scaleDiff); + _x = + (scaleDiff < 0 ? -_x : _x) + + this.left * (scaleVal + (scaleDiff < 0 ? -1 : 1)); + _y = + (scaleDiff < 0 ? -_y : _y) + + this.top * (scaleVal + (scaleDiff < 0 ? -1 : 1)); + x = _x / scaleVal; + y = _y / scaleVal; + } + else { + var scaleVal = (scale - scaleDiff) * scaleDiff; + x = _x * scaleVal; + y = _y * scaleVal; + } + if (reposition) { + if (allowX) { + if (this.isBeyondPossibleLeft(x, possibleSwipeCords.minX)) { + x = possibleSwipeCords.minX; + } + else if (this.isBeyondPossibleRight(x, possibleSwipeCords.maxX)) { + x = possibleSwipeCords.maxX; + } + } + else { + if (scale > 1) { + if (x < possibleSwipeCords.minX) { + x = possibleSwipeCords.minX; + } + else if (x > possibleSwipeCords.maxX) { + x = possibleSwipeCords.maxX; + } + } + } + // @todo fix this + if (allowY) { + if (this.isBeyondPossibleTop(y, possibleSwipeCords.minY)) { + y = possibleSwipeCords.minY; + } + else if (this.isBeyondPossibleBottom(y, possibleSwipeCords.maxY)) { + y = possibleSwipeCords.maxY; + } + } + else { + // If the translate value based on index of beyond the viewport, utilize the available space to prevent image being cut out + if (scale > 1) { + //If image goes beyond viewport top, use the minim possible translate value + if (y < possibleSwipeCords.minY) { + y = possibleSwipeCords.minY; + } + else if (y > possibleSwipeCords.maxY) { + y = possibleSwipeCords.maxY; + } + } + } + } + this.setZoomStyles({ + x: x, + y: y, + scale: scale, + }); + this.left = x; + this.top = y; + if (resetToMax) { + this.setZoomImageSize(); + } + }; + Zoom.prototype.resetImageTranslate = function (index) { + if (!this.isImageSlide(index)) { + return; + } + var $image = this.core.getSlideItem(index).find('.lg-image').first(); + this.imageReset = false; + $image.removeClass('reset-transition reset-transition-y reset-transition-x'); + this.core.outer.removeClass('lg-actual-size'); + $image.css('width', 'auto').css('height', 'auto'); + setTimeout(function () { + $image.removeClass('no-transition'); + }, 10); + }; + Zoom.prototype.setZoomImageSize = function () { + var _this = this; + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-image') + .first(); + setTimeout(function () { + var actualSizeScale = _this.getCurrentImageActualSizeScale(); + if (_this.scale >= actualSizeScale) { + $image.addClass('no-transition'); + _this.imageReset = true; + } + }, ZOOM_TRANSITION_DURATION); + setTimeout(function () { + var actualSizeScale = _this.getCurrentImageActualSizeScale(); + if (_this.scale >= actualSizeScale) { + var dragAllowedAxises = _this.getDragAllowedAxises(_this.scale); + $image + .css('width', $image.get().naturalWidth + 'px') + .css('height', $image.get().naturalHeight + 'px'); + _this.core.outer.addClass('lg-actual-size'); + if (dragAllowedAxises.allowX && dragAllowedAxises.allowY) { + $image.addClass('reset-transition'); + } + else if (dragAllowedAxises.allowX && + !dragAllowedAxises.allowY) { + $image.addClass('reset-transition-x'); + } + else if (!dragAllowedAxises.allowX && + dragAllowedAxises.allowY) { + $image.addClass('reset-transition-y'); + } + } + }, ZOOM_TRANSITION_DURATION + 50); + }; + /** + * @desc apply scale3d to image and translate to image wrap + * @param {style} X,Y and scale + */ + Zoom.prototype.setZoomStyles = function (style) { + var $imageWrap = this.core + .getSlideItem(this.core.index) + .find('.lg-img-wrap') + .first(); + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-image') + .first(); + var $dummyImage = this.core.outer + .find('.lg-current .lg-dummy-img') + .first(); + this.scale = style.scale; + $image.css('transform', 'scale3d(' + style.scale + ', ' + style.scale + ', 1)'); + $dummyImage.css('transform', 'scale3d(' + style.scale + ', ' + style.scale + ', 1)'); + var transform = 'translate3d(' + style.x + 'px, ' + style.y + 'px, 0)'; + $imageWrap.css('transform', transform); + }; + /** + * @param index - Index of the current slide + * @param event - event will be available only if the function is called on clicking/taping the imags + */ + Zoom.prototype.setActualSize = function (index, event) { + var _this = this; + if (this.zoomInProgress) { + return; + } + this.zoomInProgress = true; + var currentItem = this.core.galleryItems[this.core.index]; + this.resetImageTranslate(index); + setTimeout(function () { + // Allow zoom only on image + if (!currentItem.src || + _this.core.outer.hasClass('lg-first-slide-loading')) { + return; + } + var scale = _this.getCurrentImageActualSizeScale(); + var prevScale = _this.scale; + if (_this.core.outer.hasClass('lg-zoomed')) { + _this.scale = 1; + } + else { + _this.scale = _this.getScale(scale); + } + _this.setPageCords(event); + _this.beginZoom(_this.scale); + _this.zoomImage(_this.scale, _this.scale - prevScale, true, true); + }, 50); + setTimeout(function () { + _this.core.outer.removeClass('lg-grabbing').addClass('lg-grab'); + }, 60); + setTimeout(function () { + _this.zoomInProgress = false; + }, ZOOM_TRANSITION_DURATION + 110); + }; + Zoom.prototype.getNaturalWidth = function (index) { + var $image = this.core.getSlideItem(index).find('.lg-image').first(); + var naturalWidth = this.core.galleryItems[index].width; + return naturalWidth + ? parseFloat(naturalWidth) + : $image.get().naturalWidth; + }; + Zoom.prototype.getActualSizeScale = function (naturalWidth, width) { + var _scale; + var scale; + if (naturalWidth >= width) { + _scale = naturalWidth / width; + scale = _scale || 2; + } + else { + scale = 1; + } + return scale; + }; + Zoom.prototype.getCurrentImageActualSizeScale = function () { + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-image') + .first(); + var width = $image.get().offsetWidth; + var naturalWidth = this.getNaturalWidth(this.core.index) || width; + return this.getActualSizeScale(naturalWidth, width); + }; + Zoom.prototype.getPageCords = function (event) { + var cords = {}; + if (event) { + cords.x = event.pageX || event.touches[0].pageX; + cords.y = event.pageY || event.touches[0].pageY; + } + else { + var containerRect = this.core.$content + .get() + .getBoundingClientRect(); + cords.x = containerRect.width / 2 + containerRect.left; + cords.y = + containerRect.height / 2 + this.scrollTop + containerRect.top; + } + return cords; + }; + Zoom.prototype.setPageCords = function (event) { + var pageCords = this.getPageCords(event); + this.pageX = pageCords.x; + this.pageY = pageCords.y; + }; + Zoom.prototype.manageActualPixelClassNames = function () { + var $actualSize = this.core.getElementById('lg-actual-size'); + $actualSize + .removeClass(this.settings.actualSizeIcons.zoomIn) + .addClass(this.settings.actualSizeIcons.zoomOut); + }; + // If true, zoomed - in else zoomed out + Zoom.prototype.beginZoom = function (scale) { + this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging'); + if (scale > 1) { + this.core.outer.addClass('lg-zoomed'); + this.manageActualPixelClassNames(); + } + else { + this.resetZoom(); + } + return scale > 1; + }; + Zoom.prototype.getScale = function (scale) { + var actualSizeScale = this.getCurrentImageActualSizeScale(); + if (scale < 1) { + scale = 1; + } + else if (scale > actualSizeScale) { + scale = actualSizeScale; + } + return scale; + }; + Zoom.prototype.init = function () { + var _this = this; + if (!this.settings.zoom) { + return; + } + this.buildTemplates(); + this.enableZoomOnSlideItemLoad(); + var tapped = null; + this.core.outer.on('dblclick.lg', function (event) { + if (!_this.$LG(event.target).hasClass('lg-image')) { + return; + } + _this.setActualSize(_this.core.index, event); + }); + this.core.outer.on('touchstart.lg', function (event) { + var $target = _this.$LG(event.target); + if (event.touches.length === 1 && $target.hasClass('lg-image')) { + if (!tapped) { + tapped = setTimeout(function () { + tapped = null; + }, 300); + } + else { + clearTimeout(tapped); + tapped = null; + event.preventDefault(); + _this.setActualSize(_this.core.index, event); + } + } + }); + this.core.LGel.on(lGEvents.containerResize + ".zoom " + lGEvents.rotateRight + ".zoom " + lGEvents.rotateLeft + ".zoom " + lGEvents.flipHorizontal + ".zoom " + lGEvents.flipVertical + ".zoom", function () { + if (!_this.core.lgOpened || + !_this.isImageSlide(_this.core.index) || + _this.core.touchAction) { + return; + } + var _LGel = _this.core + .getSlideItem(_this.core.index) + .find('.lg-img-wrap') + .first(); + _this.top = 0; + _this.left = 0; + _this.setZoomEssentials(); + _this.setZoomSwipeStyles(_LGel, { x: 0, y: 0 }); + _this.positionChanged = true; + }); + // Update zoom on resize and orientationchange + this.$LG(window).on("scroll.lg.zoom.global" + this.core.lgId, function () { + if (!_this.core.lgOpened) + return; + _this.scrollTop = _this.$LG(window).scrollTop(); + }); + this.core.getElementById('lg-zoom-out').on('click.lg', function () { + // Allow zoom only on image + if (!_this.isImageSlide(_this.core.index)) { + return; + } + var timeout = 0; + if (_this.imageReset) { + _this.resetImageTranslate(_this.core.index); + timeout = 50; + } + setTimeout(function () { + var scale = _this.scale - _this.settings.scale; + if (scale < 1) { + scale = 1; + } + _this.beginZoom(scale); + _this.zoomImage(scale, -_this.settings.scale, true, !_this.settings.infiniteZoom); + }, timeout); + }); + this.core.getElementById('lg-zoom-in').on('click.lg', function () { + _this.zoomIn(); + }); + this.core.getElementById('lg-actual-size').on('click.lg', function () { + _this.setActualSize(_this.core.index); + }); + this.core.LGel.on(lGEvents.beforeOpen + ".zoom", function () { + _this.core.outer.find('.lg-item').removeClass('lg-zoomable'); + }); + this.core.LGel.on(lGEvents.afterOpen + ".zoom", function () { + _this.scrollTop = _this.$LG(window).scrollTop(); + // Set the initial value center + _this.pageX = _this.core.outer.width() / 2; + _this.pageY = _this.core.outer.height() / 2 + _this.scrollTop; + _this.scale = 1; + }); + // Reset zoom on slide change + this.core.LGel.on(lGEvents.afterSlide + ".zoom", function (event) { + var prevIndex = event.detail.prevIndex; + _this.scale = 1; + _this.positionChanged = false; + _this.zoomInProgress = false; + _this.resetZoom(prevIndex); + _this.resetImageTranslate(prevIndex); + if (_this.isImageSlide(_this.core.index)) { + _this.setZoomEssentials(); + } + }); + // Drag option after zoom + this.zoomDrag(); + this.pinchZoom(); + this.zoomSwipe(); + // Store the zoomable timeout value just to clear it while closing + this.zoomableTimeout = false; + this.positionChanged = false; + this.zoomInProgress = false; + }; + Zoom.prototype.zoomIn = function () { + // Allow zoom only on image + if (!this.isImageSlide(this.core.index)) { + return; + } + var scale = this.scale + this.settings.scale; + if (!this.settings.infiniteZoom) { + scale = this.getScale(scale); + } + this.beginZoom(scale); + this.zoomImage(scale, Math.min(this.settings.scale, scale - this.scale), true, !this.settings.infiniteZoom); + }; + // Reset zoom effect + Zoom.prototype.resetZoom = function (index) { + this.core.outer.removeClass('lg-zoomed lg-zoom-drag-transition'); + var $actualSize = this.core.getElementById('lg-actual-size'); + var $item = this.core.getSlideItem(index !== undefined ? index : this.core.index); + $actualSize + .removeClass(this.settings.actualSizeIcons.zoomOut) + .addClass(this.settings.actualSizeIcons.zoomIn); + $item.find('.lg-img-wrap').first().removeAttr('style'); + $item.find('.lg-image').first().removeAttr('style'); + this.scale = 1; + this.left = 0; + this.top = 0; + // Reset pagx pagy values to center + this.setPageCords(); + }; + Zoom.prototype.getTouchDistance = function (e) { + return Math.sqrt((e.touches[0].pageX - e.touches[1].pageX) * + (e.touches[0].pageX - e.touches[1].pageX) + + (e.touches[0].pageY - e.touches[1].pageY) * + (e.touches[0].pageY - e.touches[1].pageY)); + }; + Zoom.prototype.pinchZoom = function () { + var _this = this; + var startDist = 0; + var pinchStarted = false; + var initScale = 1; + var prevScale = 0; + var $item = this.core.getSlideItem(this.core.index); + this.core.outer.on('touchstart.lg', function (e) { + $item = _this.core.getSlideItem(_this.core.index); + if (!_this.isImageSlide(_this.core.index)) { + return; + } + if (e.touches.length === 2) { + e.preventDefault(); + if (_this.core.outer.hasClass('lg-first-slide-loading')) { + return; + } + initScale = _this.scale || 1; + _this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging'); + _this.setPageCords(e); + _this.resetImageTranslate(_this.core.index); + _this.core.touchAction = 'pinch'; + startDist = _this.getTouchDistance(e); + } + }); + this.core.$inner.on('touchmove.lg', function (e) { + if (e.touches.length === 2 && + _this.core.touchAction === 'pinch' && + (_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target))) { + e.preventDefault(); + var endDist = _this.getTouchDistance(e); + var distance = startDist - endDist; + if (!pinchStarted && Math.abs(distance) > 5) { + pinchStarted = true; + } + if (pinchStarted) { + prevScale = _this.scale; + var _scale = Math.max(1, initScale + -distance * 0.02); + _this.scale = + Math.round((_scale + Number.EPSILON) * 100) / 100; + var diff = _this.scale - prevScale; + _this.zoomImage(_this.scale, Math.round((diff + Number.EPSILON) * 100) / 100, false, false); + } + } + }); + this.core.$inner.on('touchend.lg', function (e) { + if (_this.core.touchAction === 'pinch' && + (_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target))) { + pinchStarted = false; + startDist = 0; + if (_this.scale <= 1) { + _this.resetZoom(); + } + else { + var actualSizeScale = _this.getCurrentImageActualSizeScale(); + if (_this.scale >= actualSizeScale) { + var scaleDiff = actualSizeScale - _this.scale; + if (scaleDiff === 0) { + scaleDiff = 0.01; + } + _this.zoomImage(actualSizeScale, scaleDiff, false, true); + } + _this.manageActualPixelClassNames(); + _this.core.outer.addClass('lg-zoomed'); + } + _this.core.touchAction = undefined; + } + }); + }; + Zoom.prototype.touchendZoom = function (startCoords, endCoords, allowX, allowY, touchDuration) { + var distanceXnew = endCoords.x - startCoords.x; + var distanceYnew = endCoords.y - startCoords.y; + var speedX = Math.abs(distanceXnew) / touchDuration + 1; + var speedY = Math.abs(distanceYnew) / touchDuration + 1; + if (speedX > 2) { + speedX += 1; + } + if (speedY > 2) { + speedY += 1; + } + distanceXnew = distanceXnew * speedX; + distanceYnew = distanceYnew * speedY; + var _LGel = this.core + .getSlideItem(this.core.index) + .find('.lg-img-wrap') + .first(); + var distance = {}; + distance.x = this.left + distanceXnew; + distance.y = this.top + distanceYnew; + var possibleSwipeCords = this.getPossibleSwipeDragCords(); + if (Math.abs(distanceXnew) > 15 || Math.abs(distanceYnew) > 15) { + if (allowY) { + if (this.isBeyondPossibleTop(distance.y, possibleSwipeCords.minY)) { + distance.y = possibleSwipeCords.minY; + } + else if (this.isBeyondPossibleBottom(distance.y, possibleSwipeCords.maxY)) { + distance.y = possibleSwipeCords.maxY; + } + } + if (allowX) { + if (this.isBeyondPossibleLeft(distance.x, possibleSwipeCords.minX)) { + distance.x = possibleSwipeCords.minX; + } + else if (this.isBeyondPossibleRight(distance.x, possibleSwipeCords.maxX)) { + distance.x = possibleSwipeCords.maxX; + } + } + if (allowY) { + this.top = distance.y; + } + else { + distance.y = this.top; + } + if (allowX) { + this.left = distance.x; + } + else { + distance.x = this.left; + } + this.setZoomSwipeStyles(_LGel, distance); + this.positionChanged = true; + } + }; + Zoom.prototype.getZoomSwipeCords = function (startCoords, endCoords, allowX, allowY, possibleSwipeCords) { + var distance = {}; + if (allowY) { + distance.y = this.top + (endCoords.y - startCoords.y); + if (this.isBeyondPossibleTop(distance.y, possibleSwipeCords.minY)) { + var diffMinY = possibleSwipeCords.minY - distance.y; + distance.y = possibleSwipeCords.minY - diffMinY / 6; + } + else if (this.isBeyondPossibleBottom(distance.y, possibleSwipeCords.maxY)) { + var diffMaxY = distance.y - possibleSwipeCords.maxY; + distance.y = possibleSwipeCords.maxY + diffMaxY / 6; + } + } + else { + distance.y = this.top; + } + if (allowX) { + distance.x = this.left + (endCoords.x - startCoords.x); + if (this.isBeyondPossibleLeft(distance.x, possibleSwipeCords.minX)) { + var diffMinX = possibleSwipeCords.minX - distance.x; + distance.x = possibleSwipeCords.minX - diffMinX / 6; + } + else if (this.isBeyondPossibleRight(distance.x, possibleSwipeCords.maxX)) { + var difMaxX = distance.x - possibleSwipeCords.maxX; + distance.x = possibleSwipeCords.maxX + difMaxX / 6; + } + } + else { + distance.x = this.left; + } + return distance; + }; + Zoom.prototype.isBeyondPossibleLeft = function (x, minX) { + return x >= minX; + }; + Zoom.prototype.isBeyondPossibleRight = function (x, maxX) { + return x <= maxX; + }; + Zoom.prototype.isBeyondPossibleTop = function (y, minY) { + return y >= minY; + }; + Zoom.prototype.isBeyondPossibleBottom = function (y, maxY) { + return y <= maxY; + }; + Zoom.prototype.isImageSlide = function (index) { + var currentItem = this.core.galleryItems[index]; + return this.core.getSlideType(currentItem) === 'image'; + }; + Zoom.prototype.getPossibleSwipeDragCords = function (scale) { + var $image = this.core + .getSlideItem(this.core.index) + .find('.lg-image') + .first(); + var bottom = this.core.mediaContainerPosition.bottom; + var imgRect = $image.get().getBoundingClientRect(); + var imageHeight = imgRect.height; + var imageWidth = imgRect.width; + if (scale) { + imageHeight = imageHeight + scale * imageHeight; + imageWidth = imageWidth + scale * imageWidth; + } + var minY = (imageHeight - this.containerRect.height) / 2; + var maxY = (this.containerRect.height - imageHeight) / 2 + bottom; + var minX = (imageWidth - this.containerRect.width) / 2; + var maxX = (this.containerRect.width - imageWidth) / 2; + var possibleSwipeCords = { + minY: minY, + maxY: maxY, + minX: minX, + maxX: maxX, + }; + return possibleSwipeCords; + }; + Zoom.prototype.setZoomSwipeStyles = function (LGel, distance) { + LGel.css('transform', 'translate3d(' + distance.x + 'px, ' + distance.y + 'px, 0)'); + }; + Zoom.prototype.zoomSwipe = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isMoved = false; + // Allow x direction drag + var allowX = false; + // Allow Y direction drag + var allowY = false; + var startTime = new Date(); + var endTime = new Date(); + var possibleSwipeCords; + var _LGel; + var $item = this.core.getSlideItem(this.core.index); + this.core.$inner.on('touchstart.lg', function (e) { + // Allow zoom only on image + if (!_this.isImageSlide(_this.core.index)) { + return; + } + $item = _this.core.getSlideItem(_this.core.index); + if ((_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) && + e.touches.length === 1 && + _this.core.outer.hasClass('lg-zoomed')) { + e.preventDefault(); + startTime = new Date(); + _this.core.touchAction = 'zoomSwipe'; + _LGel = _this.core + .getSlideItem(_this.core.index) + .find('.lg-img-wrap') + .first(); + var dragAllowedAxises = _this.getDragAllowedAxises(0); + allowY = dragAllowedAxises.allowY; + allowX = dragAllowedAxises.allowX; + if (allowX || allowY) { + startCoords = _this.getSwipeCords(e); + } + possibleSwipeCords = _this.getPossibleSwipeDragCords(); + // reset opacity and transition duration + _this.core.outer.addClass('lg-zoom-dragging lg-zoom-drag-transition'); + } + }); + this.core.$inner.on('touchmove.lg', function (e) { + if (e.touches.length === 1 && + _this.core.touchAction === 'zoomSwipe' && + (_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target))) { + e.preventDefault(); + _this.core.touchAction = 'zoomSwipe'; + endCoords = _this.getSwipeCords(e); + var distance = _this.getZoomSwipeCords(startCoords, endCoords, allowX, allowY, possibleSwipeCords); + if (Math.abs(endCoords.x - startCoords.x) > 15 || + Math.abs(endCoords.y - startCoords.y) > 15) { + isMoved = true; + _this.setZoomSwipeStyles(_LGel, distance); + } + } + }); + this.core.$inner.on('touchend.lg', function (e) { + if (_this.core.touchAction === 'zoomSwipe' && + (_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target))) { + e.preventDefault(); + _this.core.touchAction = undefined; + _this.core.outer.removeClass('lg-zoom-dragging'); + if (!isMoved) { + return; + } + isMoved = false; + endTime = new Date(); + var touchDuration = endTime.valueOf() - startTime.valueOf(); + _this.touchendZoom(startCoords, endCoords, allowX, allowY, touchDuration); + } + }); + }; + Zoom.prototype.zoomDrag = function () { + var _this = this; + var startCoords = {}; + var endCoords = {}; + var isDragging = false; + var isMoved = false; + // Allow x direction drag + var allowX = false; + // Allow Y direction drag + var allowY = false; + var startTime; + var endTime; + var possibleSwipeCords; + var _LGel; + this.core.outer.on('mousedown.lg.zoom', function (e) { + // Allow zoom only on image + if (!_this.isImageSlide(_this.core.index)) { + return; + } + var $item = _this.core.getSlideItem(_this.core.index); + if (_this.$LG(e.target).hasClass('lg-item') || + $item.get().contains(e.target)) { + startTime = new Date(); + _LGel = _this.core + .getSlideItem(_this.core.index) + .find('.lg-img-wrap') + .first(); + var dragAllowedAxises = _this.getDragAllowedAxises(0); + allowY = dragAllowedAxises.allowY; + allowX = dragAllowedAxises.allowX; + if (_this.core.outer.hasClass('lg-zoomed')) { + if (_this.$LG(e.target).hasClass('lg-object') && + (allowX || allowY)) { + e.preventDefault(); + startCoords = _this.getDragCords(e); + possibleSwipeCords = _this.getPossibleSwipeDragCords(); + isDragging = true; + _this.core.outer + .removeClass('lg-grab') + .addClass('lg-grabbing lg-zoom-drag-transition lg-zoom-dragging'); + // reset opacity and transition duration + } + } + } + }); + this.$LG(window).on("mousemove.lg.zoom.global" + this.core.lgId, function (e) { + if (isDragging) { + isMoved = true; + endCoords = _this.getDragCords(e); + var distance = _this.getZoomSwipeCords(startCoords, endCoords, allowX, allowY, possibleSwipeCords); + _this.setZoomSwipeStyles(_LGel, distance); + } + }); + this.$LG(window).on("mouseup.lg.zoom.global" + this.core.lgId, function (e) { + if (isDragging) { + endTime = new Date(); + isDragging = false; + _this.core.outer.removeClass('lg-zoom-dragging'); + // Fix for chrome mouse move on click + if (isMoved && + (startCoords.x !== endCoords.x || + startCoords.y !== endCoords.y)) { + endCoords = _this.getDragCords(e); + var touchDuration = endTime.valueOf() - startTime.valueOf(); + _this.touchendZoom(startCoords, endCoords, allowX, allowY, touchDuration); + } + isMoved = false; + } + _this.core.outer.removeClass('lg-grabbing').addClass('lg-grab'); + }); + }; + Zoom.prototype.closeGallery = function () { + this.resetZoom(); + this.zoomInProgress = false; + }; + Zoom.prototype.destroy = function () { + // Unbind all events added by lightGallery zoom plugin + 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 = false; + }; + return Zoom; + }()); + + return Zoom; + +}))); diff --git a/blog.md b/blog.md new file mode 100644 index 0000000..f93f2ee --- /dev/null +++ b/blog.md @@ -0,0 +1,10 @@ +--- +layout: default +title: Meldungen +--- + + {% for post in site.posts %} + - [**{{ post.title }}**]({{ post.url }}) + {{ post.excerpt }} + {% endfor %} + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..7cccd1c --- /dev/null +++ b/index.html @@ -0,0 +1,68 @@ +--- +title: Worum geht es? +layout: default +--- +

    Scherbengericht jetzt

    + +

    + Braucht die real existierende Demokratie eine Machtbegrenzung? +

    + +
    +
    + +
    +
    +

    + Im antiken griechischen Vorbild – der Demokratie von Athen + in der Zeit des Perikles – gab es dafür u.a. die Institution des + Scherbengerichts (οστρακισμος), bei der die Bürger jährlich + einen Politiker, wenn er der Errichtung der Tyrannei verdächtig + war, in die Verbannung wählen konnten. Verbannten wurde für + 10 Jahre das Eigentum konfisziert, jegliche geschäftliche oder + politische Betätigung verboten und unter Androhung von Strafe + der Aufenthalt im Land untersagt. Zur Stimmabgabe nutzte man + die Scherben zerbrochener Tongefäße. +

    +
    +
    + + +

    + Lassen Sie es uns wiederbeleben, machen Sie mit! +

    + +
    +
    + +
    +
    + Von welchem Politiker oder Oligarchen + geht derzeit die größte Gefahr für unser Land aus? + (etwa durch anhaltenden Machtmißbrauch + oder zu erwartende Machtergreifung – + oder wegen Kriegstreiberei) + Wen würden Sie deshalb (geheim) + in die Verbannung wählen? +
    +
    + +

    + Schreiben Sie den Namen ihrer Wahl + auf einen Stimmzettel (als moderne Scherbe) + und werfen ihn in die Urne! +

    + +
    +
    + +
    +
    + Jeder Bürger hat nur eine Stimme! + Die Auszählung erfolgt abends vor Ort öffentlich. + + Die Ergebnisse werden dann hier + bekanntgegeben. +
    +
    +