diff --git a/src/operun/gallery/browser/configure.zcml b/src/operun/gallery/browser/configure.zcml index 7367382..7f0f577 100644 --- a/src/operun/gallery/browser/configure.zcml +++ b/src/operun/gallery/browser/configure.zcml @@ -33,4 +33,12 @@ permission="zope2.View" /> + + diff --git a/src/operun/gallery/browser/static/gallery-compiled.css b/src/operun/gallery/browser/static/gallery-compiled.css index 67689d9..69a5fbc 100644 --- a/src/operun/gallery/browser/static/gallery-compiled.css +++ b/src/operun/gallery/browser/static/gallery-compiled.css @@ -180,13 +180,35 @@ body.lb-disable-scrolling { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); opacity: 1; } -#gallery { +/* Gallery variables */ +#image-gallery { margin-bottom: 30px; + padding: 0 15px 0 15px; +} +.gallery-image-wrapper { + padding: 15px; +} +.gallery-image { + position: relative; + width: 100%; + height: auto; + opacity: 0; } .gallery-image img { width: 100%; height: 100%; } +/* Gradient variables */ +.gallery-image-title { + width: 100%; + position: absolute; + bottom: 0; + display: none; + padding: 10px; + color: #fff; + background-color: rgba(0, 0, 0, 0.5); +} +/* Overrides */ .lightbox a:focus, .lightbox a:hover, .lightbox a:active { diff --git a/src/operun/gallery/browser/static/gallery-compiled.css.map b/src/operun/gallery/browser/static/gallery-compiled.css.map index 2272b62..f9cf77e 100644 --- a/src/operun/gallery/browser/static/gallery-compiled.css.map +++ b/src/operun/gallery/browser/static/gallery-compiled.css.map @@ -1 +1 @@ -{"version":3,"sources":["src/operun/gallery/browser/static/lightbox.less","src/operun/gallery/browser/static/gallery.less"],"names":[],"mappings":";;AACA,IAAI;EACF,4MAAA;EACA,aAAA;;AAGF,IAAI;EACF,gBAAA;;AAGF;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,aAAA;EACA,uBAAA;EACA,QAAQ,mDAAR;EACA,YAAA;EACA,aAAA;;AAGF;EACE,kBAAA;EACA,OAAA;EACA,WAAA;EACA,cAAA;EACA,kBAAA;EACA,cAAA;EACA,mBAAA;;AAGF,SAAU;EACR,cAA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A;;AAGF,QAAS;EACP,eAAA;EACA,iBAAA;EACA,gBAAA;;AAGF,QAAS;EACP,cAAA;EACA,WAAA;EACA,mBAAA;EACA,eAAA;EACA,cAAA;;AAGF,QAAS;EACP,cAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,gFAAA;EACA,iBAAA;EACA,aAAA;EACA,QAAQ,mDAAR;EACA,YAAA;EACA,gCAAA;EACA,6BAAA;EACA,2BAAA;EACA,wBAAA;;AAGF,QAAS,UAAS;EAChB,eAAA;EACA,QAAQ,oDAAR;EACA,UAAA;;ACzMF;EACE,mBAAA;;AAGF,cAAe;EACb,WAAA;EACA,YAAA;;AAGF,SAAU,EAAC;AACX,SAAU,EAAC;AACX,SAAU,EAAC;EACT,wBAAA","sourcesContent":["/* Preload images */\nbody:after {\n content: url(++resource++operun.gallery/images/close.png) url(++resource++operun.gallery/images/loading.gif) url(++resource++operun.gallery/images/prev.png) url(++resource++operun.gallery/images/next.png);\n display: none;\n}\n\nbody.lb-disable-scrolling {\n overflow: hidden;\n}\n\n.lightboxOverlay {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 9999;\n background-color: black;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);\n opacity: 0.8;\n display: none;\n}\n\n.lightbox {\n position: absolute;\n left: 0;\n width: 100%;\n z-index: 10000;\n text-align: center;\n line-height: 0;\n font-weight: normal;\n}\n\n.lightbox .lb-image {\n display: block;\n height: auto;\n max-width: inherit;\n border-radius: 3px;\n}\n\n.lightbox a img {\n border: none;\n}\n\n.lb-outerContainer {\n position: relative;\n background-color: white;\n *zoom: 1;\n width: 250px;\n height: 250px;\n margin: 0 auto;\n border-radius: 4px;\n}\n\n.lb-outerContainer:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n.lb-container {\n padding: 4px;\n}\n\n.lb-loader {\n position: absolute;\n top: 43%;\n left: 0;\n height: 25%;\n width: 100%;\n text-align: center;\n line-height: 0;\n}\n\n.lb-cancel {\n display: block;\n width: 32px;\n height: 32px;\n margin: 0 auto;\n background: url(++resource++operun.gallery/images/loading.gif) no-repeat;\n}\n\n.lb-nav {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10;\n}\n\n.lb-container > .nav {\n left: 0;\n}\n\n.lb-nav a {\n outline: none;\n background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');\n}\n\n.lb-prev, .lb-next {\n height: 100%;\n cursor: pointer;\n display: block;\n}\n\n.lb-nav a.lb-prev {\n width: 34%;\n left: 0;\n float: left;\n background: url(++resource++operun.gallery/images/prev.png) left 48% no-repeat;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);\n opacity: 0;\n -webkit-transition: opacity 0.6s;\n -moz-transition: opacity 0.6s;\n -o-transition: opacity 0.6s;\n transition: opacity 0.6s;\n}\n\n.lb-nav a.lb-prev:hover {\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n\n.lb-nav a.lb-next {\n width: 64%;\n right: 0;\n float: right;\n background: url(++resource++operun.gallery/images/next.png) right 48% no-repeat;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);\n opacity: 0;\n -webkit-transition: opacity 0.6s;\n -moz-transition: opacity 0.6s;\n -o-transition: opacity 0.6s;\n transition: opacity 0.6s;\n}\n\n.lb-nav a.lb-next:hover {\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n\n.lb-dataContainer {\n margin: 0 auto;\n padding-top: 5px;\n *zoom: 1;\n width: 100%;\n -moz-border-radius-bottomleft: 4px;\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -moz-border-radius-bottomright: 4px;\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.lb-dataContainer:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n.lb-data {\n padding: 0 4px;\n color: #ccc;\n}\n\n.lb-data .lb-details {\n width: 85%;\n float: left;\n text-align: left;\n line-height: 1.1em;\n}\n\n.lb-data .lb-caption {\n font-size: 13px;\n font-weight: bold;\n line-height: 1em;\n}\n\n.lb-data .lb-number {\n display: block;\n clear: left;\n padding-bottom: 1em;\n font-size: 12px;\n color: #999999;\n}\n\n.lb-data .lb-close {\n display: block;\n float: right;\n width: 30px;\n height: 30px;\n background: url(++resource++operun.gallery/images/close.png) top right no-repeat;\n text-align: right;\n outline: none;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);\n opacity: 0.7;\n -webkit-transition: opacity 0.2s;\n -moz-transition: opacity 0.2s;\n -o-transition: opacity 0.2s;\n transition: opacity 0.2s;\n}\n\n.lb-data .lb-close:hover {\n cursor: pointer;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n","/* import lightbox less */\n@import \"lightbox.less\";\n\n#gallery {\n margin-bottom: 30px;\n}\n\n.gallery-image img {\n width: 100%;\n height: 100%;\n}\n\n.lightbox a:focus,\n.lightbox a:hover,\n.lightbox a:active {\n outline: none !important;\n}\n\n@picker:'classic.css';@mockup-patterns-upload:'pattern.upload.less';@mockup-popover:'popover.less';@jquery_recurrenceinput:'jquery.recurrenceinput.css';@resource-plone-app-jquerytools-dateinput-js:'jquery.tools.dateinput.css';@mockup-patterns-tooltip:'pattern.tooltip.less';@plone-toolbar-font-primary:sans-serif;@mockup-patterns-recurrence:'pattern.recurrence.less';@mockup-patterns-select2:'pattern.select2.less';@bootstrap-progress-bars:'progress-bars.less';@bootstrap-buttons:'close.less';@mockup-patterns-tinymce:'pattern.tinymce.less';@plone-toolbar-private-color:rgb(196,24,60);@resourceregistry:'resourceregistry.less';@mockup-patterns-livesearch:'pattern.livesearch.less';@tinymce-default-styles:'tinymce-styles.css';@plone-left-toolbar-expanded:120px;@plone-screen-sm-min:768px;@tinymce-visualblocks:'visualblocks.css';@plone-toolbar-submenu-header-color:lighten(#000, 80%);@bootstrap-variables:'variables.less';@resource-plone-app-jquerytools-js:'jquery.tools.overlay.css';@plone-toolbar-published-color:rgba(0,123,179,1);@mockuplessPath:'/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/less/';@mockup-patterns-structure:'pattern.structure.less';@mockup-patterns-markspeciallinks:'pattern.markspeciallinks.less';@plone-toolbar-text-color:rgba(255,255,255,1);@bowerPath:'/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static/components/';@plone-patterns-toolbar:'toolbar.plone.less';@bootstrap-modal:'modals.less';@mockup-patterns-modal:'pattern.modal.less';@plone-screen-md-max:(@plone-screen-lg-min + 1);@tinymce:'Content.less';@plone-toolbar-internally-published-color:rgb(136,61,250);@plone-container-lg:1170px;@plone:'plone.less';@plone-toolbar-submenu-text-color:lighten(#000, 90%);@plone-toolbar-internal-color:rgb(250,184,42);@bootstrap-glyphicons:'glyphicons.less';@bootstrap-mixins:'mixins.less';@mockupPath:'/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/patterns/';@plone-screen-sm-max:(@plone-screen-md-min + 1);@plone-screen-md-min:992px;@picker_date:'classic.date.css';@bootstrap-button-groups:'button-groups.less';@sitePath:'/';@plone-container-sm:750px;@bootstrap-dropdown:'dropdowns.less';@plone-toolbar-link:rgba(0,123,179,1);@mockup-patterns-filemanager:'pattern.filemanager.less';@mockup-patterns-autotoc:'pattern.autotoc.less';@staticPath:'/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static';@plone-left-toolbar:60px;@isPlone:false;@thememapper:'thememapper.less';@jqtree:'jqtree.css';@plone-toolbar-font-secundary:sans-serif;@mockup-patterns-resourceregistry:'pattern.resourceregistry.less';@plone-toolbar-pending-color:rgb(226,231,33);@plone-logged-in:'plone-logged-in.less';@plone-toolbar-separator-color:rgba(255,255,255,.17);@plone-gray-lighter:lighten(#000, 80%);@mockup-patterns-tree:'pattern.tree.less';@gallery:'gallery.less';@plone-gray-light:lighten(#000, 46.5%);@mockup-patterns-querystring:'pattern.querystring.less';@resource-plone-app-event-event-css:'f58b622dd7f0497fbfb7382496bf62b8.js';@plone-screen-xs-min:480px;@plone-toolbar-submenu-bg:rgba(20,20,20,.9);@mockup-patterns-pickadate:'pattern.pickadate.less';@plone-screen-xs-max:(@plone-screen-sm-min + 1);@select2:'select2.css';@plone-container-md:970px;@mockup-patterns-relateditems:'pattern.relateditems.less';@isMockup:false;@plone-toolbar-draft-color:rgb(250,184,42);@bootstrap-basic:'navbar.less';@plone-screen-lg-min:1200px;@bootstrap-badges:'badges.less';@mockup-patterns-thememapper:'pattern.thememapper.less';@picker_time:'classic.time.css';@icon-font-path:\"../fonts/\";@dropzone:'dropzone.css';@plone-toolbar-bg:rgba(0,0,0,.9);@plone-link-color:rgba(0,123,179,1);\n@picker: 'classic.css';@mockup-patterns-upload: 'pattern.upload.less';@mockup-popover: 'popover.less';@jquery_recurrenceinput: 'jquery.recurrenceinput.css';@resource-plone-app-jquerytools-dateinput-js: 'jquery.tools.dateinput.css';@mockup-patterns-tooltip: 'pattern.tooltip.less';@plone-toolbar-font-primary: sans-serif;@mockup-patterns-recurrence: 'pattern.recurrence.less';@mockup-patterns-select2: 'pattern.select2.less';@bootstrap-progress-bars: 'progress-bars.less';@bootstrap-buttons: 'close.less';@mockup-patterns-tinymce: 'pattern.tinymce.less';@plone-toolbar-private-color: rgb(196,24,60);@resourceregistry: 'resourceregistry.less';@mockup-patterns-livesearch: 'pattern.livesearch.less';@tinymce-default-styles: 'tinymce-styles.css';@plone-left-toolbar-expanded: 120px;@plone-screen-sm-min: 768px;@tinymce-visualblocks: 'visualblocks.css';@plone-toolbar-submenu-header-color: lighten(#000, 80%);@bootstrap-variables: 'variables.less';@resource-plone-app-jquerytools-js: 'jquery.tools.overlay.css';@plone-toolbar-published-color: rgba(0,123,179,1);@mockuplessPath: '/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/less/';@mockup-patterns-structure: 'pattern.structure.less';@mockup-patterns-markspeciallinks: 'pattern.markspeciallinks.less';@plone-toolbar-text-color: rgba(255,255,255,1);@bowerPath: '/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static/components/';@plone-patterns-toolbar: 'toolbar.plone.less';@bootstrap-modal: 'modals.less';@mockup-patterns-modal: 'pattern.modal.less';@plone-screen-md-max: (@plone-screen-lg-min + 1);@tinymce: 'Content.less';@plone-toolbar-internally-published-color: rgb(136,61,250);@plone-container-lg: 1170px;@plone: 'plone.less';@plone-toolbar-submenu-text-color: lighten(#000, 90%);@plone-toolbar-internal-color: rgb(250,184,42);@bootstrap-glyphicons: 'glyphicons.less';@bootstrap-mixins: 'mixins.less';@mockupPath: '/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/patterns/';@plone-screen-sm-max: (@plone-screen-md-min + 1);@plone-screen-md-min: 992px;@picker_date: 'classic.date.css';@bootstrap-button-groups: 'button-groups.less';@sitePath: '/';@plone-container-sm: 750px;@bootstrap-dropdown: 'dropdowns.less';@plone-toolbar-link: rgba(0,123,179,1);@mockup-patterns-filemanager: 'pattern.filemanager.less';@mockup-patterns-autotoc: 'pattern.autotoc.less';@staticPath: '/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static';@plone-left-toolbar: 60px;@isPlone: false;@thememapper: 'thememapper.less';@jqtree: 'jqtree.css';@plone-toolbar-font-secundary: sans-serif;@mockup-patterns-resourceregistry: 'pattern.resourceregistry.less';@plone-toolbar-pending-color: rgb(226,231,33);@plone-logged-in: 'plone-logged-in.less';@plone-toolbar-separator-color: rgba(255,255,255,.17);@plone-gray-lighter: lighten(#000, 80%);@mockup-patterns-tree: 'pattern.tree.less';@gallery: 'gallery.less';@plone-gray-light: lighten(#000, 46.5%);@mockup-patterns-querystring: 'pattern.querystring.less';@resource-plone-app-event-event-css: 'f58b622dd7f0497fbfb7382496bf62b8.js';@plone-screen-xs-min: 480px;@plone-toolbar-submenu-bg: rgba(20,20,20,.9);@mockup-patterns-pickadate: 'pattern.pickadate.less';@plone-screen-xs-max: (@plone-screen-sm-min + 1);@select2: 'select2.css';@plone-container-md: 970px;@mockup-patterns-relateditems: 'pattern.relateditems.less';@isMockup: false;@plone-toolbar-draft-color: rgb(250,184,42);@bootstrap-basic: 'navbar.less';@plone-screen-lg-min: 1200px;@bootstrap-badges: 'badges.less';@mockup-patterns-thememapper: 'pattern.thememapper.less';@picker_time: 'classic.time.css';@icon-font-path: \"../fonts/\";@dropzone: 'dropzone.css';@plone-toolbar-bg: rgba(0,0,0,.9);@plone-link-color: rgba(0,123,179,1);"]} \ No newline at end of file +{"version":3,"sources":["src/operun/gallery/browser/static/lightbox.less","src/operun/gallery/browser/static/gallery.less"],"names":[],"mappings":";;AACA,IAAI;EACF,4MAAA;EACA,aAAA;;AAGF,IAAI;EACF,gBAAA;;AAGF;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,aAAA;EACA,uBAAA;EACA,QAAQ,mDAAR;EACA,YAAA;EACA,aAAA;;AAGF;EACE,kBAAA;EACA,OAAA;EACA,WAAA;EACA,cAAA;EACA,kBAAA;EACA,cAAA;EACA,mBAAA;;AAGF,SAAU;EACR,cAAA;EACA,YAAA;EACA,kBAAA;EACA,kBAAA;;AAGF,SAAU,EAAE;EACV,YAAA;;AAGF;EACE,kBAAA;EACA,uBAAA;EACA,QAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,kBAAA;;AAGF,kBAAkB;EAChB,SAAS,EAAT;EACA,cAAA;EACA,WAAA;;AAGF;EACE,YAAA;;AAGF;EACE,kBAAA;EACA,QAAA;EACA,OAAA;EACA,WAAA;EACA,WAAA;EACA,kBAAA;EACA,cAAA;;AAGF;EACE,cAAA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,wEAAA;;AAGF;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,YAAA;EACA,WAAA;EACA,W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ACA,UAAA;;AAGF,cAAe;EACb,WAAA;EACA,YAAA;;;AAKF;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,aAAA;EACA,WAAA;EACA,oCAAA;;;AAKF,SAAU,EAAC;AAAQ,SAAU,EAAC;AAAQ,SAAU,EAAC;EAC/C,wBAAA","sourcesContent":["/* Preload images */\nbody:after {\n content: url(++resource++operun.gallery/images/close.png) url(++resource++operun.gallery/images/loading.gif) url(++resource++operun.gallery/images/prev.png) url(++resource++operun.gallery/images/next.png);\n display: none;\n}\n\nbody.lb-disable-scrolling {\n overflow: hidden;\n}\n\n.lightboxOverlay {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 9999;\n background-color: black;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);\n opacity: 0.8;\n display: none;\n}\n\n.lightbox {\n position: absolute;\n left: 0;\n width: 100%;\n z-index: 10000;\n text-align: center;\n line-height: 0;\n font-weight: normal;\n}\n\n.lightbox .lb-image {\n display: block;\n height: auto;\n max-width: inherit;\n border-radius: 3px;\n}\n\n.lightbox a img {\n border: none;\n}\n\n.lb-outerContainer {\n position: relative;\n background-color: white;\n *zoom: 1;\n width: 250px;\n height: 250px;\n margin: 0 auto;\n border-radius: 4px;\n}\n\n.lb-outerContainer:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n.lb-container {\n padding: 4px;\n}\n\n.lb-loader {\n position: absolute;\n top: 43%;\n left: 0;\n height: 25%;\n width: 100%;\n text-align: center;\n line-height: 0;\n}\n\n.lb-cancel {\n display: block;\n width: 32px;\n height: 32px;\n margin: 0 auto;\n background: url(++resource++operun.gallery/images/loading.gif) no-repeat;\n}\n\n.lb-nav {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 10;\n}\n\n.lb-container > .nav {\n left: 0;\n}\n\n.lb-nav a {\n outline: none;\n background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');\n}\n\n.lb-prev, .lb-next {\n height: 100%;\n cursor: pointer;\n display: block;\n}\n\n.lb-nav a.lb-prev {\n width: 34%;\n left: 0;\n float: left;\n background: url(++resource++operun.gallery/images/prev.png) left 48% no-repeat;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);\n opacity: 0;\n -webkit-transition: opacity 0.6s;\n -moz-transition: opacity 0.6s;\n -o-transition: opacity 0.6s;\n transition: opacity 0.6s;\n}\n\n.lb-nav a.lb-prev:hover {\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n\n.lb-nav a.lb-next {\n width: 64%;\n right: 0;\n float: right;\n background: url(++resource++operun.gallery/images/next.png) right 48% no-repeat;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);\n opacity: 0;\n -webkit-transition: opacity 0.6s;\n -moz-transition: opacity 0.6s;\n -o-transition: opacity 0.6s;\n transition: opacity 0.6s;\n}\n\n.lb-nav a.lb-next:hover {\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n\n.lb-dataContainer {\n margin: 0 auto;\n padding-top: 5px;\n *zoom: 1;\n width: 100%;\n -moz-border-radius-bottomleft: 4px;\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -moz-border-radius-bottomright: 4px;\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.lb-dataContainer:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n.lb-data {\n padding: 0 4px;\n color: #ccc;\n}\n\n.lb-data .lb-details {\n width: 85%;\n float: left;\n text-align: left;\n line-height: 1.1em;\n}\n\n.lb-data .lb-caption {\n font-size: 13px;\n font-weight: bold;\n line-height: 1em;\n}\n\n.lb-data .lb-number {\n display: block;\n clear: left;\n padding-bottom: 1em;\n font-size: 12px;\n color: #999999;\n}\n\n.lb-data .lb-close {\n display: block;\n float: right;\n width: 30px;\n height: 30px;\n background: url(++resource++operun.gallery/images/close.png) top right no-repeat;\n text-align: right;\n outline: none;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);\n opacity: 0.7;\n -webkit-transition: opacity 0.2s;\n -moz-transition: opacity 0.2s;\n -o-transition: opacity 0.2s;\n transition: opacity 0.2s;\n}\n\n.lb-data .lb-close:hover {\n cursor: pointer;\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);\n opacity: 1;\n}\n","/* import lightbox less */\n@import 'lightbox.less';\n\n/* Gallery variables */\n\n#image-gallery {\n margin-bottom: 30px;\n padding: 0 15px 0 15px;\n}\n\n.gallery-image-wrapper {\n padding: 15px;\n}\n\n.gallery-image {\n position: relative;\n width: 100%;\n height: auto;\n opacity: 0;\n}\n\n.gallery-image img {\n width: 100%;\n height: 100%;\n}\n\n/* Gradient variables */\n\n.gallery-image-title {\n width: 100%;\n position: absolute;\n bottom: 0;\n display: none;\n padding: 10px;\n color: #fff;\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n/* Overrides */\n\n.lightbox a:focus, .lightbox a:hover, .lightbox a:active {\n outline: none !important;\n}\n\n@picker:'classic.css';@mockup-patterns-upload:'pattern.upload.less';@mockup-popover:'popover.less';@jquery_recurrenceinput:'jquery.recurrenceinput.css';@resource-plone-app-jquerytools-dateinput-js:'jquery.tools.dateinput.css';@mockup-patterns-tooltip:'pattern.tooltip.less';@plone-toolbar-font-primary:sans-serif;@mockup-patterns-recurrence:'pattern.recurrence.less';@mockup-patterns-select2:'pattern.select2.less';@bootstrap-progress-bars:'progress-bars.less';@bootstrap-buttons:'close.less';@mockup-patterns-tinymce:'pattern.tinymce.less';@plone-toolbar-private-color:rgb(196,24,60);@resourceregistry:'resourceregistry.less';@mockup-patterns-livesearch:'pattern.livesearch.less';@tinymce-default-styles:'tinymce-styles.css';@plone-left-toolbar-expanded:120px;@plone-screen-sm-min:768px;@tinymce-visualblocks:'visualblocks.css';@plone-toolbar-submenu-header-color:lighten(#000, 80%);@bootstrap-variables:'variables.less';@resource-plone-app-jquerytools-js:'jquery.tools.overlay.css';@plone-toolbar-published-color:rgba(0,123,179,1);@mockuplessPath:'/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/less/';@mockup-patterns-structure:'pattern.structure.less';@mockup-patterns-markspeciallinks:'pattern.markspeciallinks.less';@plone-toolbar-text-color:rgba(255,255,255,1);@bowerPath:'/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static/components/';@plone-patterns-toolbar:'toolbar.plone.less';@bootstrap-modal:'modals.less';@mockup-patterns-modal:'pattern.modal.less';@plone-screen-md-max:(@plone-screen-lg-min + 1);@tinymce:'Content.less';@plone-toolbar-internally-published-color:rgb(136,61,250);@plone-container-lg:1170px;@plone:'plone.less';@plone-toolbar-submenu-text-color:lighten(#000, 90%);@plone-toolbar-internal-color:rgb(250,184,42);@bootstrap-glyphicons:'glyphicons.less';@bootstrap-mixins:'mixins.less';@mockupPath:'/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/patterns/';@plone-screen-sm-max:(@plone-screen-md-min + 1);@plone-screen-md-min:992px;@picker_date:'classic.date.css';@bootstrap-button-groups:'button-groups.less';@sitePath:'/';@plone-container-sm:750px;@bootstrap-dropdown:'dropdowns.less';@plone-toolbar-link:rgba(0,123,179,1);@mockup-patterns-filemanager:'pattern.filemanager.less';@mockup-patterns-autotoc:'pattern.autotoc.less';@staticPath:'/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static';@plone-left-toolbar:60px;@isPlone:false;@thememapper:'thememapper.less';@jqtree:'jqtree.css';@plone-toolbar-font-secundary:sans-serif;@mockup-patterns-resourceregistry:'pattern.resourceregistry.less';@plone-toolbar-pending-color:rgb(226,231,33);@plone-logged-in:'plone-logged-in.less';@plone-toolbar-separator-color:rgba(255,255,255,.17);@plone-gray-lighter:lighten(#000, 80%);@mockup-patterns-tree:'pattern.tree.less';@gallery:'gallery.less';@plone-gray-light:lighten(#000, 46.5%);@mockup-patterns-querystring:'pattern.querystring.less';@resource-plone-app-event-event-css:'b564d837aaca4efaace4ad775bd3c005.js';@plone-screen-xs-min:480px;@plone-toolbar-submenu-bg:rgba(20,20,20,.9);@mockup-patterns-pickadate:'pattern.pickadate.less';@plone-screen-xs-max:(@plone-screen-sm-min + 1);@select2:'select2.css';@plone-container-md:970px;@mockup-patterns-relateditems:'pattern.relateditems.less';@isMockup:false;@plone-toolbar-draft-color:rgb(250,184,42);@bootstrap-basic:'navbar.less';@plone-screen-lg-min:1200px;@bootstrap-badges:'badges.less';@mockup-patterns-thememapper:'pattern.thememapper.less';@picker_time:'classic.time.css';@icon-font-path:\"../fonts/\";@dropzone:'dropzone.css';@plone-toolbar-bg:rgba(0,0,0,.9);@plone-link-color:rgba(0,123,179,1);\n@picker: 'classic.css';@mockup-patterns-upload: 'pattern.upload.less';@mockup-popover: 'popover.less';@jquery_recurrenceinput: 'jquery.recurrenceinput.css';@resource-plone-app-jquerytools-dateinput-js: 'jquery.tools.dateinput.css';@mockup-patterns-tooltip: 'pattern.tooltip.less';@plone-toolbar-font-primary: sans-serif;@mockup-patterns-recurrence: 'pattern.recurrence.less';@mockup-patterns-select2: 'pattern.select2.less';@bootstrap-progress-bars: 'progress-bars.less';@bootstrap-buttons: 'close.less';@mockup-patterns-tinymce: 'pattern.tinymce.less';@plone-toolbar-private-color: rgb(196,24,60);@resourceregistry: 'resourceregistry.less';@mockup-patterns-livesearch: 'pattern.livesearch.less';@tinymce-default-styles: 'tinymce-styles.css';@plone-left-toolbar-expanded: 120px;@plone-screen-sm-min: 768px;@tinymce-visualblocks: 'visualblocks.css';@plone-toolbar-submenu-header-color: lighten(#000, 80%);@bootstrap-variables: 'variables.less';@resource-plone-app-jquerytools-js: 'jquery.tools.overlay.css';@plone-toolbar-published-color: rgba(0,123,179,1);@mockuplessPath: '/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/less/';@mockup-patterns-structure: 'pattern.structure.less';@mockup-patterns-markspeciallinks: 'pattern.markspeciallinks.less';@plone-toolbar-text-color: rgba(255,255,255,1);@bowerPath: '/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static/components/';@plone-patterns-toolbar: 'toolbar.plone.less';@bootstrap-modal: 'modals.less';@mockup-patterns-modal: 'pattern.modal.less';@plone-screen-md-max: (@plone-screen-lg-min + 1);@tinymce: 'Content.less';@plone-toolbar-internally-published-color: rgb(136,61,250);@plone-container-lg: 1170px;@plone: 'plone.less';@plone-toolbar-submenu-text-color: lighten(#000, 90%);@plone-toolbar-internal-color: rgb(250,184,42);@bootstrap-glyphicons: 'glyphicons.less';@bootstrap-mixins: 'mixins.less';@mockupPath: '/home/stefan/.buildout/eggs/mockup-2.0.12-py2.7.egg/mockup/patterns/';@plone-screen-sm-max: (@plone-screen-md-min + 1);@plone-screen-md-min: 992px;@picker_date: 'classic.date.css';@bootstrap-button-groups: 'button-groups.less';@sitePath: '/';@plone-container-sm: 750px;@bootstrap-dropdown: 'dropdowns.less';@plone-toolbar-link: rgba(0,123,179,1);@mockup-patterns-filemanager: 'pattern.filemanager.less';@mockup-patterns-autotoc: 'pattern.autotoc.less';@staticPath: '/home/stefan/.buildout/eggs/Products.CMFPlone-5.0-py2.7.egg/Products/CMFPlone/static';@plone-left-toolbar: 60px;@isPlone: false;@thememapper: 'thememapper.less';@jqtree: 'jqtree.css';@plone-toolbar-font-secundary: sans-serif;@mockup-patterns-resourceregistry: 'pattern.resourceregistry.less';@plone-toolbar-pending-color: rgb(226,231,33);@plone-logged-in: 'plone-logged-in.less';@plone-toolbar-separator-color: rgba(255,255,255,.17);@plone-gray-lighter: lighten(#000, 80%);@mockup-patterns-tree: 'pattern.tree.less';@gallery: 'gallery.less';@plone-gray-light: lighten(#000, 46.5%);@mockup-patterns-querystring: 'pattern.querystring.less';@resource-plone-app-event-event-css: 'b564d837aaca4efaace4ad775bd3c005.js';@plone-screen-xs-min: 480px;@plone-toolbar-submenu-bg: rgba(20,20,20,.9);@mockup-patterns-pickadate: 'pattern.pickadate.less';@plone-screen-xs-max: (@plone-screen-sm-min + 1);@select2: 'select2.css';@plone-container-md: 970px;@mockup-patterns-relateditems: 'pattern.relateditems.less';@isMockup: false;@plone-toolbar-draft-color: rgb(250,184,42);@bootstrap-basic: 'navbar.less';@plone-screen-lg-min: 1200px;@bootstrap-badges: 'badges.less';@mockup-patterns-thememapper: 'pattern.thememapper.less';@picker_time: 'classic.time.css';@icon-font-path: \"../fonts/\";@dropzone: 'dropzone.css';@plone-toolbar-bg: rgba(0,0,0,.9);@plone-link-color: rgba(0,123,179,1);"]} \ No newline at end of file diff --git a/src/operun/gallery/browser/static/gallery-compiled.js b/src/operun/gallery/browser/static/gallery-compiled.js index bcaa986..917ef44 100644 --- a/src/operun/gallery/browser/static/gallery-compiled.js +++ b/src/operun/gallery/browser/static/gallery-compiled.js @@ -1,2 +1,2 @@ -!function(a,b){"function"==typeof define&&define.amd?define("lightbox",["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ij||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}),window.jQuery&&define("jquery",[],function(){return window.jQuery}),require(["jquery","lightbox"],function(a){"use strict"}),define("/home/stefan/Development/operun.gallery/src/operun/gallery/browser/static/gallery.js",function(){}); +!function(a,b){"function"==typeof define&&define.amd?define("lightbox",["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ij||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}),window.jQuery&&define("jquery",[],function(){return window.jQuery}),require(["jquery","lightbox"],function(a){"use strict";a(".gallery-image").each(function(){a(this).delay(Math.floor(1e3*Math.random())).animate({opacity:1},250)}),a(".gallery-image").hover(function(){a(this).find(".gallery-image-title").fadeIn("fast")},function(){a(".gallery-image-title").fadeOut("fast")})}),define("/home/stefan/Development/operun.gallery/src/operun/gallery/browser/static/gallery.js",function(){}); //# sourceMappingURL=gallery-compiled.js.map \ No newline at end of file diff --git a/src/operun/gallery/browser/static/gallery-compiled.js.map b/src/operun/gallery/browser/static/gallery-compiled.js.map index 32dc9df..937a53e 100644 --- a/src/operun/gallery/browser/static/gallery-compiled.js.map +++ b/src/operun/gallery/browser/static/gallery-compiled.js.map @@ -1 +1 @@ -{"version":3,"sources":["gallery-compiled.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","prototype","imageCountLabel","currentImageNum","totalImages","replace","enable","build","self","on","event","start","currentTarget","appendTo","$lightbox","$overlay","$outerContainer","find","$container","containerTopPadding","parseInt","css","containerRightPadding","containerBottomPadding","containerLeftPadding","hide","end","target","attr","changeImage","length","$link","addToAlbum","push","link","title","$window","window","proxy","sizeOverlay","visibility","$links","imageNumber","dataLightboxValue","prop","i","j","top","scrollTop","left","scrollLeft","fadeIn","addClass","disableKeyboardNav","$image","preloader","Image","onload","$preloader","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","width","height","maxWidth","maxHeight","sizeContainer","src","document","postResize","newWidth","newHeight","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","html","undefined","open","location","href","labelText","text","removeClass","preloadNext","preloadPrev","keyboardAction","off","KEYCODE_ESC","KEYCODE_LEFTARROW","KEYCODE_RIGHTARROW","keycode","keyCode","key","String","fromCharCode","toLowerCase","match","fadeOut"],"mappings":"CAaC,SA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AI,cAGlBtH,EAASkB,UAAUmG,eAAiB,SAAS1F,GAC3C,GAAI4F,GAAqB,GACrBC,EAAqB,GACrBC,EAAqB,GAErBC,EAAU/F,EAAMgG,QAChBC,EAAUC,OAAOC,aAAaJ,GAASK,aACvCL,KAAYH,GAAeK,EAAII,MAAM,SACvClI,KAAK6C,MACY,MAARiF,GAAeF,IAAYF,EACL,IAA3B1H,KAAKK,kBACPL,KAAKgD,YAAYhD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQe,YAAclB,KAAKI,MAAM6C,OAAS,GACxDjD,KAAKgD,YAAYhD,KAAKI,MAAM6C,OAAS,IAEtB,MAAR6E,GAAeF,IAAYD,KAChC3H,KAAKK,oBAAsBL,KAAKI,MAAM6C,OAAS,EACjDjD,KAAKgD,YAAYhD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQe,YAAclB,KAAKI,MAAM6C,OAAS,GACxDjD,KAAKgD,YAAY,KAMvB9C,EAASkB,UAAUyB,IAAM,WACvB7C,KAAKwE,qBACLvE,EAAEuD,QAAQgE,IAAI,SAAUxH,KAAK0D,aAC7B1D,KAAKiC,UAAUkG,QAAQnI,KAAKG,QAAQU,cACpCb,KAAKkC,SAASiG,QAAQnI,KAAKG,QAAQU,cACnCZ,EAAE,yBAAyBuC,KACzBmB,WAAY,YAEV3D,KAAKG,QAAQgB,kBACflB,EAAE,QAAQmH,YAAY,yBAInB,GAAIlH,KAGTsD,OAAOzD,QACTN,OAAO,YAAc,WACnB,MAAO+D,QAAOzD,SAIlBF,SACE,SACA,YACC,SAASI,GACV,eAMFR,OAAO,uFAAwF","file":"gallery-compiled.js"} \ No newline at end of file +{"version":3,"sources":["gallery-compiled.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","prototype","imageCountLabel","currentImageNum","totalImages","replace","enable","build","self","on","event","start","currentTarget","appendTo","$lightbox","$overlay","$outerContainer","find","$container","containerTopPadding","parseInt","css","containerRightPadding","containerBottomPadding","containerLeftPadding","hide","end","target","attr","changeImage","length","$link","addToAlbum","push","link","title","$window","window","proxy","sizeOverlay","visibility","$links","imageNumber","dataLightboxValue","prop","i","j","top","scrollTop","left","scrollLeft","fadeIn","addClass","disableKeyboardNav","$image","preloader","Image","onload","$preloader","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","width","height","maxWidth","maxHeight","sizeContainer","src","document","postResize","newWidth","newHeight","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","html","undefined","open","location","href","labelText","text","removeClass","preloadNext","preloadPrev","keyboardAction","off","KEYCODE_ESC","KEYCODE_LEFTARROW","KEYCODE_RIGHTARROW","keycode","keyCode","key","String","fromCharCode","toLowerCase","match","fadeOut","each","delay","Math","floor","random","opacity","hover"],"mappings":"CAaC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,OAAO,YAAY,UAAWD,GACJ,gBAAZG,SAIdC,OAAOD,QAAUH,EAAQK,QAAQ,WAGjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAEnCC,KAAM,SAAUC,GAEhB,QAASC,GAASC,GAChBH,KAAKI,SACLJ,KAAKK,kBAAoB,OACzBL,KAAKM,OAGLN,KAAKG,QAAUF,EAAEM,UAAWP,KAAKQ,YAAYC,UAC7CT,KAAKU,OAAOP,GAgad,MA3ZAD,GAASO,UACPE,WAAY,iBACZC,6BAA6B,EAC7BC,aAAc,IACdC,qBAAqB,EAGrBC,gBAAiB,GACjBC,eAAgB,IAChBC,sBAAsB,EACtBC,YAAY,EACZC,kBAAkB,GAGpBjB,EAASkB,UAAUV,OAAS,SAASP,GACnCF,EAAEM,OAAOP,KAAKG,QAASA,IAGzB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AAS,GACxDjD,KAAKgD,YAAY,KAMvB9C,EAASkB,UAAUyB,IAAM,WACvB7C,KAAKwE,qBACLvE,EAAEuD,QAAQgE,IAAI,SAAUxH,KAAK0D,aAC7B1D,KAAKiC,UAAUkG,QAAQnI,KAAKG,QAAQU,cACpCb,KAAKkC,SAASiG,QAAQnI,KAAKG,QAAQU,cACnCZ,EAAE,yBAAyBuC,KACzBmB,WAAY,YAEV3D,KAAKG,QAAQgB,kBACflB,EAAE,QAAQmH,YAAY,yBAInB,GAAIlH,KAGTsD,OAAOzD,QACTN,OAAO,YAAc,WACnB,MAAO+D,QAAOzD,SAIlBF,SACE,SACA,YACC,SAASI,GACV,YAGAA,GAAE,kBAAkBmI,KAAK,WACvBnI,EAAED,MAAMqI,MAAMC,KAAKC,MAAsB,IAAhBD,KAAKE,WAAkBrC,SAC9CsC,QAAS,GACR,OAGLxI,EAAE,kBAAkByI,MAAM,WACtBzI,EAAED,MAAMoC,KAAK,wBAAwBkC,OAAO,SAE9C,WACErE,EAAE,wBAAwBkI,QAAQ,YAKxC1I,OAAO,uFAAwF","file":"gallery-compiled.js"} \ No newline at end of file diff --git a/src/operun/gallery/browser/static/gallery.js b/src/operun/gallery/browser/static/gallery.js index ad54abb..9247332 100644 --- a/src/operun/gallery/browser/static/gallery.js +++ b/src/operun/gallery/browser/static/gallery.js @@ -11,5 +11,17 @@ require([ 'use strict'; // Custom variables + $('.gallery-image').each(function() { + $(this).delay(Math.floor(Math.random() * 1000)).animate({ + opacity: 1 + }, 250); + }); + + $('.gallery-image').hover(function() { + $(this).find('.gallery-image-title').fadeIn('fast'); + }, + function() { + $(".gallery-image-title").fadeOut('fast'); + }); }); diff --git a/src/operun/gallery/browser/static/gallery.less b/src/operun/gallery/browser/static/gallery.less index 6cba7b6..de625a6 100644 --- a/src/operun/gallery/browser/static/gallery.less +++ b/src/operun/gallery/browser/static/gallery.less @@ -1,8 +1,22 @@ /* import lightbox less */ -@import "lightbox.less"; +@import 'lightbox.less'; -#gallery { +/* Gallery variables */ + +#image-gallery { margin-bottom: 30px; + padding: 0 15px 0 15px; +} + +.gallery-image-wrapper { + padding: 15px; +} + +.gallery-image { + position: relative; + width: 100%; + height: auto; + opacity: 0; } .gallery-image img { @@ -10,8 +24,20 @@ height: 100%; } -.lightbox a:focus, -.lightbox a:hover, -.lightbox a:active { +/* Gradient variables */ + +.gallery-image-title { + width: 100%; + position: absolute; + bottom: 0; + display: none; + padding: 10px; + color: #fff; + background-color: rgba(0, 0, 0, 0.5); +} + +/* Overrides */ + +.lightbox a:focus, .lightbox a:hover, .lightbox a:active { outline: none !important; } diff --git a/src/operun/gallery/browser/static/lightbox.min.js b/src/operun/gallery/browser/static/lightbox.min.js deleted file mode 100644 index 3f8dd22..0000000 --- a/src/operun/gallery/browser/static/lightbox.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Lightbox v2.8.2 - * by Lokesh Dhakar - * - * More info: - * http://lokeshdhakar.com/projects/lightbox2/ - * - * Copyright 2007, 2015 Lokesh Dhakar - * Released under the MIT license - * https://github.com/lokesh/lightbox2/blob/master/LICENSE - */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ij||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}); -//# sourceMappingURL=lightbox.min.map \ No newline at end of file diff --git a/src/operun/gallery/browser/templates/gallery.pt b/src/operun/gallery/browser/templates/gallery.pt index f70ef9c..0b6c760 100644 --- a/src/operun/gallery/browser/templates/gallery.pt +++ b/src/operun/gallery/browser/templates/gallery.pt @@ -1,38 +1,34 @@ - - - + + + -
+
-