diff --git a/README.md b/README.md index 7fd5aca..23029ee 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ -Demo  •  Getting Started  •  Gallery Groups  •  Options  •  Styling  •  API  •  Custom Builds  •  Changelog +Demo  •  Getting Started  •  Gallery Groups  •  Options  •  Styling  •  API  •  Changelog ## Whats new in 0.7.0? @@ -50,8 +50,9 @@ Alternatively you can: - Adaptive responsive images (by viewport size, pixel ratio and available internet bandwidth) - Auto-fit images and videos (as "contain" or as "cover") - Custom Controls +- Fully configurable via markup - Loading Spinner -- Prefetch next image (background task) +- Prefetch next image - Custom options - Simply customize via markup (data-attributes) - Arrange built-in animations @@ -234,25 +235,13 @@ You can also load modules via CDN, e.g.: The ES6 modules are not minified. Please use your favored bundler or build tool for this purpose. -### Basic Setup +## Basic Usage (Markup) -__1. Just insert the script resource tag right after the documents head:__ +#### Anchor + Images -> When you need to add custom styling through css class modifications it is recommended to load the library before you load the css which contains the modifications. Otherwise you have to add an _"!important"_ flag to override existing styles. +The most simple way is the combination of img tags as preview images (thumbs) wrapped in an anchor element which points to the fully sized image. The advantage of this workaround is it fully falls back to a classical behavior. It is the universal markup language which all web tools already understand. Therefore, it may have some advantages for SEO also. -```html - - - - - - - - - -``` - -__2. Add the class ___spotlight___ to an anchor element accordingly, e.g.:__ +Just add the class ___spotlight___ to an anchor element accordingly, e.g.: ```html @@ -266,23 +255,27 @@ __2. Add the class ___spotlight___ to an anchor element accordingly, e.g.:__ ``` -This also works with dynamically loaded content. There is no need to inject listeners on new elements. Instead Spotlight make use of global event capturing. +This also works with dynamically loaded content. There is no need to inject listeners on new elements. Instead, Spotlight make use of global event capturing. + + -Alternatively you can also use the Spotlight API for programmatically use. +#### Non-Anchor Elements -__Usage with non-anchor elements:__ +Alternatively you can use non-anchor elements also: ```html
-
+ ``` -Pretty much the same like anchors but use ___data-src___ instead of ___href___. +Pretty much the same like anchors but uses ___data-src___ instead of ___href___. ## Gallery-Groups +Grouping galleries is useful when you have multiple images on your page which should be separated into groups, instead of adding all images to one single gallery when opened. + Give one of the outer wrapping element the class ___spotlight-group___, e.g.: ```html @@ -310,14 +303,18 @@ Give one of the outer wrapping element the class ___spotlight-group___, e.g.:
``` - +Each of these groups now opens in its own gallery. + +Gallery-Groups are also useful to declare global configuration as markup just once (group options inheritance). + + ## Options -Pass options as declarative via data-attributes in the HTML markup or use the Spotlight API. +Pass options declarative via data-attributes in the HTML markup or use the Spotlight API. -> When using markup follow these style: `data-option="value"` (change _option_ and _value_ accordingly), e.g.: ``. +> When using markup follow these style: `data-option="value"` (change _option_ and _value_ accordingly), e.g.: ``. -You can either apply the following data-attributes to the ___spotlight-group___ wrapper element or apply them separately to each ___spotlight___ anchor element (that also overrides group definitions). +You can either apply the following data-attributes to the ___spotlight-group___ wrapper element or apply them separately to each ___spotlight___ anchor element (that also overrides group definition inheritance). @@ -325,6 +322,7 @@ You can either apply the following data-attributes to the ___spotlight-group___ + @@ -334,194 +332,274 @@ You can either apply the following data-attributes to the ___spotlight-group___ - - - - - - + + + - - - + + + + - + + - + + - + - + + - + - + + - + + + + + + + + + + + + + + + + + + + - + + + - - - + + + + - - - + + + + + + + + + + + - + + + - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Option         Values DescriptionDefault
index Sets the starting index when showing the gallery by using the Spotlight API. The index starts from 1.
onchange - function(index) - - Pass a callback function which is get fired every time when a page has changed (the first parameter is equal to the new index).
- Note: The image may not have been fully loaded when the event is fired (preloading phase). The index starts from 1. -
1
animation + string
+ Array<string>
"fade"
"slide"
"scale"
- "flip"
- Change animation (use built-ins)

- Note: Could also combined as comma-separated list, e.g: data-animation="slide,fade,scale" (this is the default animation). + Change animation (use built-ins or custom classname)
+ Note: Markup as comma-separated list, e.g: data-animation="slide,fade,scale".
slide, fade, scale
control - string + string
+ Array<string>
Show/hide control elements as "whitelisted" through a comma-separated list, e.g. data-control="autofit,page,fullscreen" page, zoom, autofit, fullscreen, close
autohidetrue / false / numberEnable/disable automatically hide controls when inactive, also set cooldown timepagetrue / falseShow/hide page in the toolbartrue
fullscreen true / falseShow/hide fullscreen buttonShow/hide fullscreen button (automatically hides when not supported by the browser)true
zoom true / falseShow/hide both zoom buttonsShow/hide both zoom buttons in the toolbartrue
zoominzoom-in true / falseShow/hide zoom-in buttonShow/hide zoom-in button in the toolbartrue
zoomoutzoom-out true / falseShow/hide zoom-out buttonShow/hide zoom-out button in the toolbartrue
autofit true / falseShow/hide autofit buttonShow/hide autofit button in the toolbartrue
downloadtrue / falseShow/hide the download icon in the toolbarfalse
closetrue / falseShow/hide the close icon in the toolbartrue
theme true / false Show/hide theme buttonfalse
player true / false / number Show/hide player button, also set delay in seconds between each tickfalse
autoplay true / false Autoplay when opening gallery (also requires the option player to be set)false
progress true / falseShow/hide autoplay progress barShow/hide the animated autoplay progress bartrue
infinite true / false Restart from beginning when no slides leftfalse
theme"white"
"dark"
Change the default themefit"contain"
"cover"
Auto-fit the media either as "contain" or as "cover"contain
pagetrue / falseShow/hide pageautohidetrue / false / numberEnable/disable automatically hide controls when inactive, also set cooldown time in seconds.7
themestring
"white"
The classname of your custom theme. The theme "white" is a built-in theme.null
title string / falseSet image title or hide it

Note: When using image elements, this attribute will also inherit automatically from <img alt="...">. To prevent this behavior you can set data-title="false". This will hide the title regardless of any image alt-attributes.
Set image title or hide it
Note: When using image elements, this attribute will also inherit automatically from <img alt="..."> as well as from <img title="...">. To prevent this behavior you can set data-title="false" explicitly. This will hide the title regardless of any image alt-attributes.
null
description string / false Set image description or hide itnull
preloaderspinner true / falseEnable/disable preloading of the current image (also hides spinner)Enable/disable the spinner. When disabled the image will not hide until it is fully loaded, that could be useful for progressive jpeg.true
prefetchpreload true / false Enable/disable preloading of the next imagetrue
buttonstrEnable/disable a button in the footer section, also set button text.
Note: When using as markup you have to provide a click target for the button or you can assign an onclick callback via options when used programmatically.
null
button-hrefstrWhen using a button as markup you can provide a click target for the button, e.g. <a button="click me" button-href="https://domain.com">.null
onchange + function(index, options) + + Pass a callback function which is get fired every time when a page/slide has changed. The first parameter holds the new page index, the second parameter provides the inherited option payload for this page.
+ Note: The image may not have been fully loaded when the event is fired (preloading phase). The index starts from 1. +
null
onshow
onclose
+ function(index) + + These callback functions are called when opening or closing the gallery (the first parameter holds the current page index). + null
onclick + function(index, options) + + A callback function which is getting fired when the optional button in the footer sections was clicked. The first parameter holds the current page index, the second parameter provides the inherited option payload for this page. + null
- -##### Example: + +##### Group Option Inheritance ```html -
- +
+ - - This is a title. + + This is also a title. + + + This is a hidden title.
``` -__Hint:__ The 2nd image gets the title "Untitled" from the group attributes. - -Control elements could also __whitelisted__ as a comma-separated list, e.g.: +__Note:__ The 2nd image gets the title "Group title" from the group attributes, on the last image the title is explicitly set to be hidden. -```html -
-``` - -> Use a whitelist to enable controls gets priority over other ambiguous options. +Control elements and animations has to be __whitelisted__ as a comma-separated list. -The same from above as __explicitly__: +## Adaptive Responsive Images -```html -
-``` +> This feature will improve overall performance of your page/application a lot, especially for mobile devices and bad internet connections. -> When control attributes are not specified they are automatically enabled by default. +You can declare a set of the same image in multiple dimensions and quality. Spotlight will pick the optimal version by taking into account: -Therefore the example above could be shortened to: +1. The browsers max resolution +2. The device screen pixel ration +3. The available internet connection bandwidth +Save your images in several sizes and resolutions and assign the __longest__ dimension of both sides (width, height) like this: ```html -
+ + + ``` -Since "zoom" is a shorthand for both zoom buttons, this is the same: +When clicked on it Spotlight will pick the optimum choice. -```html -
-``` +This markup completely falls back to standard browser behavior when something goes wrong, also it is SEO friendly. ## Spotlight API @@ -664,77 +742,30 @@ Spotlight.show( ); ``` -> __Note:__ You may need to perform `npm run build` initially to make pre-compiled files available. - ## Custom Styling To add custom styling just override CSS classes accordingly: ```css -#spotlight { - /* font styles, background */ -} -``` -```css -#spotlight .title{ - /* image title */ -} -``` -```css -#spotlight .description{ - /* image description */ -} -``` -```css -#spotlight .page{ - /* current page */ -} -``` -```css -#spotlight .fullscreen{ - /* button fullscreen */ -} -``` -```css -#spotlight .autofit{ - /* button autofit */ -} -``` -```css -#spotlight .zoom-out{ - /* button zoom out */ -} -``` -```css -#spotlight .zoom-in{ - /* button zoom in */ -} -``` -```css -#spotlight .theme{ - /* button theme */ -} -``` -```css -#spotlight .player{ - /* button autoplay */ -} -``` -```css -#spotlight .close{ - /* button close */ -} -``` -```css -#spotlight .arrow-left{ - /* button arrow left */ -} -``` -```css -#spotlight .arrow-right{ - /* button arrow right */ -} +#spotlight { /* main font styles, background */ } +.spl-page { /* current page (toolbar) */ } +.spl-fullscreen { /* button fullscreen (toolbar) */ } +.spl-autofit { /* button autofit (toolbar) */ } +.spl-zoom-out { /* button zoom out (toolbar) */ } +.spl-zoom-in { /* button zoom in (toolbar) */ } +.spl-theme { /* button theme (toolbar) */ } +.spl-player { /* button autoplay (toolbar) */ } +.spl-download { /* button download (toolbar) */ } +.spl-close { /* button close (toolbar) */ } +.spl-arrow-left { /* button page previous */ } +.spl-arrow-right { /* button page next */ } +.spl-spinner { /* preloading spinner */ } +.spl-title { /* image title */ } +.spl-description { /* image description */ } +.spl-button { /* button footer */ } +.spl-header { /* the header wrapping element */ } +.spl-footer { /* the footer wrapping element */ } ``` @@ -745,13 +776,13 @@ __Customize builtin themes__ Use the same classes as above: ```css -#spotlight.white .title{ +#spotlight.white .spl-title{ /* image title in white theme */ } ``` ```css -#spotlight.dark{ +#spotlight{ /* main background in dark theme */ } ``` @@ -761,10 +792,10 @@ __Create New Themes__ Define styles, e.g. for the custom theme name "my-theme": ```css -#spotlight.my-theme .title{ +.my-theme .spl-title{ /* image title in custom theme */ } -#spotlight.my-theme{ +.my-theme{ /* main background in custom theme */ } ``` @@ -797,7 +828,7 @@ You can define your own custom animation by: 1. Extending the default styles (when image is shown) and corresponding transitions as follows: ```css -#spotlight .scene img{ +.spl-scene > *{ filter: grayscale(0); transition: filter 1s ease-out, opacity 0.5s ease-out; @@ -807,7 +838,7 @@ You can define your own custom animation by: 2. Providing styles for the __hidden state__ of the transition by adding a custom animation name as a class: ```css -#spotlight .scene img.my-animation{ +.spl-scene .my-animation{ opacity: 0 !important; filter: grayscale(1); } @@ -829,49 +860,20 @@ Spotlight.show([ /* Gallery */ ],{ }); ``` - -## Preload Library / Async Load - -> If you like to override css classes for custom styling you may need to add ___!important___ flag to the css property value. - -```html - - - - - - - - - - -``` - -Initialize library manually (once): - -```js -Spotlight.init(); -``` - -When using Spotlight exclusively through the API it is recommended to follow this practice. But there are some important facts you might need to know: - -1. When loading the library before loading other stylesheets (which modifies the Spotlight default theme) you do not have to add a "!important" flag to the styles. -2. When using Spotlight with anchors it is recommended to load the library in the head section of the document to prevent executing the default anchor behavior when the user has clicked during page load. -3. In rare situations it also might produce a short flashing/reflow after page load, depending on your stack. Moving the script tag into the head section will solve this issue. - ## Custom Builds -> __Note:__ You can modify all source files e.g. stylesheets, template and also the icon files located in _/src/img/_. Providing a more handy way to pass custom icons is coming soon. +Go to the root directory of Spotlight and run: +```cmd +npm install +``` -Perform a full build: -```bash +Perform a build: +```cmd npm run build ``` -The destination folder of the build is: _/dist/_ +The final build is located in the `dist/` folder. --- diff --git a/dist/js/spotlight.min.js b/dist/js/spotlight.min.js index 3e09a29..b06da31 100644 --- a/dist/js/spotlight.min.js +++ b/dist/js/spotlight.min.js @@ -1,30 +1,30 @@ /** - * Spotlight.js v0.7.1 + * Spotlight.js v0.7.2 * Copyright 2019 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/spotlight */ -(function(){'use strict';Object.assign||(Object.assign=function(a,b){console.log("assign",a,b);for(var c=Object.keys(b),e=0,f;e
";/* +(function(){'use strict';Object.assign||(Object.assign=function(a,b){for(var c=Object.keys(b),e=0,f;e
";/* toggle_autofit &&*/ -var l="theme download play page close autofit zoom-in zoom-out arrow-left arrow-right fullscreen".split(" "),fa={page:1,close:1,autofit:1,"zoom-in":1,"zoom-out":1,"arrow-left":1,"arrow-right":1,fullscreen:1},ha=document.createElement("video"),ia=document.createElement("div"),m={},ja={},n,p,ka,la,r,ma,t,u,v,na,oa,pa,w,x,y,z,A,B,C,qa,ra,sa,ta,ua,va,D,E,wa,xa,ya,za,Aa,Ba,Ca,F,G,H,I,J,K,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,L,M,Na,N,O,Oa,P,Pa;h(document,"click",Qa); -function Ra(){function a(c){return m[c]=(k||document).getElementsByClassName("spl-"+c)[0]}G=document.body;K=a("scene");Da=a("header");Ea=a("footer");Fa=a("title");Ga=a("description");Ha=a("button");Ia=a("arrow-left");Ja=a("arrow-right");La=a("page");L=a("progress");I=[a("pane")];Q("close",Sa);G[P="requestFullscreen"]||G[P="msRequestFullscreen"]||G[P="webkitRequestFullscreen"]||G[P="mozRequestFullscreen"]||(P="");P?(Pa=P.replace("request","exit").replace("mozRequest","mozCancel").replace("Request", -"Exit"),Ka=Q("fullscreen",Ta)):l.pop();Q("autofit",R);Q("zoom-in",Ua);Q("zoom-out",Va);Q("theme",Wa);Ma=Q("play",S);Q("download",Xa);h(Ia,"click",Ya);h(Ja,"click",T);var b=a("track");h(b,"mousedown",Za);h(b,"mousemove",$a);h(b,"mouseleave",ab);h(b,"mouseup",ab);h(b,"touchstart",Za,{passive:!1});h(b,"touchmove",$a,{passive:!0});h(b,"touchend",ab);h(Ha,"click",function(){ya?ya(x,A):xa&&(location.href=xa)})} -function Q(a,b){var c=ia.cloneNode(!1);c.className="spl-"+a;h(c,"click",b);Da.appendChild(c);return m[a]=c}function Qa(a){var b=a.target.closest(".spotlight");if(b){ea(a,!0);a=b.closest(".spotlight-group");z=(a||document).getElementsByClassName("spotlight");for(var c=0;c.5*(0>a?1:a?-1:0)?Va():Ua())}function S(a){("boolean"===typeof a?a:!N)?N||(N=setInterval(T,1E3*za),Ma.classList.add("on"),qa&&nb(!0)):N&&(N=clearInterval(N),d(Ma,"on"),qa&&nb())} -function nb(a){ca(L,function(){g(L,"transition-duration","");g(L,"transform","")});a&&(g(L,"transition-duration",za+"s"),g(L,"transform","translateX(0)"))}function V(){va&&(Oa=Date.now()+1E3*va-50,O||(k.classList.add("menu"),ob(1E3*va)))}function ob(a){O=setTimeout(function(){var b=Date.now();b>=Oa?(d(k,"menu"),O=0):ob(Oa-b)},a)}function pb(a){"boolean"===typeof a&&(O=a?O:0);O?(O=clearTimeout(O),d(k,"menu")):V()} -function Za(a){ea(a,!0);na=!0;oa=!1;var b=a.touches;b&&(b=b[0])&&(a=b);pa=t*v<=r;ka=a.pageX;la=a.pageY;U(H)}function ab(a){ea(a);if(na){if(oa){if(pa&&oa){var b=(a=n<-(r/7)&&(xr/7&&(1b?n=b:n<-b&&(n=-b),u*v>ma&&(b=(u*v-ma)/2,p-=la-(la=a.pageY),p>b?p=b:p<-b&&(p=-b)));oa=!0;X(n,p)}else V()} -function Ta(a){("boolean"===typeof a?a:document.fullscreen||document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)?(document[Pa](),d(Ka,"on")):(k[P](),Ka.classList.add("on"))}function Wa(a){"object"===typeof a&&(a=E?"":"white");E!==a&&(E&&d(k,E),a&&k.classList.add(a),E=a)}function R(a){"boolean"===typeof a&&(w=!a);(w=1===v&&!w)?J.classList.add("autofit"):d(J,"autofit");g(J,"transform","");t=J.width;u=J.height;v=1;p=n=0;U(H);X();V()} -function Ua(a){var b=v/.65;50>=b&&(w&&R(),n/=.65,p/=.65,X(n,p),qb(b));a||V()}function Va(a){var b=.65*v;w&&R();1<=b&&(1===b?n=p=0:(n*=.65,p*=.65),X(n,p),qb(b));a||V()}function qb(a){v=a||1;g(J,"transform","translate(-50%, -50%) scale("+v+")")}function Xa(){var a=document.createElement("a");a.href=J.src;a.download=J.src.substring(J.src.lastIndexOf("/")+1);G.appendChild(a);a.click();G.removeChild(a)} -function Sa(a){setTimeout(function(){G.removeChild(k);H=J=M=A=B=z=ra=sa=ta=ya=null},200);d(G,"hide-scrollbars");d(k,"show");fb();history.go(!0===a?-1:-2);N&&S(!1);J&&rb(J);ta&&ta()}function rb(a){if(a.g)a.g.appendChild(a),a.g=null;else{var b=a.parentNode;b&&b.removeChild(a)}}function Ya(a){a&&V();if(1x;x=a;db(b);return!0}}var sb=navigator.connection,tb=window.devicePixelRatio||1; -function ub(a,b,c){var e;if("video"===J||!(e=c.src||c.href||a.src||a.href)){a=Object.keys(c);for(var f=0,q;f.5*(0>a?1:a?-1:0)?Ua():Ta())}function S(a){("boolean"===typeof a?a:!N)?N||(N=setInterval(T,1E3*ya),La.classList.add("on"),pa&&mb(!0)):N&&(N=clearInterval(N),d(La,"on"),pa&&mb())}function mb(a){ca(L,function(){g(L,"transition-duration","");g(L,"transform","")});a&&(g(L,"transition-duration",ya+"s"),g(L,"transform","translateX(0)"))}function V(){ua&&(Na=Date.now()+1E3*ua-50,O||(k.classList.add("menu"),ob(1E3*ua)))} +function ob(a){O=setTimeout(function(){var b=Date.now();b>=Na?(d(k,"menu"),O=0):ob(Na-b)},a)}function pb(a){"boolean"===typeof a&&(O=a?O:0);O?(O=clearTimeout(O),d(k,"menu")):V()}function Ya(a){ea(a,!0);ma=!0;na=!1;var b=a.touches;b&&(b=b[0])&&(a=b);oa=t*v<=r;ja=a.pageX;ka=a.pageY;U(H)}function $a(a){ea(a);if(ma){if(na){if(oa&&na){var b=(a=n<-(r/7)&&(xr/7&&(1b?n=b:n<-b&&(n=-b),u*v>la&&(b=(u*v-la)/2,p-=ka-(ka=a.pageY),p>b?p=b:p<-b&&(p=-b)));na=!0;Y(n,p)}else V()}function Sa(a){var b=ib();if("boolean"!==typeof a||a!==!!b)if(b)document[Oa]();else k[P]()}function Va(a){"object"===typeof a&&(a=E?"":"white");E!==a&&(E&&d(k,E),a&&k.classList.add(a),E=a)} +function R(a){"boolean"===typeof a&&(w=!a);(w=1===v&&!w)?J.classList.add("autofit"):d(J,"autofit");g(J,"transform","");t=J.width;u=J.height;v=1;p=n=0;U(H);Y();V()}function Ta(a){var b=v/.65;50>=b&&(w&&R(),n/=.65,p/=.65,Y(n,p),qb(b));a||V()}function Ua(a){var b=.65*v;w&&R();1<=b&&(1===b?n=p=0:(n*=.65,p*=.65),Y(n,p),qb(b));a||V()}function qb(a){v=a||1;g(J,"transform","translate(-50%, -50%) scale("+v+")")} +function Wa(){var a=document.createElement("a");a.href=J.src;a.download=J.src.substring(J.src.lastIndexOf("/")+1);G.appendChild(a);a.click();G.removeChild(a)}function Ra(a){setTimeout(function(){G.removeChild(k);H=J=M=A=B=z=qa=ra=sa=xa=null},200);d(G,"hide-scrollbars");d(k,"show");Sa(!1);eb();history.go(!0===a?-1:-2);N&&S(!1);J&&rb(J);sa&&sa()}function rb(a){if(a.g)a.g.appendChild(a),a.g=null;else{var b=a.parentNode;b&&b.removeChild(a)}} +function Xa(a){a&&V();if(1x;x=a;cb(b);return!0}}var tb=navigator.connection,ub=window.devicePixelRatio||1; +function vb(a,b,c){var e;if("video"===J||!(e=c.src||c.href||a.src||a.href)){a=Object.keys(c);for(var f=0,q;f*{position:absolute;width:auto;height:auto;max-width:100%;max-height:100%;left:50%;top:50%;margin:0;padding:0;border:0;transform:translate(-50%,-50%) scale(1);transition:transform .65s cubic-bezier(.3,1,.3,1),opacity .65s ease;contain:layout style;will-change:transform,opacity;visibility:hidden}.spl-header,.spl-pane{width:100%;position:absolute}.spl-pane{top:0;transition:transform .65s cubic-bezier(.3,1,.3,1);will-change:transform}.spl-header{top:0;height:50px;text-align:right;background-color:rgba(0,0,0,.45);transform:translateY(-100px);transition:transform .35s ease;overflow:hidden}#spotlight.menu .spl-header,.spl-header:hover{transform:translateY(0)}.spl-header div{display:inline-block;vertical-align:middle;white-space:nowrap;width:50px;height:50px;opacity:.5}.spl-progress{position:absolute;top:0;width:100%;height:3px;background-color:rgba(255,255,255,.45);transform:translateX(-100%);transition:transform linear}.spl-footer{position:absolute;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.45);line-height:20px;padding:20px 20px 0;padding-bottom:env(safe-area-inset-bottom,0);text-align:left;font-size:15px;font-weight:400}.spl-title{font-size:22px}.spl-button,.spl-description,.spl-title{margin-bottom:20px}.spl-button{display:inline-block;background:#fff;color:#000;border-radius:5px;padding:10px 20px;cursor:pointer}.spl-arrow-left,.spl-arrow-right,.spl-page~*{background-position:center;background-repeat:no-repeat}.spl-page{float:left;width:auto;line-height:50px}.spl-page~*{background-size:21px;float:right}.spl-fullscreen{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9Ii0xIC0xIDI2IDI2IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggM0g1YTIgMiAwIDAgMC0yIDJ2M20xOCAwVjVhMiAyIDAgMCAwLTItMmgtM20wIDE4aDNhMiAyIDAgMCAwIDItMnYtM00zIDE2djNhMiAyIDAgMCAwIDIgMmgzIi8+PC9zdmc+)}.spl-fullscreen.on{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDN2M2EyIDIgMCAwIDEtMiAySDNtMTggMGgtM2EyIDIgMCAwIDEtMi0yVjNtMCAxOHYtM2EyIDIgMCAwIDEgMi0yaDNNMyAxNmgzYTIgMiAwIDAgMSAyIDJ2MyIvPjwvc3ZnPg==)}.spl-autofit{background-image:url(data:image/svg+xml;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xNCwxOCwxMiwxOHoiLz48cGF0aCBkPSJNMTIsN3YxMGMyLjc1NywwLDUtMi4yNDMsNS01UzE0Ljc1Nyw3LDEyLDd6Ii8+PC9nPjwvc3ZnPg==)}.spl-play{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSItMC41IC0wLjUgMjUgMjUiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPjxwb2x5Z29uIGZpbGw9IiNmZmYiIHBvaW50cz0iMTAgOCAxNiAxMiAxMCAxNiAxMCA4Ii8+PC9zdmc+)}.spl-play.on{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSItMC41IC0wLjUgMjUgMjUiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPjxsaW5lIHgxPSIxMCIgeDI9IjEwIiB5MT0iMTUiIHkyPSI5Ii8+PGxpbmUgeDE9IjE0IiB4Mj0iMTQiIHkxPSIxNSIgeTI9IjkiLz48L3N2Zz4=);animation:pulsate 1s ease infinite}.spl-close{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIyIDIgMjAgMjAiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZSB4MT0iMTgiIHgyPSI2IiB5MT0iNiIgeTI9IjE4Ii8+PGxpbmUgeDE9IjYiIHgyPSIxOCIgeTE9IjYiIHkyPSIxOCIvPjwvc3ZnPg==)}.spl-arrow-left,.spl-arrow-right{position:absolute;top:50%;left:20px;width:50px;height:50px;opacity:.65;background-color:rgba(0,0,0,.45);border-radius:100%;cursor:pointer;margin-top:-25px;transform:translateX(-100px);transition:transform .35s ease;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cG9seWxpbmUgcG9pbnRzPSIxNSAxOCA5IDEyIDE1IDYiLz48L3N2Zz4=);background-size:30px}.spl-arrow-right{left:auto;right:20px;transform:translateX(100px) scaleX(-1)}#spotlight.menu .spl-arrow-left{transform:translateX(0)}#spotlight.menu .spl-arrow-right{transform:translateX(0) scaleX(-1)}@media (hover:hover){.spl-page~div{cursor:pointer;transition:opacity .2s ease}.spl-arrow-left:hover,.spl-arrow-right:hover,.spl-page~div:hover{opacity:1}}@media (max-width:500px){.spl-header div{width:44px}.spl-footer .spl-title{font-size:20px}.spl-footer{font-size:14px}.spl-arrow-left,.spl-arrow-right{width:35px;height:35px;margin-top:-17.5px;background-size:15px 15px}.spl-spinner{background-size:30px 30px}}.hide-scrollbars{overflow:-moz-hidden-unscrollable;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{width:0}"; -var ca=document.getElementsByTagName("head")[0];ca.firstChild?ca.insertBefore(ba,ca.firstChild):ca.appendChild(ba);Object.assign||(Object.assign=function(a,b){console.log("assign",a,b);for(var c=Object.keys(b),e=0,f;e
";/* +(function(){'use strict';var aa=document.createElement("style");aa.innerHTML="@keyframes pulsate{0%,to{opacity:1}50%{opacity:.2}}#spotlight{position:fixed;top:0;width:100%;height:100%;z-index:99999;color:#fff;background-color:#000;opacity:0;overflow:hidden;-webkit-user-select:none;-ms-user-select:none;user-select:none;transition:opacity .2s ease-out;font-family:Arial,sans-serif;font-size:16px;font-weight:400;contain:strict;touch-action:none;pointer-events:none}#spotlight.show{opacity:1;transition:none;pointer-events:auto}#spotlight.white{color:#000;background-color:#fff}#spotlight.white .spl-arrow-left,#spotlight.white .spl-arrow-right,#spotlight.white .spl-page~*,#spotlight.white .spl-spinner{filter:invert(1)}#spotlight.white .spl-progress{background-color:rgba(0,0,0,.35)}#spotlight.white .spl-footer,#spotlight.white .spl-header{background-color:rgba(255,255,255,.65)}#spotlight .contain,#spotlight .cover{object-fit:cover;height:100%;width:100%}#spotlight .contain{object-fit:contain}#spotlight .autofit{object-fit:none;width:auto;height:auto;max-height:none;max-width:none;transition:none}.spl-scene,.spl-spinner,.spl-track{width:100%;position:absolute}.spl-track{height:100%;contain:strict}.spl-pane,.spl-scene{height:100%;contain:layout size}.spl-spinner{height:100%;background-position:center;background-repeat:no-repeat;background-size:42px;opacity:0}#spotlight.spinner .spl-spinner{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiNmZmYiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxKSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iLjY1Ij48Y2lyY2xlIHN0cm9rZS1vcGFjaXR5PSIuMTUiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIGQ9Ik0zNiAxOGMwLTkuOTQtOC4wNi0xOC0xOC0xOCI+PGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIGZyb209IjAgMTggMTgiIHRvPSIzNjAgMTggMTgiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+PC9wYXRoPjwvZz48L2c+PC9zdmc+);transition:opacity .2s linear .25s;opacity:1}.spl-scene{transition:transform .65s cubic-bezier(.1,1,.1,1);will-change:transform}.spl-pane>*{position:absolute;width:auto;height:auto;max-width:100%;max-height:100%;left:50%;top:50%;margin:0;padding:0;border:0;transform:translate(-50%,-50%) scale(1);transition:transform .65s cubic-bezier(.3,1,.3,1),opacity .65s ease;contain:layout style;will-change:transform,opacity;visibility:hidden}.spl-header,.spl-pane{width:100%;position:absolute}.spl-pane{top:0;transition:transform .65s cubic-bezier(.3,1,.3,1);will-change:transform}.spl-header{top:0;height:50px;text-align:right;background-color:rgba(0,0,0,.45);transform:translateY(-100px);transition:transform .35s ease;overflow:hidden}#spotlight.menu .spl-header,.spl-header:hover{transform:translateY(0)}.spl-header div{display:inline-block;vertical-align:middle;white-space:nowrap;width:50px;height:50px;opacity:.5}.spl-progress{position:absolute;top:0;width:100%;height:3px;background-color:rgba(255,255,255,.45);transform:translateX(-100%);transition:transform linear}.spl-footer{position:absolute;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.45);line-height:20px;padding:20px 20px 0;padding-bottom:env(safe-area-inset-bottom,0);text-align:left;font-size:15px;font-weight:400}.spl-title{font-size:22px}.spl-button,.spl-description,.spl-title{margin-bottom:20px}.spl-button{display:inline-block;background:#fff;color:#000;border-radius:5px;padding:10px 20px;cursor:pointer}.spl-arrow-left,.spl-arrow-right,.spl-page~*{background-position:center;background-repeat:no-repeat}.spl-page{float:left;width:auto;line-height:50px}.spl-page~*{background-size:21px;float:right}.spl-fullscreen{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9Ii0xIC0xIDI2IDI2IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggM0g1YTIgMiAwIDAgMC0yIDJ2M20xOCAwVjVhMiAyIDAgMCAwLTItMmgtM20wIDE4aDNhMiAyIDAgMCAwIDItMnYtM00zIDE2djNhMiAyIDAgMCAwIDIgMmgzIi8+PC9zdmc+)}.spl-fullscreen.on{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDN2M2EyIDIgMCAwIDEtMiAySDNtMTggMGgtM2EyIDIgMCAwIDEtMi0yVjNtMCAxOHY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TQiIHkxPSIxNSIgeTI9IjkiLz48L3N2Zz4=);animation:pulsate 1s ease infinite}.spl-close{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIyIDIgMjAgMjAiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZSB4MT0iMTgiIHgyPSI2IiB5MT0iNiIgeTI9IjE4Ii8+PGxpbmUgeDE9IjYiIHgyPSIxOCIgeTE9IjYiIHkyPSIxOCIvPjwvc3ZnPg==)}.spl-arrow-left,.spl-arrow-right{position:absolute;top:50%;left:20px;width:50px;height:50px;opacity:.65;background-color:rgba(0,0,0,.45);border-radius:100%;cursor:pointer;margin-top:-25px;transform:translateX(-100px);transition:transform .35s ease;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cG9seWxpbmUgcG9pbnRzPSIxNSAxOCA5IDEyIDE1IDYiLz48L3N2Zz4=);background-size:30px}.spl-arrow-right{left:auto;right:20px;transform:translateX(100px) scaleX(-1)}#spotlight.menu .spl-arrow-left{transform:translateX(0)}#spotlight.menu .spl-arrow-right{transform:translateX(0) scaleX(-1)}@media (hover:hover){.spl-page~div{cursor:pointer;transition:opacity .2s ease}.spl-arrow-left:hover,.spl-arrow-right:hover,.spl-page~div:hover{opacity:1}}@media (max-width:500px){.spl-header div{width:44px}.spl-footer .spl-title{font-size:20px}.spl-footer{font-size:14px}.spl-arrow-left,.spl-arrow-right{width:35px;height:35px;margin-top:-17.5px;background-size:15px 15px}.spl-spinner{background-size:30px 30px}}.hide-scrollbars{overflow:-moz-hidden-unscrollable;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{width:0}"; +var ca=document.getElementsByTagName("head")[0];ca.firstChild?ca.insertBefore(aa,ca.firstChild):ca.appendChild(aa);Object.assign||(Object.assign=function(a,b){for(var c=Object.keys(b),e=0,f;e
";/* toggle_autofit &&*/ -var l="theme download play page close autofit zoom-in zoom-out arrow-left arrow-right fullscreen".split(" "),ia={page:1,close:1,autofit:1,"zoom-in":1,"zoom-out":1,"arrow-left":1,"arrow-right":1,fullscreen:1},ja=document.createElement("video"),ka=document.createElement("div"),m={},la={},n,p,ma,na,r,oa,t,u,v,pa,qa,ra,w,x,y,z,A,B,C,sa,ta,ua,va,wa,xa,D,E,ya,za,Aa,Ba,Ca,Da,Ea,F,G,H,I,J,K,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,L,M,Pa,N,O,Qa,P,Ra;h(document,"click",Sa); -function Ta(){function a(c){return m[c]=(k||document).getElementsByClassName("spl-"+c)[0]}G=document.body;K=a("scene");Fa=a("header");Ga=a("footer");Ha=a("title");Ia=a("description");Ja=a("button");Ka=a("arrow-left");La=a("arrow-right");Na=a("page");L=a("progress");I=[a("pane")];Q("close",Ua);G[P="requestFullscreen"]||G[P="msRequestFullscreen"]||G[P="webkitRequestFullscreen"]||G[P="mozRequestFullscreen"]||(P="");P?(Ra=P.replace("request","exit").replace("mozRequest","mozCancel").replace("Request", -"Exit"),Ma=Q("fullscreen",Va)):l.pop();Q("autofit",R);Q("zoom-in",Wa);Q("zoom-out",Xa);Q("theme",Ya);Oa=Q("play",S);Q("download",Za);h(Ka,"click",$a);h(La,"click",T);var b=a("track");h(b,"mousedown",ab);h(b,"mousemove",bb);h(b,"mouseleave",cb);h(b,"mouseup",cb);h(b,"touchstart",ab,{passive:!1});h(b,"touchmove",bb,{passive:!0});h(b,"touchend",cb);h(Ja,"click",function(){Aa?Aa(x,A):za&&(location.href=za)})} -function Q(a,b){var c=ka.cloneNode(!1);c.className="spl-"+a;h(c,"click",b);Fa.appendChild(c);return m[a]=c}function Sa(a){var b=a.target.closest(".spotlight");if(b){ha(a,!0);a=b.closest(".spotlight-group");z=(a||document).getElementsByClassName("spotlight");for(var c=0;c.5*(0>a?1:a?-1:0)?Xa():Wa())}function S(a){("boolean"===typeof a?a:!N)?N||(N=setInterval(T,1E3*Ba),Oa.classList.add("on"),sa&&pb(!0)):N&&(N=clearInterval(N),d(Oa,"on"),sa&&pb())} -function pb(a){ea(L,function(){g(L,"transition-duration","");g(L,"transform","")});a&&(g(L,"transition-duration",Ba+"s"),g(L,"transform","translateX(0)"))}function V(){xa&&(Qa=Date.now()+1E3*xa-50,O||(k.classList.add("menu"),qb(1E3*xa)))}function qb(a){O=setTimeout(function(){var b=Date.now();b>=Qa?(d(k,"menu"),O=0):qb(Qa-b)},a)}function rb(a){"boolean"===typeof a&&(O=a?O:0);O?(O=clearTimeout(O),d(k,"menu")):V()} -function ab(a){ha(a,!0);pa=!0;qa=!1;var b=a.touches;b&&(b=b[0])&&(a=b);ra=t*v<=r;ma=a.pageX;na=a.pageY;U(H)}function cb(a){ha(a);if(pa){if(qa){if(ra&&qa){var b=(a=n<-(r/7)&&(xr/7&&(1b?n=b:n<-b&&(n=-b),u*v>oa&&(b=(u*v-oa)/2,p-=na-(na=a.pageY),p>b?p=b:p<-b&&(p=-b)));qa=!0;X(n,p)}else V()} -function Va(a){("boolean"===typeof a?a:document.fullscreen||document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)?(document[Ra](),d(Ma,"on")):(k[P](),Ma.classList.add("on"))}function Ya(a){"object"===typeof a&&(a=E?"":"white");E!==a&&(E&&d(k,E),a&&k.classList.add(a),E=a)}function R(a){"boolean"===typeof a&&(w=!a);(w=1===v&&!w)?J.classList.add("autofit"):d(J,"autofit");g(J,"transform","");t=J.width;u=J.height;v=1;p=n=0;U(H);X();V()} -function Wa(a){var b=v/.65;50>=b&&(w&&R(),n/=.65,p/=.65,X(n,p),sb(b));a||V()}function Xa(a){var b=.65*v;w&&R();1<=b&&(1===b?n=p=0:(n*=.65,p*=.65),X(n,p),sb(b));a||V()}function sb(a){v=a||1;g(J,"transform","translate(-50%, -50%) scale("+v+")")}function Za(){var a=document.createElement("a");a.href=J.src;a.download=J.src.substring(J.src.lastIndexOf("/")+1);G.appendChild(a);a.click();G.removeChild(a)} -function Ua(a){setTimeout(function(){G.removeChild(k);H=J=M=A=B=z=ta=ua=va=Aa=null},200);d(G,"hide-scrollbars");d(k,"show");hb();history.go(!0===a?-1:-2);N&&S(!1);J&&tb(J);va&&va()}function tb(a){if(a.g)a.g.appendChild(a),a.g=null;else{var b=a.parentNode;b&&b.removeChild(a)}}function $a(a){a&&V();if(1x;x=a;fb(b);return!0}}var ub=navigator.connection,vb=window.devicePixelRatio||1; -function wb(a,b,c){var e;if("video"===J||!(e=c.src||c.href||a.src||a.href)){a=Object.keys(c);for(var f=0,q;f.5*(0>a?1:a?-1:0)?Wa():Va())}function S(a){("boolean"===typeof a?a:!N)?N||(N=setInterval(T,1E3*Aa),Na.classList.add("on"),ra&&ob(!0)):N&&(N=clearInterval(N),d(Na,"on"),ra&&ob())}function ob(a){ea(L,function(){g(L,"transition-duration","");g(L,"transform","")});a&&(g(L,"transition-duration",Aa+"s"),g(L,"transform","translateX(0)"))}function V(){wa&&(Pa=Date.now()+1E3*wa-50,O||(k.classList.add("menu"),qb(1E3*wa)))} +function qb(a){O=setTimeout(function(){var b=Date.now();b>=Pa?(d(k,"menu"),O=0):qb(Pa-b)},a)}function rb(a){"boolean"===typeof a&&(O=a?O:0);O?(O=clearTimeout(O),d(k,"menu")):V()}function $a(a){ha(a,!0);oa=!0;pa=!1;var b=a.touches;b&&(b=b[0])&&(a=b);qa=t*v<=r;la=a.pageX;ma=a.pageY;U(H)}function bb(a){ha(a);if(oa){if(pa){if(qa&&pa){var b=(a=n<-(r/7)&&(xr/7&&(1b?n=b:n<-b&&(n=-b),u*v>na&&(b=(u*v-na)/2,p-=ma-(ma=a.pageY),p>b?p=b:p<-b&&(p=-b)));pa=!0;Y(n,p)}else V()}function Ua(a){var b=kb();if("boolean"!==typeof a||a!==!!b)if(b)document[Qa]();else k[P]()}function Xa(a){"object"===typeof a&&(a=E?"":"white");E!==a&&(E&&d(k,E),a&&k.classList.add(a),E=a)} +function R(a){"boolean"===typeof a&&(w=!a);(w=1===v&&!w)?J.classList.add("autofit"):d(J,"autofit");g(J,"transform","");t=J.width;u=J.height;v=1;p=n=0;U(H);Y();V()}function Va(a){var b=v/.65;50>=b&&(w&&R(),n/=.65,p/=.65,Y(n,p),sb(b));a||V()}function Wa(a){var b=.65*v;w&&R();1<=b&&(1===b?n=p=0:(n*=.65,p*=.65),Y(n,p),sb(b));a||V()}function sb(a){v=a||1;g(J,"transform","translate(-50%, -50%) scale("+v+")")} +function Ya(){var a=document.createElement("a");a.href=J.src;a.download=J.src.substring(J.src.lastIndexOf("/")+1);G.appendChild(a);a.click();G.removeChild(a)}function Ta(a){setTimeout(function(){G.removeChild(k);H=J=M=A=B=z=sa=ta=ua=za=null},200);d(G,"hide-scrollbars");d(k,"show");Ua(!1);gb();history.go(!0===a?-1:-2);N&&S(!1);J&&tb(J);ua&&ua()}function tb(a){if(a.g)a.g.appendChild(a),a.g=null;else{var b=a.parentNode;b&&b.removeChild(a)}} +function Za(a){a&&V();if(1x;x=a;eb(b);return!0}}var vb=navigator.connection,wb=window.devicePixelRatio||1; +function xb(a,b,c){var e;if("video"===J||!(e=c.src||c.href||a.src||a.href)){a=Object.keys(c);for(var f=0,q;f
Anchors & Images
- + Lorem ipsum dolor sit amet @@ -88,9 +88,9 @@

- - -
+ + +
@@ -100,7 +100,7 @@


Choose Modifier:

- +
diff --git a/package.json b/package.json index 5f71877..7a5a018 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spotlight.js", - "version": "0.7.1", + "version": "0.7.2", "description": "Modern HTML5 Image Gallery", "homepage": "https://github.com/nextapps-de/spotlight/", "author": "Thomas Wilkerling", diff --git a/src/js/helper.js b/src/js/helper.js index 11276f5..a1e48ab 100644 --- a/src/js/helper.js +++ b/src/js/helper.js @@ -134,3 +134,13 @@ export function cancelEvent(event, prevent){ //return false; } + +/** + * @param {!string} element + * @return {Element} + */ + +export function createElement(element){ + + return document.createElement(element); +} \ No newline at end of file diff --git a/src/js/polyfill.js b/src/js/polyfill.js index 4c3d687..2b0dde3 100644 --- a/src/js/polyfill.js +++ b/src/js/polyfill.js @@ -2,7 +2,7 @@ Object.assign || (Object.assign = function(target, source){ - console.log("assign", target, source); + //console.log("assign", target, source); const keys = Object.keys(/** @type {!Object} */(source)); @@ -18,7 +18,7 @@ Object.assign || (Object.assign = Element.prototype.closest || (Element.prototype.closest = function(classname){ - console.log("closest", classname); + //console.log("closest", classname); classname = classname.substring(1); diff --git a/src/js/spotlight.js b/src/js/spotlight.js index 0ae5eb3..3279b83 100644 --- a/src/js/spotlight.js +++ b/src/js/spotlight.js @@ -6,7 +6,7 @@ * https://github.com/nextapps-de/spotlight */ -import { addClass, removeClass, setStyle, prepareStyle, getByClass, getByTag, setText, addListener, removeListener, cancelEvent } from "./helper.js"; +import { addClass, removeClass, setStyle, prepareStyle, getByClass, getByTag, setText, addListener, removeListener, cancelEvent, createElement } from "./helper.js"; import widget from "./template.js"; const controls = [ @@ -36,8 +36,7 @@ const controls_default = { "fullscreen": 1 }; -const tpl_video = document.createElement("video"); -const tpl_control = document.createElement("div"); +const tpl_video = /** @type {HTMLVideoElement} */ (createElement("video")); const controls_dom = {}; const video_support = {}; @@ -225,7 +224,7 @@ function setup(){ export function addControl(classname, fn){ - const div = tpl_control.cloneNode(false); + const div = createElement("div"); div.className = "spl-" + classname; addListener(div, "click", fn); @@ -522,7 +521,7 @@ function init_slide(index, direction){ if(type === "video"){ - media = document.createElement("video"); + media = /** @type {HTMLVideoElement} */ (createElement("video")); media.onloadedmetadata = /** @this {HTMLVideoElement} */ function(e){ @@ -543,7 +542,7 @@ function init_slide(index, direction){ media.muted = parse_option("muted"); media.src = gallery.src; //files[i].src; - // const source = document.createElement("source"); + // const source = createElement("source"); // source.type = "video/" + files[i].type; // source.src = files[i].src; // media.appendChild(source); @@ -569,7 +568,7 @@ function init_slide(index, direction){ } else{ - media = new Image(); + media = createElement("img"); media.onload = /** @this {Image} */ function(){ @@ -605,7 +604,7 @@ function prefetch(direction){ if(direction && gallery_next){ - (new Image()).src = gallery_next; + (createElement("img")).src = gallery_next; } } @@ -634,6 +633,24 @@ function resize_listener(){ update_media_viewport(); } + if(prefix_request){ + + if(has_fullscreen()){ + + addClass(maximize, "on"); + } + else{ + + removeClass(maximize, "on"); + + // handle when user toggles the fullscreen state manually + // entering the fullscreen state manually needs to be hide the fullscreen icon, because + // the exit fullscreen handler will not work due to a browser restriction + + display_state(maximize, (screen.availHeight - window.outerHeight) >= 0); + } + } + //update_scroll(); } @@ -708,8 +725,6 @@ function history_listener(event) { if(panel && /*event.state &&*/ event.state["spl"]) { close(true); - //history.back(); - //cancelEvent(event, true); } } @@ -1021,24 +1036,20 @@ export function fullscreen(init){ //console.log("fullscreen", init); - const isFullscreen = ( + const is_fullscreen = has_fullscreen(); - typeof init === "boolean" ? + if((typeof init !== "boolean") || (init !== !!is_fullscreen)){ - init - : - has_fullscreen() - ); + if(is_fullscreen){ - if(isFullscreen){ - - document[prefix_exit](); - removeClass(maximize, "on"); - } - else{ + document[prefix_exit](); + //removeClass(maximize, "on"); + } + else{ - widget[prefix_request](); - addClass(maximize, "on"); + widget[prefix_request](); + //addClass(maximize, "on"); + } } } @@ -1223,7 +1234,7 @@ function show_gallery(){ export function download(){ - const link = document.createElement("a"); + const link = createElement("a"); link.href = media.src; link.download = media.src.substring(media.src.lastIndexOf("/") + 1); body.appendChild(link); @@ -1249,6 +1260,7 @@ export function close(hashchange){ removeClass(body, "hide-scrollbars"); removeClass(widget, "show"); + fullscreen(false); toggle_listener(); history.go(hashchange === true ? -1 : -2); @@ -1438,11 +1450,9 @@ function prepare(){ media: options["media"], src: determine_src(anchor, size, options), - title: ( - parse_option("title") || - anchor["title"] || - anchor["alt"] || - ((tmp = getByTag("img", anchor)[0]) && tmp["alt"]) + title: parse_option("title", + anchor["alt"] || anchor["title"] || + ((tmp = getByTag("img", anchor)[0]) && (tmp["alt"] || tmp["title"])) ) }; diff --git a/src/js/template.js b/src/js/template.js index bf94e06..353e36e 100644 --- a/src/js/template.js +++ b/src/js/template.js @@ -1,4 +1,6 @@ -const template = /** @type {HTMLElement} */ (document.createElement("div")); +import { createElement } from "./helper.js"; + +const template = createElement("div"); template.id = "spotlight"; template.innerHTML = (