Merged from sub repository (updated ckeditor, filters - step 3)

Release commit
This commit is contained in:
RainLoop Team 2014-12-06 01:01:33 +04:00
parent ec7324b061
commit 42b8a446c6
464 changed files with 10395 additions and 1303 deletions

View file

@ -0,0 +1,418 @@
/**
* Default PhotoSwipe UI CSS file, http://photoswipe.com
* @author Dmitry Semenov
*/
.pswp__ui {
-webkit-font-smoothing: auto;
visibility: visible;
opacity: 1;
z-index: 1050; }
.pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 44px;
width: 100%; }
/**
* Loading indicator, aka preloader.
* You can play with preloader is here: http://codepen.io/dimsemenov/pen/yyBWoR
*/
.pswp__preloader {
width: 44px;
height: 44px;
position: absolute;
top: 0;
left: 50%;
margin-left: -22px;
z-index: 20;
opacity: 0;
position: relative;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
will-change: opacity; }
.pswp__preloader__icn {
width: 20px;
height: 20px;
margin: 12px; }
.pswp__preloader--active {
opacity: 1; }
.pswp__preloader--active .pswp__preloader__icn {
background: url(preloader.gif) 0 0 no-repeat; }
.pswp--css_animation .pswp__preloader--active {
opacity: 1; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
-webkit-animation: clockwise 500ms linear infinite;
animation: clockwise 500ms linear infinite; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
.pswp--css_animation .pswp__preloader__icn {
background: none;
opacity: 0.75;
width: 14px;
height: 14px;
position: absolute;
left: 15px;
top: 15px;
margin: 0; }
.pswp--css_animation .pswp__preloader__cut {
position: relative;
width: 7px;
height: 14px;
overflow: hidden; }
.pswp--css_animation .pswp__preloader__donut {
box-sizing: border-box;
width: 14px;
height: 14px;
border: 2px solid white;
border-radius: 50%;
border-left-color: transparent;
border-bottom-color: transparent;
position: absolute;
top: 0;
left: 0;
background: none;
margin: 0; }
@-webkit-keyframes clockwise {
0% {
-webkit-transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg); } }
@keyframes clockwise {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
@-webkit-keyframes donut-rotate {
0% {
-webkit-transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0); } }
@keyframes donut-rotate {
0% {
transform: rotate(0); }
50% {
transform: rotate(-140deg); }
100% {
transform: rotate(0); } }
.pswp__error-msg {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
color: white;
font-size: 14px;
line-height: 16px;
margin-top: -8px;
color: white;
opacity: 0.7; }
.pswp__error-msg a {
color: white;
text-decoration: underline; }
.pswp__button {
width: 44px;
height: 44px;
position: relative;
background: none;
cursor: pointer;
overflow: visible;
border: 0;
-webkit-appearance: none;
display: block;
outline: none;
padding: 0;
margin: 0;
-webkit-box-shadow: none;
box-shadow: none;
float: right;
opacity: 0.75;
-webkit-transition: opacity 0.25s;
transition: opacity 0.25s; }
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
.pswp--animated-in .pswp__button {
-webkit-transition: opacity 0.25s;
transition: opacity 0.25s; }
.pswp__ui--over-close .pswp__button--close {
opacity: 1; }
.pswp__button, .pswp__button--arrow--left:before, .pswp__button--arrow--right:before {
background: url(default-skin.png) 0 0 no-repeat;
background-size: 264px 88px;
width: 44px;
height: 44px; }
@media (-webkit-min-device-pixel-ratio: 1.1), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
.pswp--svg .pswp__button, .pswp--svg .pswp__button--arrow--left:before, .pswp--svg .pswp__button--arrow--right:before {
background-image: url(default-skin.svg); }
.pswp--svg .pswp__button--arrow--left, .pswp--svg .pswp__button--arrow--right {
background: none; } }
.pswp__counter, .pswp__share-modal {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.pswp__share-modal {
display: block;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 10px;
position: absolute;
z-index: 1450;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
will-change: opacity;
-webkit-backface-visibility: hidden; }
.pswp__share-modal--hidden {
display: none; }
.pswp__share-tooltip {
z-index: 1550;
position: absolute;
background: white;
top: 56px;
border-radius: 2px;
display: block;
width: auto;
right: 44px;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
-webkit-transform: translateY(6px);
transform: translateY(6px);
-webkit-transition: -webkit-transform 0.25s;
transition: transform 0.25s;
will-change: transform;
-webkit-backface-visibility: hidden; }
.pswp__share-tooltip a {
display: block;
padding: 8px 12px;
color: black;
text-decoration: none;
font-size: 14px;
line-height: 18px; }
.pswp__share-tooltip a:hover {
text-decoration: none;
color: black; }
.pswp__share-modal--fade-in {
opacity: 1; }
.pswp__share-modal--fade-in .pswp__share-tooltip {
-webkit-transform: translateY(0);
transform: translateY(0); }
.pswp--touch .pswp__share-tooltip a {
padding: 16px 12px; }
a.pswp__share--facebook:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
top: -12px;
right: 15px;
border: 6px solid rgba(0, 0, 0, 0);
border-bottom-color: white;
-webkit-pointer-events: none;
-moz-pointer-events: none;
pointer-events: none; }
a.pswp__share--facebook:hover {
background: #3e5c9a;
color: white; }
a.pswp__share--facebook:hover:before {
border-bottom-color: #3e5c9a; }
a.pswp__share--twitter:hover {
background: #55acee;
color: white; }
a.pswp__share--pinterest:hover {
background: #cccccc;
color: #ce272d; }
a.pswp__share--download:hover {
background: #dddddd; }
.pswp__button--close {
background-position: 0 -44px; }
.pswp__button--share {
background-position: -44px -44px; }
.pswp__button--fs {
display: none; }
.pswp--supports-fs .pswp__button--fs {
display: block; }
.pswp--fs .pswp__button--fs {
background-position: -44px 0; }
.pswp__button--zoom {
display: none;
background-position: -88px 0; }
.pswp--zoom-allowed .pswp__button--zoom {
display: block; }
.pswp--zoomed-in .pswp__button--zoom {
background-position: -132px 0; }
.pswp__button--arrow--left, .pswp__button--arrow--right {
background: none;
top: 50%;
margin-top: -50px;
width: 70px;
height: 100px;
position: absolute; }
.pswp__top-bar, .pswp__button--arrow--left, .pswp__button--arrow--right {
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp--touch .pswp__button--arrow--left, .pswp--touch .pswp__button--arrow--right {
visibility: hidden; }
.pswp__button--arrow--left {
left: 0; }
.pswp__button--arrow--right {
right: 0; }
.pswp__button--arrow--left:before, .pswp__button--arrow--right:before {
content: '';
top: 35px;
background-color: rgba(0, 0, 0, 0.3);
height: 30px;
width: 32px;
position: absolute; }
.pswp__button--arrow--left:before {
left: 6px;
background-position: -138px -44px; }
.pswp__button--arrow--right:before {
right: 6px;
background-position: -94px -44px; }
.pswp__counter {
position: absolute;
left: 0;
top: 0;
height: 44px;
font-size: 13px;
line-height: 44px;
color: white;
opacity: 0.75;
padding: 0 10px; }
@media screen and (max-width: 1024px) {
.pswp_scroll-wrap {
top: 0;
bottom: 0; }
.pswp__caption {
margin-top: 0; }
.pswp__preloader {
position: relative;
left: auto;
top: auto;
margin: 0;
float: right; } }
.pswp__caption {
position: absolute;
left: 0;
bottom: 0;
color: white;
width: 100%;
min-height: 44px; }
.pswp__caption small {
font-size: 11px;
color: #bbbbbb; }
.pswp__caption__center {
text-align: left;
max-width: 420px;
margin: 0 auto;
color: white;
font-size: 13px;
padding: 10px;
line-height: 20px;
color: #cccccc; }
.pswp__caption--empty {
display: none; }
.pswp__caption--fake {
visibility: hidden; }
.pswp__bg, .pswp__caption, .pswp__top-bar, .pswp--has_mouse .pswp__button--arrow--left, .pswp--has_mouse .pswp__button--arrow--right {
will-change: opacity;
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--animated-in .pswp__bg, .pswp--animated-in .pswp__zoom-wrap {
-webkit-transition: none;
transition: none; }
.pswp--has_mouse .pswp__button--arrow--left, .pswp--has_mouse .pswp__button--arrow--right {
visibility: visible; }
.pswp__top-bar, .pswp__caption {
background-color: rgba(0, 0, 0, 0.5); }
.pswp__ui--fit .pswp__top-bar, .pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.3); }
.pswp__ui--hidden .pswp__top-bar, .pswp__ui--hidden .pswp__caption, .pswp__ui--hidden .pswp__button--arrow--left, .pswp__ui--hidden .pswp__button--arrow--right {
opacity: 0; }
.pswp__ui--idle .pswp__top-bar {
opacity: 0; }
.pswp__ui--idle .pswp__button--arrow--left, .pswp__ui--idle .pswp__button--arrow--right {
opacity: 0; }
.pswp__ui--hidden .pswp__top-bar, .pswp__ui--hidden .pswp__caption, .pswp__ui--hidden .pswp__bg, .pswp__ui--hidden .pswp__button--arrow--left, .pswp__ui--hidden .pswp__button--arrow--right {
opacity: 0.001; }
.pswp__element--disabled {
display: none !important; }
.pswp--minimal--dark .pswp__top-bar {
background: none; }
.pswp--minimal--dark .pswp__button--arrow--left, .pswp--minimal--dark .pswp__button--arrow--right {
background: none; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="264px" height="88px" viewBox="0 0 264 88" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.0 (7574) - http://www.bohemiancoding.com/sketch -->
<title>default-skin 2</title>
<description>Created with Sketch.</description>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="default-skin" sketch:type="MSLayerGroup">
<path d="M67.0018835,59.5 L67.0018835,63.268331 C60.6953142,64.1065038 57.8175182,69.0186795 57,73 C59.2189781,70.171167 62.5639273,67.9024591 67.0018835,67.9024591 L67.0018835,71.5 L73,65.5853951 L67.0018835,59.5 Z" id="Shape" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<g id="Group" transform="translate(13.000000, 15.000000)" fill="#FFFFFF" sketch:type="MSShapeGroup">
<path d="M0,14 L0,9 L2,9 L2,12 L5,12 L5,14 L0,14 Z" id="Shape"></path>
<path d="M0,0 L5,0 L5,2 L2,2 L2,5 L0,5 L0,0 Z" id="Shape"></path>
<path d="M18,0 L18,5 L16,5 L16,2 L15.2629743,2 L13,2 L13,0 L18,0 Z" id="Shape"></path>
<path d="M18,14 L13,14 L13,12 L16,12 L16,9 L18,9 L18,14 Z" id="Shape"></path>
</g>
<g id="Group-4" transform="translate(57.000000, 15.000000)" fill="#FFFFFF" sketch:type="MSShapeGroup">
<path d="M0,14 L0,9 L2,9 L2,12 L5,12 L5,14 L0,14 Z" id="Shape" transform="translate(2.500000, 11.500000) rotate(-180.000000) translate(-2.500000, -11.500000) "></path>
<path d="M0,0 L5,0 L5,2 L2,2 L2,5 L0,5 L0,0 Z" id="Shape" transform="translate(2.500000, 2.500000) rotate(-180.000000) translate(-2.500000, -2.500000) "></path>
<path d="M18,0 L18,5 L16,5 L16,2 L15.2629743,2 L13,2 L13,0 L18,0 Z" id="Shape" transform="translate(15.500000, 2.500000) rotate(-180.000000) translate(-15.500000, -2.500000) "></path>
<path d="M18,14 L13,14 L13,12 L16,12 L16,9 L18,9 L18,14 Z" id="Shape" transform="translate(15.500000, 11.500000) rotate(-180.000000) translate(-15.500000, -11.500000) "></path>
</g>
<path d="M21,65 L21,57 L23,57 L23,65 L31,65 L31,67 L23,67 L23,75 L21,75 L21,67 L13,67 L13,65 L21,65 Z" id="Rectangle-13" fill="#FFFFFF" sketch:type="MSShapeGroup" transform="translate(22.000000, 66.000000) rotate(-45.000000) translate(-22.000000, -66.000000) "></path>
<path d="M111.784738,65.0291574 L110,63.5 L113,60 L103,60 L103,58 L113,58 L110,54.5 L111.784738,53.0320871 L117,59 L111.784738,65.0291574 Z" id="Shape-3" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<path d="M155.784738,65.0291574 L154,63.5 L157,60 L147,60 L147,58 L157,58 L154,54.5 L155.784738,53.0320871 L161,59 L155.784738,65.0291574 Z" id="Shape-4" fill="#FFFFFF" sketch:type="MSShapeGroup" transform="translate(154.000000, 59.000000) scale(-1, 1) translate(-154.000000, -59.000000) "></path>
<g id="Group-2" transform="translate(147.000000, 16.000000)" sketch:type="MSShapeGroup">
<rect id="Rectangle-11" fill="#FFFFFF" transform="translate(11.767767, 11.767767) scale(-1, 1) rotate(-45.000000) translate(-11.767767, -11.767767) " x="9.67157286" y="10.767767" width="4.59619409" height="2"></rect>
<path d="M5.5,11 C8.53756612,11 11,8.53756612 11,5.5 C11,2.46243388 8.53756612,0 5.5,0 C2.46243388,0 0,2.46243388 0,5.5 C0,8.53756612 2.46243388,11 5.5,11 Z" id="Oval-1" stroke="#FFFFFF" stroke-width="1.5"></path>
<rect id="Rectangle-12" fill="#FFFFFF" x="3" y="5" width="5" height="1"></rect>
</g>
<g id="Group-3" transform="translate(103.000000, 16.000000)" sketch:type="MSShapeGroup">
<path d="M13.9571068,12.5428932 L12.5428932,13.9571068 L9.29289322,10.7071068 L10.7071068,9.29289322 L13.9571068,12.5428932 Z" id="Rectangle-11" fill="#FFFFFF"></path>
<path d="M5.5,11 C8.53756612,11 11,8.53756612 11,5.5 C11,2.46243388 8.53756612,0 5.5,0 C2.46243388,0 0,2.46243388 0,5.5 C0,8.53756612 2.46243388,11 5.5,11 Z" id="Oval-1" stroke="#FFFFFF" stroke-width="1.5"></path>
<rect id="Rectangle-17" fill="#FFFFFF" x="3" y="5" width="5" height="1"></rect>
<rect id="Rectangle-16" fill="#FFFFFF" transform="translate(5.500000, 5.500000) rotate(-269.000000) translate(-5.500000, -5.500000) " x="3" y="5" width="5" height="1"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

View file

@ -0,0 +1,824 @@
/*! PhotoSwipe Default UI - 4.0.0 - 2014-12-04
* http://photoswipe.com
* Copyright (c) 2014 Dmitry Semenov; */
/**
*
* UI on top of main sliding area (caption, arrows, close button, etc.).
* Built just using public methods/properties of PhotoSwipe.
*
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory;
} else {
root.PhotoSwipeUI_Default = factory();
}
})(this, function () {
'use strict';
var PhotoSwipeUI_Default =
function(pswp, framework) {
var ui = this;
var _overlayUIUpdated = false,
_controlsVisible = true,
_fullscrenAPI,
_controls,
_captionContainer,
_fakeCaptionContainer,
_indexIndicator,
_shareButton,
_shareModal,
_shareModalHidden = true,
_initalCloseOnScrollValue,
_isIdle,
_loadingIndicator,
_loadingIndicatorHidden,
_loadingIndicatorTimeout,
_options = {
barsSize: {top:44, bottom:'auto'},
closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
timeToIdle: 4000,
timeToIdleOutside: 1000,
loadingIndicatorDelay: 1000, // 2s
addCaptionHTMLFn: function(item, captionEl, isFake) {
if(!item.title) {
captionEl.children[0].innerHTML = '';
return false;
}
captionEl.children[0].innerHTML = item.title;
return true;
},
closeEl:true,
captionEl: true,
fullscreenEl: true,
zoomEl: true,
shareEl: true,
counterEl: true,
arrowEl: true,
preloaderEl: true,
tapToClose: false,
tapToToggleControls: true,
shareButtons: [
{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'},
{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
],
indexIndicatorSep: ' / '
},
_blockControlsTap,
_blockControlsTapTimeout;
var _onControlsTap = function(e) {
if(_blockControlsTap) {
return true;
}
e = e || window.event;
var target = e.target || e.srcElement,
uiElement,
clickedClass = target.className,
found;
for(var i = 0; i < _uiElements.length; i++) {
uiElement = _uiElements[i];
if(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) {
uiElement.onTap();
found = true;
}
}
if(found) {
if(e.stopPropagation) {
e.stopPropagation();
}
_blockControlsTap = true;
_blockControlsTapTimeout = setTimeout(function() {
_blockControlsTap = false;
}, 30 );
}
},
_fitControlsInViewport = function() {
return !pswp.likelyTouchDevice || pswp.options.mouseUsed || screen.width > 1200;
},
_toggleShareModal = function() {
_shareModalHidden = !_shareModalHidden;
if(!_shareModalHidden) {
framework[ (_shareModalHidden ? 'add' : 'remove') + 'Class'](_shareModal, 'pswp__share-modal--hidden');
setTimeout(function() {
if(!_shareModalHidden) {
framework.addClass(_shareModal, 'pswp__share-modal--fade-in');
}
}, 30);
} else {
framework.removeClass(_shareModal, 'pswp__share-modal--fade-in');
setTimeout(function() {
if(_shareModalHidden) {
framework[ (_shareModalHidden ? 'add' : 'remove') + 'Class'](_shareModal, 'pswp__share-modal--hidden');
}
}, 300);
}
if(!_shareModalHidden) {
_updateShareURLs();
}
return false;
},
_openWindowPopup = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
if(!target.href) {
return false;
}
if( target.hasAttribute('download') ) {
return true;
}
//if( !pswp.options.mouseUsed ) {
// target.setAttribute('target', '_self');
// return true;
//}
window.open(target.href, "pswp_share", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=" + (window.screen ? Math.round(screen.width / 2 - 275) : 100) );
if(!_shareModalHidden) {
_toggleShareModal();
}
return false;
},
_updateShareURLs = function() {
var shareButtonOut = '',
shareButtonData,
shareURL;
for(var i = 0; i < pswp.options.shareButtons.length; i++) {
shareButtonData = pswp.options.shareButtons[i];
shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(window.location.href) )
.replace('{{image_url}}', encodeURIComponent(pswp.currItem.src || '') )
.replace('{{raw_image_url}}', pswp.currItem.src || '' )
.replace('{{text}}', encodeURIComponent(pswp.currItem.title || '') );
shareButtonOut += '<a href="' + shareURL + '" target="_blank" class="pswp__share--' + shareButtonData.id + '"' + (shareButtonData.download ? 'download' : '') + '>' + shareButtonData.label + '</a>';
}
_shareModal.children[0].innerHTML = shareButtonOut;
_shareModal.children[0].onclick = _openWindowPopup;
},
_hasCloseClass = function(target) {
for(var i = 0; i < pswp.options.closeElClasses.length; i++) {
if( framework.hasClass(target, 'pswp__' + pswp.options.closeElClasses[i]) ) {
return true;
}
}
},
_idleInterval,
_idleTimer,
_idleIncrement = 0,
_onIdleMouseMove = function() {
clearTimeout(_idleTimer);
_idleIncrement = 0;
if(_isIdle) {
ui.setIdle(false);
}
},
_onMouseLeaveWindow = function(e) {
e = e ? e : window.event;
var from = e.relatedTarget || e.toElement;
if (!from || from.nodeName == "HTML") {
clearTimeout(_idleTimer);
_idleTimer = setTimeout(function() {
ui.setIdle(true);
}, pswp.options.timeToIdleOutside);
}
},
_toggleLoadingIndicator = function(hide) {
if( /*pswp.likelyTouchDevice*/ _loadingIndicatorHidden !== hide ) {
framework[ (hide ? 'remove' : 'add') + 'Class' ](_loadingIndicator, 'pswp__preloader--active');
_loadingIndicatorHidden = hide;
}
};
var _uiElements = [
{
name: 'caption',
option: 'captionEl',
onInit: function(el) {
_captionContainer = el;
}
},
{
name: 'share-modal',
option: 'shareEl',
onInit: function(el) {
_shareModal = el;
},
onTap: function() {
_toggleShareModal();
}
},
{
name: 'button--share',
option: 'shareEl',
onInit: function(el) {
_shareButton = el;
},
onTap: function() {
_toggleShareModal();
}
},
{
name: 'button--zoom',
option: 'zoomEl',
onTap: pswp.toggleDesktopZoom
},
{
name: 'counter',
option: 'counterEl',
onInit: function(el) {
_indexIndicator = el;
}
},
{
name: 'button--close',
option: 'closeEl',
onTap: pswp.close
},
{
name: 'button--arrow--left',
option: 'arrowEl',
onTap: pswp.prev
},
{
name: 'button--arrow--right',
option: 'arrowEl',
onTap: pswp.next
},
{
name: 'button--fs',
option: 'fullscreenEl',
onTap: function() {
if(_fullscrenAPI.isFullscreen()) {
_fullscrenAPI.exit();
} else {
_fullscrenAPI.enter();
}
}
},
{
name: 'preloader',
option: 'preloaderEl',
onInit: function(el) {
_loadingIndicator = el;
}
}
];
ui.init = function() {
//return;
//window.pswp = pswp;
framework.extend(pswp.options, _options, true);
_controls = pswp.scrollWrap.children[1];//pswp.template.children[2];
var _listen = pswp.listen;
// Hide controls on vertical drag
_listen('onVerticalDrag', function(now) {
if(_controlsVisible && now < 0.95) {
ui.hideControls();
} else if(!_controlsVisible && now >= 0.95) {
ui.showControls();
}
});
// Hide controls when pinching to close
var pinchControlsHidden;
_listen('onPinchClose' , function(now) {
if(_controlsVisible && now < 0.9) {
ui.hideControls();
pinchControlsHidden = true;
} else if(pinchControlsHidden && !_controlsVisible && now > 0.9) {
ui.showControls();
}
});
_listen('zoomGestureEnded', function() {
pinchControlsHidden = false;
if(pinchControlsHidden && !_controlsVisible) {
ui.showControls();
}
});
_listen('beforeChange', ui.update);
//
// _listen('zoomGestureStarted', function() {
// if(pswp.options.tapToToggleControls ) {
// ui.hideControls();
// }
// });
// _listen('zoomGestureEnded', function() {
// if(pswp.options.tapToToggleControls && pswp.getZoomLevel() <= pswp.currItem.fitRatio ) {
// ui.showControls();
// }
// });
_listen('doubleTap', function(point) {
//pswp.toggleDesktopZoom(point);
// toggleDesktopZoom
var initialZoomLevel = pswp.currItem.initialZoomLevel;
if(pswp.getZoomLevel() !== initialZoomLevel) {
pswp.zoomTo(initialZoomLevel, point, 333);
} else {
pswp.zoomTo(pswp.currItem.doubleTapZoom, point, 333);
}
});
_listen('bindEvents', function() {
framework.bind(_controls, 'pswpTap click', _onControlsTap);
framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
if(!pswp.likelyTouchDevice) {
framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
}
});
if(pswp.options.timeToIdle) {
_listen('mouseUsed', function() {
framework.bind(document, 'mousemove', _onIdleMouseMove);
framework.bind(document, 'mouseout', _onMouseLeaveWindow);
_idleInterval = setInterval(function() {
_idleIncrement++;
if(_idleIncrement === 2) {
ui.setIdle(true);
}
}, pswp.options.timeToIdle / 2);
});
}
_listen('preventDragEvent', function(e, isDown, preventObj) {
var t = e.target || e.srcElement;
if(t && t.className && e.type.indexOf('mouse') > -1 && ( t.className.indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) ) ) {
preventObj.prevent = false;
}
});
_listen('unbindEvents', function() {
if(!_shareModalHidden) {
_toggleShareModal();
}
if(_idleInterval) {
clearInterval(_idleInterval);
}
framework.unbind(document, 'mouseout', _onMouseLeaveWindow);
framework.unbind(document, 'mousemove', _onIdleMouseMove);
framework.unbind(_controls, 'pswpTap click', _onControlsTap);
framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
if(_fullscrenAPI) {
framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
if(_fullscrenAPI.isFullscreen()) {
_options.hideAnimationDuration = 0;
_fullscrenAPI.exit();
}
_fullscrenAPI = null;
}
});
_listen('destroy', function() {
if(pswp.options.captionEl) {
if(_fakeCaptionContainer) {
_controls.removeChild(_fakeCaptionContainer);
}
framework.removeClass(_captionContainer, 'pswp__caption--empty');
}
if(_shareModal) {
_shareModal.children[0].onclick = null;
}
framework.removeClass(_controls, 'pswp__ui--over-close');
framework.addClass( _controls, 'pswp__ui--hidden');
ui.setIdle(false);
});
if(!pswp.options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
}
_listen('initialZoomIn', function() {
if(pswp.options.showAnimationDuration) {
framework.removeClass( _controls, 'pswp__ui--hidden');
}
});
_listen('initialZoomOut', function() {
framework.addClass( _controls, 'pswp__ui--hidden');
});
_listen('parseVerticalMargin', function(item) {
var gap = item.vGap;
// if(pswp.options.customGap) {
// gap.top = pswp.options.customGap.top;
// gap.bottom = pswp.options.customGap.bottom;
// return;
// }
if( _fitControlsInViewport() /* !pswp.likelyTouchDevice || pswp.options.mouseUsed || screen.width > 1200 */ /* pswp.viewportSize.y > 800 */) {
var bars = pswp.options.barsSize;
if(pswp.options.captionEl && bars.bottom === 'auto') {
if(!_fakeCaptionContainer) {
_fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');
_fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') );
_controls.insertBefore(_fakeCaptionContainer, _captionContainer);
framework.addClass(_controls, 'pswp__ui--fit');
}
if( pswp.options.addCaptionHTMLFn(item, _fakeCaptionContainer, true) ) {
var captionSize = _fakeCaptionContainer.clientHeight;
gap.bottom = parseInt(captionSize,10) || 44;
} else {
gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top
}
} else {
gap.bottom = bars.bottom;
}
// height of top bar is static, no need to calculate it
gap.top = bars.top;
} else {
gap.top = gap.bottom = 0;
}
});
var item,
classAttr,
uiElement;
var loopThroughChildElements = function(sChildren) {
var l = sChildren.length;
for(var i = 0; i < l; i++) {
item = sChildren[i];
classAttr = item.className;
for(var a = 0; a < _uiElements.length; a++) {
uiElement = _uiElements[a];
if(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) {
if( pswp.options[uiElement.option] ) { // if element is not disabled from options
framework.removeClass(item, 'pswp__element--disabled');
if(uiElement.onInit) {
uiElement.onInit(item);
}
//item.style.display = 'block';
} else {
framework.addClass(item, 'pswp__element--disabled');
//item.style.display = 'none';
}
}
}
}
};
loopThroughChildElements(_controls.children);
loopThroughChildElements(_controls.children[0].children);
if(pswp.options.shareEl && _shareButton && _shareModal) {
_shareModalHidden = true;
}
if(pswp.options.fullscreenEl) {
if(!_fullscrenAPI) {
_fullscrenAPI = ui.getFullscreenAPI();
}
if(_fullscrenAPI) {
framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
ui.updateFullscreen();
framework.addClass(pswp.template, 'pswp--supports-fs');
} else {
framework.removeClass(pswp.template, 'pswp--supports-fs');
}
}
// Setup loading indicator
if(pswp.options.preloaderEl) {
_toggleLoadingIndicator(true);
_listen('beforeChange', function() {
clearTimeout(_loadingIndicatorTimeout);
// display loading indicator with delay
_loadingIndicatorTimeout = setTimeout(function() {
if(pswp.currItem && pswp.currItem.loading) {
if( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) {
_toggleLoadingIndicator(false); // show preloader if progressive loading is not enabled, or image width is not defined yet (because of slow connection)
// items-controller.js function allowProgressiveImg
}
} else {
_toggleLoadingIndicator(true); // hide preloader
}
}, pswp.options.loadingIndicatorDelay);
});
_listen('imageLoadComplete', function(index, item) {
if(pswp.currItem === item) {
_toggleLoadingIndicator(true);
}
});
}
};
ui.setIdle = function(isIdle) {
_isIdle = isIdle;
framework[ (isIdle ? 'add' : 'remove') + 'Class' ](_controls, 'pswp__ui--idle');
};
ui.update = function() {
// Don't update UI if it's hidden
if(_controlsVisible && pswp.currItem) {
ui.updateIndexIndicator();
if(pswp.options.captionEl) {
pswp.options.addCaptionHTMLFn(pswp.currItem, _captionContainer);
if(!pswp.currItem.title) {
framework.addClass(_captionContainer, 'pswp__caption--empty');
} else {
framework.removeClass(_captionContainer, 'pswp__caption--empty');
}
}
_overlayUIUpdated = true;
} else {
_overlayUIUpdated = false;
}
};
ui.updateFullscreen = function() {
framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs');
};
ui.updateIndexIndicator = function() {
if(pswp.options.counterEl) {
// +1, because human-friendly index starts from one.
_indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) + pswp.options.indexIndicatorSep + pswp.options.getNumItemsFn();
}
};
ui.onGlobalTap = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
if(_blockControlsTap) {
return;
}
// if(e.detail.pointerType !== 'touch' && framework.hasClass(target, 'pswp__img') ) {
if(e.detail && e.detail.pointerType === 'mouse') {
// close gallery if clicked outside of the image
if(_hasCloseClass(target)) {
pswp.close();
}
if(framework.hasClass(target, 'pswp__img')) {
if(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {
pswp.close();
} else {
pswp.toggleDesktopZoom(e.detail.releasePoint);
}
}
} else {
// tap anywhere (except buttons) to toggle visibility of controls
if(pswp.options.tapToToggleControls) {
if(_controlsVisible) {
ui.hideControls();
} else {
ui.showControls();
}
}
// tap to close gallery
if(pswp.options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) {
pswp.close();
return;
}
}
};
ui.onMouseOver = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
// apply class when mouse is over an element that should close the gallery
if(_hasCloseClass(target)) {
framework.addClass(_controls, 'pswp__ui--over-close');
} else {
framework.removeClass(_controls, 'pswp__ui--over-close');
}
// if(_overImage) {
// }
};
ui.hideControls = function() {
framework.addClass(_controls,'pswp__ui--hidden');
_controlsVisible = false;
};
ui.showControls = function() {
_controlsVisible = true;
if(!_overlayUIUpdated) {
ui.update();
}
framework.removeClass(_controls,'pswp__ui--hidden');
};
ui.supportsFullscreen = function() {
var d = document;
return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);
};
ui.getFullscreenAPI = function() {
var dE = document.documentElement,
api,
tF = 'fullscreenchange';
if (dE.requestFullscreen) {
api = {
enterK: 'requestFullscreen',
exitK: 'exitFullscreen',
elementK: 'fullscreenElement',
eventK: tF
};
} else if(dE.mozRequestFullScreen ) {
api = {
enterK: 'mozRequestFullScreen',
exitK: 'mozCancelFullScreen',
elementK: 'mozFullScreenElement',
eventK: 'moz' + tF
};
} else if(dE.webkitRequestFullscreen) {
api = {
enterK: 'webkitRequestFullscreen',
exitK: 'webkitExitFullscreen',
elementK: 'webkitFullscreenElement',
eventK: 'webkit' + tF
};
} else if(dE.msRequestFullscreen) {
api = {
enterK: 'msRequestFullscreen',
exitK: 'msExitFullscreen',
elementK: 'msFullscreenElement',
eventK: 'MSFullscreenChange'
};
}
if(api) {
api.enter = function() {
// disable close-on-scroll in fullscreen
_initalCloseOnScrollValue = pswp.options.closeOnScroll;
pswp.options.closeOnScroll = false;
return pswp.template[this.enterK]( Element.ALLOW_KEYBOARD_INPUT );
};
api.exit = function() {
pswp.options.closeOnScroll = _initalCloseOnScrollValue;
return document[this.exitK]();
};
api.isFullscreen = function() { return document[this.elementK]; };
}
return api;
};
};
return PhotoSwipeUI_Default;
});

