diff --git a/assets/js/view-image.min.js b/assets/js/view-image.min.js new file mode 100644 index 00000000000..167d5405a50 --- /dev/null +++ b/assets/js/view-image.min.js @@ -0,0 +1,13 @@ +/** + * ViewImage.min.js 2.0.2 + * MIT License - http://www.opensource.org/licenses/mit-license.php + * https://tokinx.github.io/ViewImage/ + */ + var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,a){b.raw=a;return b};$jscomp.arrayIteratorImpl=function(b){var a=0;return function(){return a\n \n
\n
\n
\n
\n
\n
\n
\n '+ + (c+1)+"/"+a.length+'\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n \n ', + "text/html").body.firstChild,g=function(f){var h={Escape:"close",ArrowLeft:"tools__flip-prev",ArrowRight:"tools__flip-next"};h[f.key]&&e.querySelector(".view-image-"+h[f.key]).click()},l=function(f){var h=new Image,k=e.querySelector(".view-image-lead");k.className="view-image-lead view-image-lead__out";setTimeout(function(){k.innerHTML="";h.onload=function(){setTimeout(function(){k.innerHTML='ViewImage';k.className="view-image-lead view-image-lead__in"},100)}; + h.src=f},300)};document.body.appendChild(e);l(d);window.addEventListener("keydown",g);e.onclick=function(f){f.target.closest(".view-image-close")?(window.removeEventListener("keydown",g),e.onclick=null,e.classList.add("view-image__out"),setTimeout(function(){return e.remove()},290)):f.target.closest(".view-image-tools__flip")&&(c=f.target.closest(".view-image-tools__flip-prev")?0===c?a.length-1:c-1:c===a.length-1?0:c+1,l(a[c]),e.querySelector(".view-image-index").innerHTML=c+1)}}}})(); + \ No newline at end of file diff --git a/assets/lib/justified-gallery/jquery.justifiedGallery.min.js b/assets/lib/justified-gallery/jquery.justifiedGallery.min.js new file mode 100644 index 00000000000..2d761f5b62b --- /dev/null +++ b/assets/lib/justified-gallery/jquery.justifiedGallery.min.js @@ -0,0 +1,8 @@ +/*! + * justifiedGallery - v3.8.1 + * http://miromannino.github.io/Justified-Gallery/ + * Copyright (c) 2020 Miro Mannino + * Licensed under the MIT license. + */ + +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){var r=function(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('
'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};r.prototype.getSuffix=function(t,i){var e,s;for(e=i .jg-caption");return 0===i.length?null:i},r.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o=this.imgFromEntry(t);if(null!==o){o.css("width",s),o.css("height",n),o.css("margin-left",-s/2),o.css("margin-top",-n/2);var a=o.data("jg.src");if(a){a=this.newSrc(a,s,n,o[0]),o.one("error",function(){this.resetImgSrc(o)});var h=function(){o.attr("src",a)};"skipped"===t.data("jg.loaded")&&a?this.onImageEvent(a,function(){this.showImg(t,h),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,h)}}else this.showImg(t);this.displayEntryCaption(t)},r.prototype.displayEntryCaption=function(t){var i=this.imgFromEntry(t);if(null!==i&&this.settings.captions){var e=this.captionFromEntry(t);if(null===e){var s=i.attr("alt");this.isValidCaption(s)||(s=t.attr("title")),this.isValidCaption(s)&&(e=l('
'+s+"
"),t.append(e),t.data("jg.createdCaption",!0))}null!==e&&(this.settings.cssAnimation||e.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},r.prototype.isValidCaption=function(t){return void 0!==t&&0this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!d){for(e=0;e img, > a > img").fadeTo(0,0));return-1}for(t&&!d&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(a=!1,0this.settings.justifyThreshold)),e=0;ethis.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0))}},this),this.settings.refreshTime)},r.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},r.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},r.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},r.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0 img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(n){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");var s=e.data("jg.controller");if(void 0===s){if(null!=n&&"object"!==l.type(n)){if("destroy"===n)return;throw"The argument must be an object"}s=new r(e,l.extend({},r.prototype.defaults,n)),e.data("jg.controller",s)}else if("norewind"===n);else{if("destroy"===n)return void s.destroy();s.updateSettings(n),s.rewind()}s.updateEntries("norewind"===n)&&s.init()})}}); \ No newline at end of file diff --git a/assets/lib/justified-gallery/justifiedGallery.min.css b/assets/lib/justified-gallery/justifiedGallery.min.css new file mode 100644 index 00000000000..1b9932dde0c --- /dev/null +++ b/assets/lib/justified-gallery/justifiedGallery.min.css @@ -0,0 +1,110 @@ +/*! + * justifiedGallery - v3.8.1 + * http://miromannino.github.io/Justified-Gallery/ + * Copyright (c) 2020 Miro Mannino + * Licensed under the MIT license. + */ +.justified-gallery { + width: 100%; + position: relative; + overflow: hidden; +} +.justified-gallery > a, +.justified-gallery > div, +.justified-gallery > figure { + position: absolute; + display: inline-block; + overflow: hidden; + /* background: #888888; To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */ + filter: "alpha(opacity=10)"; + opacity: 0.1; + margin: 0; + padding: 0; +} +.justified-gallery > a > img, +.justified-gallery > div > img, +.justified-gallery > figure > img, +.justified-gallery > a > a > img, +.justified-gallery > div > a > img, +.justified-gallery > figure > a > img, +.justified-gallery > a > svg, +.justified-gallery > div > svg, +.justified-gallery > figure > svg, +.justified-gallery > a > a > svg, +.justified-gallery > div > a > svg, +.justified-gallery > figure > a > svg { + position: absolute; + top: 50%; + left: 50%; + margin: 0; + padding: 0; + border: none; + filter: "alpha(opacity=0)"; + opacity: 0; +} +.justified-gallery > a > .jg-caption, +.justified-gallery > div > .jg-caption, +.justified-gallery > figure > .jg-caption { + display: none; + position: absolute; + bottom: 0; + padding: 5px; + background-color: #000000; + left: 0; + right: 0; + margin: 0; + color: white; + font-size: 12px; + font-weight: 300; + font-family: sans-serif; +} +.justified-gallery > a > .jg-caption.jg-caption-visible, +.justified-gallery > div > .jg-caption.jg-caption-visible, +.justified-gallery > figure > .jg-caption.jg-caption-visible { + display: initial; + filter: "alpha(opacity=70)"; + opacity: 0.7; + -webkit-transition: opacity 500ms ease-in; + -moz-transition: opacity 500ms ease-in; + -o-transition: opacity 500ms ease-in; + transition: opacity 500ms ease-in; +} +.justified-gallery > .jg-entry-visible { + filter: "alpha(opacity=100)"; + opacity: 1; + background: none; +} +.justified-gallery > .jg-entry-visible > img, +.justified-gallery > .jg-entry-visible > a > img, +.justified-gallery > .jg-entry-visible > svg, +.justified-gallery > .jg-entry-visible > a > svg { + filter: "alpha(opacity=100)"; + opacity: 1; + -webkit-transition: opacity 500ms ease-in; + -moz-transition: opacity 500ms ease-in; + -o-transition: opacity 500ms ease-in; + transition: opacity 500ms ease-in; +} +.justified-gallery > .jg-filtered { + display: none; +} +.justified-gallery > .jg-spinner { + position: absolute; + bottom: 0; + margin-left: -24px; + padding: 10px 0 10px 0; + left: 50%; + filter: "alpha(opacity=100)"; + opacity: 1; + overflow: initial; +} +.justified-gallery > .jg-spinner > span { + display: inline-block; + filter: "alpha(opacity=0)"; + opacity: 0; + width: 8px; + height: 8px; + margin: 0 4px 0 4px; + background-color: #000; + border-radius: 6px; +} diff --git a/layouts/_default/album.html b/layouts/_default/album.html index 035b056ca1a..a6323b966f5 100644 --- a/layouts/_default/album.html +++ b/layouts/_default/album.html @@ -1,99 +1,16 @@ {{ define "main" }} {{ .Scratch.Set "scope" "single" }} -\n
\n
\n
\n
\n
\n
\n
\n '+ - (c+1)+"/"+a.length+'\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n \n ', - "text/html").body.firstChild,g=function(f){var h={Escape:"close",ArrowLeft:"tools__flip-prev",ArrowRight:"tools__flip-next"};h[f.key]&&e.querySelector(".view-image-"+h[f.key]).click()},l=function(f){var h=new Image,k=e.querySelector(".view-image-lead");k.className="view-image-lead view-image-lead__out";setTimeout(function(){k.innerHTML="";h.onload=function(){setTimeout(function(){k.innerHTML='ViewImage';k.className="view-image-lead view-image-lead__in"},100)}; - h.src=f},300)};document.body.appendChild(e);l(d);window.addEventListener("keydown",g);e.onclick=function(f){f.target.closest(".view-image-close")?(window.removeEventListener("keydown",g),e.onclick=null,e.classList.add("view-image__out"),setTimeout(function(){return e.remove()},290)):f.target.closest(".view-image-tools__flip")&&(c=f.target.closest(".view-image-tools__flip-prev")?0===c?a.length-1:c-1:c===a.length-1?0:c+1,l(a[c]),e.querySelector(".view-image-index").innerHTML=c+1)}}}})(); +{{ $justifiedGalleryJS := resources.Get "lib/justified-gallery/jquery.justifiedGallery.min.js" | fingerprint "sha256" }} + - +{{ $lazyloadJS := resources.Get "js/lazyload.iife.min.js" | fingerprint "sha256" }} + + +{{ $viewImageJS := resources.Get "js/view-image.min.js" | fingerprint "sha256" }} + + + {{ end }} diff --git a/layouts/_default/album_bak_2.html b/layouts/_default/album_bak_2.html new file mode 100644 index 00000000000..035b056ca1a --- /dev/null +++ b/layouts/_default/album_bak_2.html @@ -0,0 +1,343 @@ +{{ define "main" }} +{{ .Scratch.Set "scope" "single" }} + + + +
+ {{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }} + {{ $heroStyle := .Params.heroStyle }} + {{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }} + {{ $heroStyle := print "partials/hero/" $heroStyle ".html" }} + {{ if templates.Exists $heroStyle }} + {{ partial $heroStyle . }} + {{ else }} + {{ partial "partials/hero/basic.html" . }} + {{ end }} + {{ end }} + +
+ {{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} + {{ partial "breadcrumbs.html" . }} + {{ end }} +

+ {{ .Title }} +

+ +
+ {{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }} +
+ +
+ + + +
+ +
+ +
+ {{ .Content }} + +
+
+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+ + + + + +{{ end }}