File diff suppressed because one or more lines are too long

125
vendors/photoswipe/photoswipe.css vendored Normal file
View file

@ -0,0 +1,125 @@
/**
* Core PhotoSwipe CSS file, http://photoswipe.com
* @author Dmitry Semenov
*/
.pswp {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
-ms-touch-action: none;
z-index: 500;
-webkit-text-size-adjust: 100%;
-webkit-backface-visibility: hidden;
outline: none; }
.pswp * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.pswp img {
max-width: none; }
.pswp--animate_opacity {
opacity: 0;
will-change: opacity;
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--open {
display: block; }
.pswp--zoom-allowed .pswp__img {
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.pswp--zoomed-in .pswp__img {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grap; }
.pswp--dragging .pswp__img {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing; }
.pswp__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: black;
opacity: 0;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__scroll-wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__container, .pswp__zoom-wrap {
-ms-touch-action: none;
touch-action: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0; }
.pswp__container, .pswp__img {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-touch-callout: none; }
.pswp__zoom-wrap {
position: absolute;
width: 100%;
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp__container, .pswp__zoom-wrap {
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden; }
.pswp__img {
position: absolute;
width: auto;
height: auto;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s; }
.pswp__img--placeholder {
-webkit-backface-visibility: hidden; }
.pswp__img--placeholder--blank {
background: #222222; }
.pswp--ie .pswp__img {
width: 100%;
height: 100%;
left: 0;
top: 0; }

3644
vendors/photoswipe/photoswipe.js vendored Normal file

File diff suppressed because it is too large Load diff

4
vendors/photoswipe/photoswipe.min.js vendored Normal file

File diff suppressed because one or more lines are too long