mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
get icons, swipebox through bower
This commit is contained in:
parent
cc0fd844c3
commit
601e6202e3
77815 changed files with 210644 additions and 107 deletions
17
dashboard-ui/bower_components/swipebox/.bower.json
vendored
Normal file
17
dashboard-ui/bower_components/swipebox/.bower.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "swipebox",
|
||||
"version": "1.4.1",
|
||||
"main": "src/js/jquery.swipebox.js",
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/brutaldesign/swipebox",
|
||||
"_release": "1.4.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.1",
|
||||
"commit": "80c68575772aacfbcffe4203a9f0ad57d4db8a62"
|
||||
},
|
||||
"_source": "git://github.com/brutaldesign/swipebox.git",
|
||||
"_target": "~1.4.1",
|
||||
"_originalSource": "swipebox",
|
||||
"_direct": true
|
||||
}
|
2
dashboard-ui/bower_components/swipebox/.gitattributes
vendored
Normal file
2
dashboard-ui/bower_components/swipebox/.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
20
dashboard-ui/bower_components/swipebox/.gitignore
vendored
Normal file
20
dashboard-ui/bower_components/swipebox/.gitignore
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Ignore dist
|
||||
dist/
|
||||
stage/
|
||||
|
||||
# Ignore demo scss
|
||||
demo/scss/
|
||||
|
||||
# Ignore grunt stuff
|
||||
**/.sass-cache
|
||||
**/.grunt
|
||||
**/node_modules
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
6
dashboard-ui/bower_components/swipebox/bower.json
vendored
Normal file
6
dashboard-ui/bower_components/swipebox/bower.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "swipebox",
|
||||
"version": "1.4.1",
|
||||
"main": "src/js/jquery.swipebox.js",
|
||||
"ignore": []
|
||||
}
|
1
dashboard-ui/bower_components/swipebox/demo/bagpakk.min.css
vendored
Normal file
1
dashboard-ui/bower_components/swipebox/demo/bagpakk.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dashboard-ui/bower_components/swipebox/demo/fork.png
vendored
Normal file
BIN
dashboard-ui/bower_components/swipebox/demo/fork.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
1
dashboard-ui/bower_components/swipebox/demo/normalize.css
vendored
Normal file
1
dashboard-ui/bower_components/swipebox/demo/normalize.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
1
dashboard-ui/bower_components/swipebox/demo/style.css
vendored
Normal file
1
dashboard-ui/bower_components/swipebox/demo/style.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
body{font-family:'Merriweather', serif;border-top:5px solid #4BBD93;overflow-x:hidden !important;background:#FFF;color:#666}body img{opacity:1 !important}h1,h2,h3,h4,h4,h6{font-family:'Raleway', sans-serif}a{text-decoration:none}ol{margin-left:2em;margin-bottom:2em}ul{margin-left:1em;margin-bottom:0}ul ul{margin-left:1em}header h1{margin-top:0;font-size:12rem}.lead{margin-bottom:2em}#fork-this{position:absolute;z-index:1;right:0;top:5px;width:0px;height:0px;border-style:solid;border-width:0 150px 150px 0;border-color:transparent #4BBD93 transparent transparent}#fork-this a{display:block;position:absolute;z-index:10;width:150px;height:150px;top:0;right:-150px;z-index:10;background:url("fork.png") no-repeat 0 0;background-size:150px 150px}#share{margin-bottom:3rem}#share #fb,#share #twitter{display:inline-block}#share #fb{position:relative;top:-8px}.container:nth-child(even){background:whitesmoke}.container:nth-child(odd){background:#fff}#box-container{margin:0;padding:0}.box{list-style-type:none;float:left;margin-bottom:1rem;margin-left:1%;margin-right:1%;width:48%}.box:nth-child(2n+1){clear:both;margin-left:0}.box:nth-child(2n+0){margin-right:0}.box a{display:block;width:100%;height:auto}.box a img{-webkit-back-visibility:hidden;display:block;width:100%;height:auto;vertical-align:bottom}footer{font-size:1.3rem;font-family:"Helvetica neue", Helvetica, Arial, sans-serif;text-align:center;color:#666;margin:2rem 0}footer a{color:#666}@media screen and (max-width: 799px){header h1{font-size:8rem}hr{margin:2rem 0}#fork-this{display:none}#share #fb{top:-8px}.button{margin-left:0;margin-right:0;width:100%}.button{font-size:1.3rem;padding:1.4rem 2rem}}@media screen and (max-width: 410px){header h1{font-size:5rem}.box{width:100%;margin-left:0;margin-right:0}}
|
24
dashboard-ui/bower_components/swipebox/grunt/.jshintrc
vendored
Normal file
24
dashboard-ui/bower_components/swipebox/grunt/.jshintrc
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"es3": true,
|
||||
"expr": true,
|
||||
"immed": true,
|
||||
"noarg": true,
|
||||
"onevar": true,
|
||||
"quotmark": "single",
|
||||
"trailing": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
|
||||
"browser": true,
|
||||
|
||||
"globals": {
|
||||
"_": false,
|
||||
"Backbone": false,
|
||||
"jQuery": false,
|
||||
"wp": false
|
||||
}
|
||||
}
|
168
dashboard-ui/bower_components/swipebox/grunt/gruntfile.js
vendored
Normal file
168
dashboard-ui/bower_components/swipebox/grunt/gruntfile.js
vendored
Normal file
|
@ -0,0 +1,168 @@
|
|||
module.exports = function(grunt) {
|
||||
|
||||
// don't forget to update the version in the package.json and bower.json file
|
||||
|
||||
// load dependencies
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
version: grunt.file.readJSON('package.json').version,
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
// notify cross-OS - see https://github.com/dylang/grunt-notify
|
||||
notify: {
|
||||
|
||||
scss: {
|
||||
options: {
|
||||
title: 'SCSS compiled',
|
||||
message: 'CSS is in the hood'
|
||||
}
|
||||
},
|
||||
|
||||
js: {
|
||||
options: {
|
||||
title: 'JS checked and minified',
|
||||
message: 'JS is all good'
|
||||
}
|
||||
},
|
||||
|
||||
dist: {
|
||||
options: {
|
||||
title: 'Project Compiled',
|
||||
message: 'All good'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// compile scss
|
||||
sass: {
|
||||
|
||||
dist:{
|
||||
options:{
|
||||
style: 'expanded'
|
||||
},
|
||||
|
||||
files:{
|
||||
'../src/css/swipebox.css': '../scss/swipebox.scss',
|
||||
}
|
||||
},
|
||||
|
||||
demo:{
|
||||
options:{
|
||||
style: 'compressed'
|
||||
},
|
||||
|
||||
files:{
|
||||
'../demo/style.css': '../demo/scss/style.scss',
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// https://github.com/nDmitry/grunt-autoprefixer
|
||||
autoprefixer: {
|
||||
options: {
|
||||
browsers: ['last 3 versions', 'bb 10', 'android 3']
|
||||
},
|
||||
no_dest: {
|
||||
src: '../src/css/swipebox.css',
|
||||
}
|
||||
},
|
||||
|
||||
// minify css asset files
|
||||
cssmin: {
|
||||
minify: {
|
||||
expand: true,
|
||||
cwd: '../src/css/',
|
||||
src: ['*.css', '!*.min.css'],
|
||||
dest: '../src/css/',
|
||||
ext: '.min.css'
|
||||
}
|
||||
},
|
||||
|
||||
// chech our JS
|
||||
jshint: {
|
||||
options : {
|
||||
jshintrc : '.jshintrc'
|
||||
},
|
||||
all: [ '../src/js/jquery.swipebox.js' ]
|
||||
},
|
||||
|
||||
// minify JS
|
||||
uglify: {
|
||||
|
||||
options:{
|
||||
banner : '/*! Swipebox v<%= version %> | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */\n'
|
||||
},
|
||||
|
||||
admin: {
|
||||
files: {
|
||||
'../src/js/jquery.swipebox.min.js': [ '../src/js/jquery.swipebox.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// watch it live
|
||||
watch: {
|
||||
js: {
|
||||
files: [ '../src/js/*.js' ],
|
||||
tasks: [
|
||||
'jshint',
|
||||
'uglify',
|
||||
'notify:js'
|
||||
],
|
||||
},
|
||||
scss: {
|
||||
|
||||
files: ['../scss/*.scss', '../demo/scss/*.scss'],
|
||||
tasks: [
|
||||
'sass',
|
||||
'autoprefixer',
|
||||
'cssmin',
|
||||
'notify:scss'
|
||||
],
|
||||
},
|
||||
|
||||
css: {
|
||||
files: ['*.css']
|
||||
},
|
||||
|
||||
livereload: {
|
||||
files: [ '../src/css/*.css', '../demo/*.css' ],
|
||||
options: { livereload: true }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
} ); // end init config
|
||||
|
||||
/**
|
||||
* Default task
|
||||
*/
|
||||
grunt.registerTask( 'default', [
|
||||
'sass:dist',
|
||||
'autoprefixer',
|
||||
'cssmin',
|
||||
'jshint',
|
||||
'uglify',
|
||||
'sass:demo',
|
||||
'notify:dist'
|
||||
] );
|
||||
|
||||
/**
|
||||
* Dev task
|
||||
*
|
||||
* The main tasks for development
|
||||
*
|
||||
*/
|
||||
grunt.registerTask( 'dev', [
|
||||
'sass:dist',
|
||||
'autoprefixer',
|
||||
'cssmin',
|
||||
'jshint',
|
||||
'uglify',
|
||||
'sass:demo',
|
||||
'watch'
|
||||
] );
|
||||
};
|
21
dashboard-ui/bower_components/swipebox/grunt/package.json
vendored
Normal file
21
dashboard-ui/bower_components/swipebox/grunt/package.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "grunt-swipebox",
|
||||
"version": "1.4.1",
|
||||
"description": "A touchable jQuery lightbox",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/brutaldesign/swipebox.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"load-grunt-tasks": "~1.0.0",
|
||||
"grunt-contrib-sass": "~0.8.1",
|
||||
"grunt-autoprefixer": "~2.0.0",
|
||||
"grunt-contrib-cssmin": "~0.10.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-uglify": "~0.6.0",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-notify": "~0.3.1"
|
||||
}
|
||||
}
|
274
dashboard-ui/bower_components/swipebox/index.html
vendored
Normal file
274
dashboard-ui/bower_components/swipebox/index.html
vendored
Normal file
|
@ -0,0 +1,274 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="description" content="A touchable jQuery lightbox plugin for desktop, mobile and tablet" />
|
||||
<meta property="og:site_name" content="Swipebox" />
|
||||
<meta property="og:url" content="http://brutaldesign.github.com/swipebox/" />
|
||||
<meta property="og:image" content="http://swipebox.csag.co/images/swipe250.jpg" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="Swipebox | A touchable jQuery lightbox" />
|
||||
<meta property="og:description" content="Swipebox is a jQuery lightbox plugin for desktop, mobile and tablet">
|
||||
<meta itemprop="name" content="Swipebox | A touchable jQuery lightbox">
|
||||
<meta itemprop="image" content="http://swipebox.csag.co/images/swipe250.jpg">
|
||||
<meta itemprop="description" content="Swipebox is a jQuery lightbox plugin for desktop, mobile and tablet">
|
||||
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Merriweather:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="demo/normalize.css">
|
||||
<link rel="stylesheet" href="demo/bagpakk.min.css">
|
||||
<link rel="stylesheet" href="demo/style.css">
|
||||
<link rel="stylesheet" href="src/css/swipebox.css">
|
||||
<title>Swipebox | A touchable jQuery lightbox</title>
|
||||
<!-- share buttons -->
|
||||
<script type="text/javascript">(function(doc, script) {
|
||||
var js,
|
||||
fjs = doc.getElementsByTagName(script)[0],
|
||||
add = function(url, id) {
|
||||
if (doc.getElementById(id)) {return;}
|
||||
js = doc.createElement(script);
|
||||
js.src = url;
|
||||
id && (js.id = id);
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
};add("//connect.facebook.net/en_US/all.js#xfbml=1", "facebook-jssdk");
|
||||
add("//platform.twitter.com/widgets.js", "twitter-wjs");
|
||||
}(document, "script"));
|
||||
</script>
|
||||
<!-- end share buttons -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="fb-root"></div>
|
||||
<div id="fork-this">
|
||||
<a href="https://github.com/brutaldesign/swipebox"></a>
|
||||
</div>
|
||||
|
||||
<header class="container">
|
||||
<div class="wrap small-width">
|
||||
<div class="lead text-center">
|
||||
<h1>Swipebox.</h1>
|
||||
<p class="tagline">A touchable jQuery lightbox</p>
|
||||
</div>
|
||||
|
||||
<div id="share" class="text-center">
|
||||
<div id="twitter">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://brutaldesign.github.com/swipebox" data-text="Swipebox | A touchable jQuery lightbox" data-via="brutaldesign">Tweet</a>
|
||||
</div>
|
||||
<div id="fb">
|
||||
<div class="fb-like" data-href="http://brutaldesign.github.com/swipebox/" data-send="false" data-layout="button_count" data-width="110" data-show-faces="false" data-colorscheme="light" data-action="like"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="#what">What is Swipebox ?</a>
|
||||
<ul>
|
||||
<li><a href="#features">Main Features</a></li>
|
||||
<li><a href="#compatibility">Compatibility</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#try">Try it</a></li>
|
||||
<li><a href="#basic">Basic Usage</a></li>
|
||||
<li><a href="#advanced">Advanced</a>
|
||||
<ul>
|
||||
<li><a href="#rel">Gallery</a></li>
|
||||
<li><a href="#video">Video support</a></li>
|
||||
<li><a href="#dynamic">Load slides dynamically</a></li>
|
||||
<li><a href="#open">Check open state</a></li>
|
||||
<li><a href="#options">Options</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#download">Download</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section id="exemple" class="container">
|
||||
<div class="wrap small-width">
|
||||
<div id="try"></div>
|
||||
<ul id="box-container">
|
||||
<li class="box">
|
||||
<a href="http://swipebox.csag.co/images/image-1.jpg" class="swipebox" title="Fog">
|
||||
<img src="http://swipebox.csag.co/images/image-1.jpg" alt="image">
|
||||
</a>
|
||||
</li>
|
||||
<li class="box">
|
||||
<a href="http://swipebox.csag.co/images/image-2.jpg" class="swipebox" title="City">
|
||||
<img src="http://swipebox.csag.co/images/image-2.jpg" alt="image">
|
||||
</a>
|
||||
</li>
|
||||
<li class="box">
|
||||
<a href="http://swipebox.csag.co/images/image-3.jpg" class="swipebox" title="Street">
|
||||
<img src="http://swipebox.csag.co/images/image-3.jpg" alt="image">
|
||||
</a>
|
||||
</li>
|
||||
<li class="box">
|
||||
<a href="http://swipebox.csag.co/images/image-4.jpg" class="swipebox" title="Mustache Guy">
|
||||
<img src="http://swipebox.csag.co/images/image-4.jpg" alt="image">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="presentation" class="container">
|
||||
<div class="wrap small-width">
|
||||
<div id="what"></div>
|
||||
<h2>What is Swipebox ?</h2>
|
||||
<p>Swipebox is a jQuery "lightbox" plugin for desktop, mobile and tablet.</p>
|
||||
|
||||
<div id="features"></div>
|
||||
<h3>Main Features</h3>
|
||||
<ol>
|
||||
<li>Swipe gestures for mobile</li>
|
||||
<li>Keyboard Navigation for desktop</li>
|
||||
<li>CSS transitions with jQuery fallback</li>
|
||||
<li>Retina support for UI icons</li>
|
||||
<li>Easy CSS customization</li>
|
||||
</ol>
|
||||
|
||||
<div id="compatibility"></div>
|
||||
<h3>Compatibility</h3>
|
||||
<p>Chrome, Safari, Firefox, Opera, IE9+, IOS4+, Android, windows phone.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="usage" class="container">
|
||||
<div class="wrap small-width">
|
||||
<div id="basic"></div>
|
||||
<h2>Basic Usage</h2>
|
||||
<h3>Javascript</h3>
|
||||
|
||||
<p>Include jquery and the swipebox script in your <code>head</code> tags or right before your <code>body</code> closing tag.</p>
|
||||
<pre><script src="lib/jquery-2.0.3.js"></script>
|
||||
<script src="src/js/jquery.swipebox.js"></script></pre>
|
||||
|
||||
<h3>CSS</h3>
|
||||
<p>Include the swipebox CSS style in your <code>head</code> tags.</p>
|
||||
<pre><link rel="stylesheet" href="src/css/swipebox.css"></pre>
|
||||
<h3>HTML</h3>
|
||||
<p>Use a specific class for your links and use the title attribute as caption.</p>
|
||||
<pre><a href="big/image.jpg" class="swipebox" title="My Caption">
|
||||
<img src="small/image.jpg" alt="image">
|
||||
</a></pre>
|
||||
<h3>Fire the plugin</h3>
|
||||
<p>Bind the swipebox behaviour on every link with the "swipebox" class.</p>
|
||||
<pre><script type="text/javascript">
|
||||
;( function( $ ) {
|
||||
|
||||
$( '.swipebox' ).swipebox();
|
||||
|
||||
} )( jQuery );
|
||||
</script>
|
||||
</pre>
|
||||
</div>
|
||||
</section>
|
||||
<section id="advanced-usage" class="container">
|
||||
<div class="wrap small-width">
|
||||
<div id="advanced"></div>
|
||||
<h2>Advanced</h2>
|
||||
|
||||
<div id="rel"></div>
|
||||
<h3>Gallery</h3>
|
||||
<p>You can add a <code>rel</code> attribute to your links to seperate your galleries.</p>
|
||||
<pre>
|
||||
<span><!-- Gallery 1 --></span>
|
||||
<a rel="gallery-1" href="big/image1.jpg" class="swipebox">
|
||||
<img src="small/image1.jpg" alt="image">
|
||||
</a>
|
||||
<a rel="gallery-1" href="big/image2.jpg" class="swipebox">
|
||||
<img src="small/image2.jpg" alt="image">
|
||||
</a>
|
||||
<span><!-- Gallery 2 --></span>
|
||||
<a rel="gallery-2" href="big/image3.jpg" class="swipebox">
|
||||
<img src="small/image3.jpg" alt="image">
|
||||
</a>
|
||||
<a rel="gallery-2" href="big/image4.jpg" class="swipebox">
|
||||
<img src="small/image4.jpg" alt="image">
|
||||
</a></pre>
|
||||
|
||||
<div id="video"></div>
|
||||
<h3>Video support</h3>
|
||||
<p>Simply paste a youtube or vimeo video URL in your href attribute. The script will automatically check if it's a youtube or vimeo URL and open the video in the swipebox.</p>
|
||||
<p>
|
||||
<a class="swipebox-video" href="http://vimeo.com/29193046">My Video</a>
|
||||
</p>
|
||||
<pre><a class="swipebox-video" rel="vimeo" href="http://vimeo.com/29193046">My Videos</a></pre>
|
||||
|
||||
<div id="dynamic"></div>
|
||||
<h3>Load slides dynamically</h3>
|
||||
<p>You can set your gallery dynamically by passing an array object to the swipebox.</p>
|
||||
<p><a id="gallery" href="#">View gallery</a></p>
|
||||
|
||||
<pre>
|
||||
$( '#gallery' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
$.swipebox( [
|
||||
{ href:'big/image1.jpg', title:'My Caption' },
|
||||
{ href:'big/image2.jpg', title:'My Second Caption' }
|
||||
] );
|
||||
} );</pre>
|
||||
<div id="open"></div>
|
||||
<h3>Check open state</h3>
|
||||
<pre>if ( $.swipebox.isOpen ) {
|
||||
// do stuff
|
||||
}</pre>
|
||||
|
||||
<div id="options"></div>
|
||||
<h3>Options</h3>
|
||||
<pre>
|
||||
<script type="text/javascript">
|
||||
;( function( $ ) {
|
||||
|
||||
$( '.swipebox' ).swipebox( {
|
||||
useCSS : true, <span>// false will force the use of jQuery for animations</span>
|
||||
useSVG : true, <span>// false to force the use of png for buttons</span>
|
||||
initialIndexOnArray : 0, <span>// which image index to init when a array is passed</span>
|
||||
hideCloseButtonOnMobile : false, <span>// true will hide the close button on mobile devices</span>
|
||||
hideBarsDelay : 3000, <span>// delay before hiding bars on desktop</span>
|
||||
videoMaxWidth : 1140, <span>// videos max width</span>
|
||||
beforeOpen: function() {}, <span>// called before opening</span>
|
||||
afterOpen: null, <span>// called after opening</span>
|
||||
afterClose: function() {}, <span>// called after closing</span>
|
||||
loopAtEnd: false <span>// true will return to the first image after the last image is reached</span>
|
||||
} );
|
||||
|
||||
} )( jQuery );
|
||||
</script></pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="action" class="container text-center">
|
||||
<div class="wrap small-width">
|
||||
<div id="download"></div>
|
||||
<p><a class="button-big" href="https://github.com/brutaldesign/swipebox/archive/master.zip">Download</a> <a class="button-big" href="https://github.com/brutaldesign/swipebox">View Source</a></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="text-center">
|
||||
<div class="wrap small-width">
|
||||
<a href="http://csag.co" target="_blank">csag.co</a> | <a href="http://wpwlf.co" target="_blank">wpwlf.co</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="lib/ios-orientationchange-fix.js"></script>
|
||||
<script src="lib/jquery-2.1.0.min.js"></script>
|
||||
<script src="src/js/jquery.swipebox.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
|
||||
/* Basic Gallery */
|
||||
$( '.swipebox' ).swipebox();
|
||||
|
||||
/* Video */
|
||||
$( '.swipebox-video' ).swipebox();
|
||||
|
||||
/* Dynamic Gallery */
|
||||
$( '#gallery' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
$.swipebox( [
|
||||
{ href : 'http://swipebox.csag.co/mages/image-1.jpg', title : 'My Caption' },
|
||||
{ href : 'http://swipebox.csag.co/images/image-2.jpg', title : 'My Second Caption' }
|
||||
] );
|
||||
} );
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
56
dashboard-ui/bower_components/swipebox/lib/ios-orientationchange-fix.js
vendored
Normal file
56
dashboard-ui/bower_components/swipebox/lib/ios-orientationchange-fix.js
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*! A fix for the iOS orientationchange zoom bug.
|
||||
Script by @scottjehl, rebound by @wilto.
|
||||
MIT / GPLv2 License.
|
||||
*/
|
||||
(function(w){
|
||||
|
||||
// This fix addresses an iOS bug, so return early if the UA claims it's something else.
|
||||
var ua = navigator.userAgent;
|
||||
if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(ua) && ua.indexOf( "AppleWebKit" ) > -1 ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
var doc = w.document;
|
||||
|
||||
if( !doc.querySelector ){ return; }
|
||||
|
||||
var meta = doc.querySelector( "meta[name=viewport]" ),
|
||||
initialContent = meta && meta.getAttribute( "content" ),
|
||||
disabledZoom = initialContent + ",maximum-scale=1",
|
||||
enabledZoom = initialContent + ",maximum-scale=10",
|
||||
enabled = true,
|
||||
x, y, z, aig;
|
||||
|
||||
if( !meta ){ return; }
|
||||
|
||||
function restoreZoom(){
|
||||
meta.setAttribute( "content", enabledZoom );
|
||||
enabled = true;
|
||||
}
|
||||
|
||||
function disableZoom(){
|
||||
meta.setAttribute( "content", disabledZoom );
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
function checkTilt( e ){
|
||||
aig = e.accelerationIncludingGravity;
|
||||
x = Math.abs( aig.x );
|
||||
y = Math.abs( aig.y );
|
||||
z = Math.abs( aig.z );
|
||||
|
||||
// If portrait orientation and in one of the danger zones
|
||||
if( (!w.orientation || w.orientation === 180) && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
|
||||
if( enabled ){
|
||||
disableZoom();
|
||||
}
|
||||
}
|
||||
else if( !enabled ){
|
||||
restoreZoom();
|
||||
}
|
||||
}
|
||||
|
||||
w.addEventListener( "orientationchange", restoreZoom, false );
|
||||
w.addEventListener( "devicemotion", checkTilt, false );
|
||||
|
||||
})( this );
|
4
dashboard-ui/bower_components/swipebox/lib/jquery-2.1.0.min.js
vendored
Normal file
4
dashboard-ui/bower_components/swipebox/lib/jquery-2.1.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
308
dashboard-ui/bower_components/swipebox/scss/swipebox.scss
vendored
Normal file
308
dashboard-ui/bower_components/swipebox/scss/swipebox.scss
vendored
Normal file
|
@ -0,0 +1,308 @@
|
|||
/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
||||
|
||||
// Gradient mixin
|
||||
@mixin css-gradient($from: #dfdfdf, $to: #f8f8f8) {
|
||||
background-color: $from;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from($from), to($to));
|
||||
background-image: -webkit-linear-gradient(top, $from, $to);
|
||||
background-image: -moz-linear-gradient(top, $from, $to);
|
||||
background-image: -o-linear-gradient(top, $from, $to);
|
||||
background-image: linear-gradient(to bottom, $from, $to);
|
||||
}
|
||||
|
||||
// Bar mixin
|
||||
@mixin bar($color) {
|
||||
background-color:$color;
|
||||
@include css-gradient( $color, darken($color, 20%) );
|
||||
}
|
||||
|
||||
html.swipebox-html.swipebox-touch {
|
||||
overflow: hidden!important;
|
||||
}
|
||||
|
||||
#swipebox-overlay img {
|
||||
border: none!important;
|
||||
}
|
||||
|
||||
#swipebox-overlay {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99999!important;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#swipebox-container{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#swipebox-slider {
|
||||
transition : transform 0.4s ease;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
|
||||
.slide {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
line-height: 1px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 50%;
|
||||
width: 1px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
img,
|
||||
.swipebox-video-container,
|
||||
.swipebox-inline-container {
|
||||
display: inline-block;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.swipebox-video-container {
|
||||
background:none;
|
||||
max-width: 1140px;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
padding:5%;
|
||||
box-sizing: border-box;
|
||||
.swipebox-video{
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
iframe{
|
||||
width: 100%!important;
|
||||
height: 100%!important;
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slide-loading {
|
||||
background: url(../img/loader.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar,
|
||||
#swipebox-top-bar{
|
||||
transition : 0.5s;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar {
|
||||
bottom: -50px;
|
||||
|
||||
&.visible-bars {
|
||||
transform: translate3d(0,-50px,0);
|
||||
}
|
||||
}
|
||||
|
||||
#swipebox-top-bar {
|
||||
top: -50px;
|
||||
|
||||
&.visible-bars {
|
||||
transform: translate3d(0,50px,0);
|
||||
}
|
||||
}
|
||||
|
||||
#swipebox-title{
|
||||
display:block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#swipebox-prev,
|
||||
#swipebox-next,
|
||||
#swipebox-close {
|
||||
background-image: url(../img/icons.png);
|
||||
background-repeat: no-repeat;
|
||||
border: none!important;
|
||||
text-decoration: none!important;
|
||||
cursor: pointer;
|
||||
//position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#swipebox-arrows{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#swipebox-prev{
|
||||
background-position: -32px 13px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#swipebox-next{
|
||||
background-position: -78px 13px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#swipebox-close{
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
.swipebox-no-close-button #swipebox-close{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#swipebox-prev,
|
||||
#swipebox-next{
|
||||
&.disabled{
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.swipebox-no-touch{
|
||||
#swipebox-overlay.rightSpring #swipebox-slider {
|
||||
animation : rightSpring 0.3s;
|
||||
}
|
||||
|
||||
#swipebox-overlay.leftSpring #swipebox-slider{
|
||||
animation : leftSpring 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
.swipebox-touch{
|
||||
#swipebox-container {
|
||||
&:before,
|
||||
&:after{
|
||||
backface-visibility:hidden;
|
||||
transition : all .3s ease;
|
||||
content : ' ';
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:before{
|
||||
left: 0;
|
||||
box-shadow: inset 10px 0px 10px -8px #656565;
|
||||
}
|
||||
|
||||
&:after{
|
||||
right: 0;
|
||||
box-shadow: inset -10px 0px 10px -8px #656565;
|
||||
}
|
||||
}
|
||||
|
||||
#swipebox-overlay.leftSpringTouch #swipebox-container{
|
||||
&:before{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#swipebox-overlay.rightSpringTouch #swipebox-container{
|
||||
&:after{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rightSpring {
|
||||
0% {
|
||||
left:0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left:-30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left:0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes leftSpring {
|
||||
0% {
|
||||
left:0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left:30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left:0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 800px) {
|
||||
|
||||
#swipebox-close{
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#swipebox-arrows{
|
||||
width: 92%;
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Skin
|
||||
--------------------------*/
|
||||
#swipebox-overlay {
|
||||
background: #0d0d0d;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar,
|
||||
#swipebox-top-bar {
|
||||
text-shadow: 1px 1px 1px black;
|
||||
background: #000;
|
||||
//@include bar(#0d0d0d);
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar {
|
||||
//border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#swipebox-top-bar {
|
||||
//border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
color: white!important;
|
||||
font-size: 15px;
|
||||
line-height: 43px;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
295
dashboard-ui/bower_components/swipebox/src/css/swipebox.css
vendored
Normal file
295
dashboard-ui/bower_components/swipebox/src/css/swipebox.css
vendored
Normal file
|
@ -0,0 +1,295 @@
|
|||
/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
||||
html.swipebox-html.swipebox-touch {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
#swipebox-overlay img {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#swipebox-overlay {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99999 !important;
|
||||
overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#swipebox-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#swipebox-slider {
|
||||
-webkit-transition: -webkit-transform 0.4s ease;
|
||||
transition: transform 0.4s ease;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
#swipebox-slider .slide {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
line-height: 1px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
#swipebox-slider .slide:before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 50%;
|
||||
width: 1px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
#swipebox-slider .slide img,
|
||||
#swipebox-slider .slide .swipebox-video-container,
|
||||
#swipebox-slider .slide .swipebox-inline-container {
|
||||
display: inline-block;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#swipebox-slider .slide .swipebox-video-container {
|
||||
background: none;
|
||||
max-width: 1140px;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
padding: 5%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#swipebox-slider .slide .swipebox-video-container .swipebox-video {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#swipebox-slider .slide-loading {
|
||||
background: url(../img/loader.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar,
|
||||
#swipebox-top-bar {
|
||||
-webkit-transition: 0.5s;
|
||||
transition: 0.5s;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar {
|
||||
bottom: -50px;
|
||||
}
|
||||
#swipebox-bottom-bar.visible-bars {
|
||||
-webkit-transform: translate3d(0, -50px, 0);
|
||||
transform: translate3d(0, -50px, 0);
|
||||
}
|
||||
|
||||
#swipebox-top-bar {
|
||||
top: -50px;
|
||||
}
|
||||
#swipebox-top-bar.visible-bars {
|
||||
-webkit-transform: translate3d(0, 50px, 0);
|
||||
transform: translate3d(0, 50px, 0);
|
||||
}
|
||||
|
||||
#swipebox-title {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#swipebox-prev,
|
||||
#swipebox-next,
|
||||
#swipebox-close {
|
||||
background-image: url(../img/icons.png);
|
||||
background-repeat: no-repeat;
|
||||
border: none !important;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#swipebox-arrows {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#swipebox-prev {
|
||||
background-position: -32px 13px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#swipebox-next {
|
||||
background-position: -78px 13px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#swipebox-close {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
.swipebox-no-close-button #swipebox-close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#swipebox-prev.disabled,
|
||||
#swipebox-next.disabled {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider {
|
||||
-webkit-animation: rightSpring 0.3s;
|
||||
animation: rightSpring 0.3s;
|
||||
}
|
||||
.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider {
|
||||
-webkit-animation: leftSpring 0.3s;
|
||||
animation: leftSpring 0.3s;
|
||||
}
|
||||
|
||||
.swipebox-touch #swipebox-container:before, .swipebox-touch #swipebox-container:after {
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-transition: all .3s ease;
|
||||
transition: all .3s ease;
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
.swipebox-touch #swipebox-container:before {
|
||||
left: 0;
|
||||
-webkit-box-shadow: inset 10px 0px 10px -8px #656565;
|
||||
box-shadow: inset 10px 0px 10px -8px #656565;
|
||||
}
|
||||
.swipebox-touch #swipebox-container:after {
|
||||
right: 0;
|
||||
-webkit-box-shadow: inset -10px 0px 10px -8px #656565;
|
||||
box-shadow: inset -10px 0px 10px -8px #656565;
|
||||
}
|
||||
.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before {
|
||||
opacity: 1;
|
||||
}
|
||||
.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rightSpring {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rightSpring {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes leftSpring {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes leftSpring {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 800px) {
|
||||
#swipebox-close {
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#swipebox-arrows {
|
||||
width: 92%;
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
/* Skin
|
||||
--------------------------*/
|
||||
#swipebox-overlay {
|
||||
background: #0d0d0d;
|
||||
}
|
||||
|
||||
#swipebox-bottom-bar,
|
||||
#swipebox-top-bar {
|
||||
text-shadow: 1px 1px 1px black;
|
||||
background: #000;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
#swipebox-top-bar {
|
||||
color: white !important;
|
||||
font-size: 15px;
|
||||
line-height: 43px;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
1
dashboard-ui/bower_components/swipebox/src/css/swipebox.min.css
vendored
Normal file
1
dashboard-ui/bower_components/swipebox/src/css/swipebox.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */html.swipebox-html.swipebox-touch{overflow:hidden!important}#swipebox-overlay img{border:none!important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999!important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform .4s ease;transition:transform .4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide .swipebox-inline-container,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide img{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}#swipebox-slider .slide .swipebox-video-container{background:0 0;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100%!important;height:100%!important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(../img/loader.gif) center center no-repeat}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:.5s;transition:.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}#swipebox-close,#swipebox-next,#swipebox-prev{background-image:url(../img/icons.png);background-repeat:no-repeat;border:none!important;text-decoration:none!important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-next.disabled,#swipebox-prev.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring .3s;animation:rightSpring .3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring .3s;animation:leftSpring .3s}.swipebox-touch #swipebox-container:after,.swipebox-touch #swipebox-container:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}.swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0 10px -8px #656565;box-shadow:inset 10px 0 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0 10px -8px #656565;box-shadow:inset -10px 0 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before,.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px #000;background:#000;opacity:.95}#swipebox-top-bar{color:#fff!important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}
|
BIN
dashboard-ui/bower_components/swipebox/src/img/icons.png
vendored
Normal file
BIN
dashboard-ui/bower_components/swipebox/src/img/icons.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 729 B |
1
dashboard-ui/bower_components/swipebox/src/img/icons.svg
vendored
Normal file
1
dashboard-ui/bower_components/swipebox/src/img/icons.svg
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: IcoMoon.io --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="120" height="24" viewBox="0 0 120 24" fill="#ffffff" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M 17.384,17.705q0.00,0.536 -0.375,0.911l-1.821,1.821q-0.375,0.375 -0.911,0.375t-0.911-0.375l-3.938-3.938l-3.938,3.938q-0.375,0.375 -0.911,0.375t-0.911-0.375l-1.821-1.821q-0.375-0.375 -0.375-0.911t 0.375-0.911l 3.938-3.938l-3.938-3.938q-0.375-0.375 -0.375-0.911t 0.375-0.911l 1.821-1.821q 0.375-0.375 0.911-0.375t 0.911,0.375l 3.938,3.938l 3.938-3.938q 0.375-0.375 0.911-0.375t 0.911,0.375l 1.821,1.821q 0.375,0.375 0.375,0.911 t-0.375,0.911l-3.938,3.938l 3.938,3.938q 0.375,0.375 0.375,0.911zM 57.938,21.067l-8.732-8.719q-0.496-0.496 -0.496-1.212t 0.496-1.212l 8.732-8.719q 0.496-0.496 1.212-0.496t 1.212,0.496l 1.004,1.004q 0.496,0.496 0.496,1.212t-0.496,1.212l-6.509,6.509l 6.509,6.496q 0.496,0.509 0.496,1.219t-0.496,1.205l-1.004,1.004q-0.496,0.496 -1.212,0.496t-1.212-0.496zM 110.719,11.143q0.00,0.696 -0.496,1.219l-8.732,8.719q-0.496,0.496 -1.205,0.496t-1.205-0.496l-1.018-1.004q-0.496-0.522 -0.496-1.219q0.00-0.71 0.496-1.205l 6.509-6.509l-6.509-6.496q-0.496-0.522 -0.496-1.219q0.00-0.71 0.496-1.205l 1.018-1.004q 0.482-0.509 1.205-0.509t 1.205,0.509l 8.732,8.719q 0.496,0.496 0.496,1.205z"></path></svg>
|
After Width: | Height: | Size: 1.4 KiB |
BIN
dashboard-ui/bower_components/swipebox/src/img/loader.gif
vendored
Normal file
BIN
dashboard-ui/bower_components/swipebox/src/img/loader.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
950
dashboard-ui/bower_components/swipebox/src/js/jquery.swipebox.js
vendored
Normal file
950
dashboard-ui/bower_components/swipebox/src/js/jquery.swipebox.js
vendored
Normal file
|
@ -0,0 +1,950 @@
|
|||
/*! Swipebox v1.4.1 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
||||
|
||||
;( function ( window, document, $, undefined ) {
|
||||
|
||||
$.swipebox = function( elem, options ) {
|
||||
|
||||
// Default options
|
||||
var ui,
|
||||
defaults = {
|
||||
useCSS : true,
|
||||
useSVG : true,
|
||||
initialIndexOnArray : 0,
|
||||
removeBarsOnMobile : true,
|
||||
hideCloseButtonOnMobile : false,
|
||||
hideBarsDelay : 3000,
|
||||
videoMaxWidth : 1140,
|
||||
vimeoColor : 'cccccc',
|
||||
beforeOpen: null,
|
||||
afterOpen: null,
|
||||
afterClose: null,
|
||||
nextSlide: null,
|
||||
prevSlide: null,
|
||||
loopAtEnd: false,
|
||||
autoplayVideos: false,
|
||||
queryStringData: {},
|
||||
toggleClassOnLoad: ''
|
||||
},
|
||||
|
||||
plugin = this,
|
||||
elements = [], // slides array [ { href:'...', title:'...' }, ...],
|
||||
$elem,
|
||||
selector = elem.selector,
|
||||
$selector = $( selector ),
|
||||
isMobile = navigator.userAgent.match( /(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i ),
|
||||
isTouch = isMobile !== null || document.createTouch !== undefined || ( 'ontouchstart' in window ) || ( 'onmsgesturechange' in window ) || navigator.msMaxTouchPoints,
|
||||
supportSVG = !! document.createElementNS && !! document.createElementNS( 'http://www.w3.org/2000/svg', 'svg').createSVGRect,
|
||||
winWidth = window.innerWidth ? window.innerWidth : $( window ).width(),
|
||||
winHeight = window.innerHeight ? window.innerHeight : $( window ).height(),
|
||||
currentX = 0,
|
||||
/* jshint multistr: true */
|
||||
html = '<div id="swipebox-overlay">\
|
||||
<div id="swipebox-container">\
|
||||
<div id="swipebox-slider"></div>\
|
||||
<div id="swipebox-top-bar">\
|
||||
<div id="swipebox-title"></div>\
|
||||
</div>\
|
||||
<div id="swipebox-bottom-bar">\
|
||||
<div id="swipebox-arrows">\
|
||||
<a id="swipebox-prev"></a>\
|
||||
<a id="swipebox-next"></a>\
|
||||
</div>\
|
||||
</div>\
|
||||
<a id="swipebox-close"></a>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
plugin.settings = {};
|
||||
|
||||
$.swipebox.close = function () {
|
||||
ui.closeSlide();
|
||||
};
|
||||
|
||||
$.swipebox.extend = function () {
|
||||
return ui;
|
||||
};
|
||||
|
||||
plugin.init = function() {
|
||||
|
||||
plugin.settings = $.extend( {}, defaults, options );
|
||||
|
||||
if ( $.isArray( elem ) ) {
|
||||
|
||||
elements = elem;
|
||||
ui.target = $( window );
|
||||
ui.init( plugin.settings.initialIndexOnArray );
|
||||
|
||||
} else {
|
||||
|
||||
$( document ).on( 'click', selector, function( event ) {
|
||||
|
||||
// console.log( isTouch );
|
||||
|
||||
if ( event.target.parentNode.className === 'slide current' ) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $.isArray( elem ) ) {
|
||||
ui.destroy();
|
||||
$elem = $( selector );
|
||||
ui.actions();
|
||||
}
|
||||
|
||||
elements = [];
|
||||
var index , relType, relVal;
|
||||
|
||||
// Allow for HTML5 compliant attribute before legacy use of rel
|
||||
if ( ! relVal ) {
|
||||
relType = 'data-rel';
|
||||
relVal = $( this ).attr( relType );
|
||||
}
|
||||
|
||||
if ( ! relVal ) {
|
||||
relType = 'rel';
|
||||
relVal = $( this ).attr( relType );
|
||||
}
|
||||
|
||||
if ( relVal && relVal !== '' && relVal !== 'nofollow' ) {
|
||||
$elem = $selector.filter( '[' + relType + '="' + relVal + '"]' );
|
||||
} else {
|
||||
$elem = $( selector );
|
||||
}
|
||||
|
||||
$elem.each( function() {
|
||||
|
||||
var title = null,
|
||||
href = null;
|
||||
|
||||
if ( $( this ).attr( 'title' ) ) {
|
||||
title = $( this ).attr( 'title' );
|
||||
}
|
||||
|
||||
|
||||
if ( $( this ).attr( 'href' ) ) {
|
||||
href = $( this ).attr( 'href' );
|
||||
}
|
||||
|
||||
elements.push( {
|
||||
href: href,
|
||||
title: title
|
||||
} );
|
||||
} );
|
||||
|
||||
index = $elem.index( $( this ) );
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
ui.target = $( event.target );
|
||||
ui.init( index );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
ui = {
|
||||
|
||||
/**
|
||||
* Initiate Swipebox
|
||||
*/
|
||||
init : function( index ) {
|
||||
if ( plugin.settings.beforeOpen ) {
|
||||
plugin.settings.beforeOpen();
|
||||
}
|
||||
this.target.trigger( 'swipebox-start' );
|
||||
$.swipebox.isOpen = true;
|
||||
this.build();
|
||||
this.openSlide( index );
|
||||
this.openMedia( index );
|
||||
this.preloadMedia( index+1 );
|
||||
this.preloadMedia( index-1 );
|
||||
if ( plugin.settings.afterOpen ) {
|
||||
plugin.settings.afterOpen();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Built HTML containers and fire main functions
|
||||
*/
|
||||
build : function () {
|
||||
var $this = this, bg;
|
||||
|
||||
$( 'body' ).append( html );
|
||||
|
||||
if ( supportSVG && plugin.settings.useSVG === true ) {
|
||||
bg = $( '#swipebox-close' ).css( 'background-image' );
|
||||
bg = bg.replace( 'png', 'svg' );
|
||||
$( '#swipebox-prev, #swipebox-next, #swipebox-close' ).css( {
|
||||
'background-image' : bg
|
||||
} );
|
||||
}
|
||||
|
||||
if ( isMobile && plugin.settings.removeBarsOnMobile ) {
|
||||
$( '#swipebox-bottom-bar, #swipebox-top-bar' ).remove();
|
||||
}
|
||||
|
||||
$.each( elements, function() {
|
||||
$( '#swipebox-slider' ).append( '<div class="slide"></div>' );
|
||||
} );
|
||||
|
||||
$this.setDim();
|
||||
$this.actions();
|
||||
|
||||
if ( isTouch ) {
|
||||
$this.gesture();
|
||||
}
|
||||
|
||||
// Devices can have both touch and keyboard input so always allow key events
|
||||
$this.keyboard();
|
||||
|
||||
$this.animBars();
|
||||
$this.resize();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Set dimensions depending on windows width and height
|
||||
*/
|
||||
setDim : function () {
|
||||
|
||||
var width, height, sliderCss = {};
|
||||
|
||||
// Reset dimensions on mobile orientation change
|
||||
if ( 'onorientationchange' in window ) {
|
||||
|
||||
window.addEventListener( 'orientationchange', function() {
|
||||
if ( window.orientation === 0 ) {
|
||||
width = winWidth;
|
||||
height = winHeight;
|
||||
} else if ( window.orientation === 90 || window.orientation === -90 ) {
|
||||
width = winHeight;
|
||||
height = winWidth;
|
||||
}
|
||||
}, false );
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
width = window.innerWidth ? window.innerWidth : $( window ).width();
|
||||
height = window.innerHeight ? window.innerHeight : $( window ).height();
|
||||
}
|
||||
|
||||
sliderCss = {
|
||||
width : width,
|
||||
height : height
|
||||
};
|
||||
|
||||
$( '#swipebox-overlay' ).css( sliderCss );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Reset dimensions on window resize envent
|
||||
*/
|
||||
resize : function () {
|
||||
var $this = this;
|
||||
|
||||
$( window ).resize( function() {
|
||||
$this.setDim();
|
||||
} ).resize();
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if device supports CSS transitions
|
||||
*/
|
||||
supportTransition : function () {
|
||||
|
||||
var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split( ' ' ),
|
||||
i;
|
||||
|
||||
for ( i = 0; i < prefixes.length; i++ ) {
|
||||
if ( document.createElement( 'div' ).style[ prefixes[i] ] !== undefined ) {
|
||||
return prefixes[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if CSS transitions are allowed (options + devicesupport)
|
||||
*/
|
||||
doCssTrans : function () {
|
||||
if ( plugin.settings.useCSS && this.supportTransition() ) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Touch navigation
|
||||
*/
|
||||
gesture : function () {
|
||||
|
||||
var $this = this,
|
||||
index,
|
||||
hDistance,
|
||||
vDistance,
|
||||
hDistanceLast,
|
||||
vDistanceLast,
|
||||
hDistancePercent,
|
||||
vSwipe = false,
|
||||
hSwipe = false,
|
||||
hSwipMinDistance = 10,
|
||||
vSwipMinDistance = 50,
|
||||
startCoords = {},
|
||||
endCoords = {},
|
||||
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' ),
|
||||
slider = $( '#swipebox-slider' );
|
||||
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
|
||||
$( 'body' ).bind( 'touchstart', function( event ) {
|
||||
|
||||
$( this ).addClass( 'touching' );
|
||||
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
||||
endCoords = event.originalEvent.targetTouches[0];
|
||||
startCoords.pageX = event.originalEvent.targetTouches[0].pageX;
|
||||
startCoords.pageY = event.originalEvent.targetTouches[0].pageY;
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + currentX +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
||||
} );
|
||||
|
||||
$( '.touching' ).bind( 'touchmove',function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
endCoords = event.originalEvent.targetTouches[0];
|
||||
|
||||
if ( ! hSwipe ) {
|
||||
vDistanceLast = vDistance;
|
||||
vDistance = endCoords.pageY - startCoords.pageY;
|
||||
if ( Math.abs( vDistance ) >= vSwipMinDistance || vSwipe ) {
|
||||
var opacity = 0.75 - Math.abs(vDistance) / slider.height();
|
||||
|
||||
slider.css( { 'top': vDistance + 'px' } );
|
||||
slider.css( { 'opacity': opacity } );
|
||||
|
||||
vSwipe = true;
|
||||
}
|
||||
}
|
||||
|
||||
hDistanceLast = hDistance;
|
||||
hDistance = endCoords.pageX - startCoords.pageX;
|
||||
hDistancePercent = hDistance * 100 / winWidth;
|
||||
|
||||
if ( ! hSwipe && ! vSwipe && Math.abs( hDistance ) >= hSwipMinDistance ) {
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transition' : '',
|
||||
'transition' : ''
|
||||
} );
|
||||
hSwipe = true;
|
||||
}
|
||||
|
||||
if ( hSwipe ) {
|
||||
|
||||
// swipe left
|
||||
if ( 0 < hDistance ) {
|
||||
|
||||
// first slide
|
||||
if ( 0 === index ) {
|
||||
// console.log( 'first' );
|
||||
$( '#swipebox-overlay' ).addClass( 'leftSpringTouch' );
|
||||
} else {
|
||||
// Follow gesture
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
||||
} );
|
||||
}
|
||||
|
||||
// swipe rught
|
||||
} else if ( 0 > hDistance ) {
|
||||
|
||||
// last Slide
|
||||
if ( elements.length === index +1 ) {
|
||||
// console.log( 'last' );
|
||||
$( '#swipebox-overlay' ).addClass( 'rightSpringTouch' );
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
return false;
|
||||
|
||||
} ).bind( 'touchend',function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transition' : '-webkit-transform 0.4s ease',
|
||||
'transition' : 'transform 0.4s ease'
|
||||
} );
|
||||
|
||||
vDistance = endCoords.pageY - startCoords.pageY;
|
||||
hDistance = endCoords.pageX - startCoords.pageX;
|
||||
hDistancePercent = hDistance*100/winWidth;
|
||||
|
||||
// Swipe to bottom to close
|
||||
if ( vSwipe ) {
|
||||
vSwipe = false;
|
||||
if ( Math.abs( vDistance ) >= 2 * vSwipMinDistance && Math.abs( vDistance ) > Math.abs( vDistanceLast ) ) {
|
||||
var vOffset = vDistance > 0 ? slider.height() : - slider.height();
|
||||
slider.animate( { top: vOffset + 'px', 'opacity': 0 },
|
||||
300,
|
||||
function () {
|
||||
$this.closeSlide();
|
||||
} );
|
||||
} else {
|
||||
slider.animate( { top: 0, 'opacity': 1 }, 300 );
|
||||
}
|
||||
|
||||
} else if ( hSwipe ) {
|
||||
|
||||
hSwipe = false;
|
||||
|
||||
// swipeLeft
|
||||
if( hDistance >= hSwipMinDistance && hDistance >= hDistanceLast) {
|
||||
|
||||
$this.getPrev();
|
||||
|
||||
// swipeRight
|
||||
} else if ( hDistance <= -hSwipMinDistance && hDistance <= hDistanceLast) {
|
||||
|
||||
$this.getNext();
|
||||
}
|
||||
|
||||
} else { // Top and bottom bars have been removed on touchable devices
|
||||
// tap
|
||||
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
||||
$this.showBars();
|
||||
$this.setTimeout();
|
||||
} else {
|
||||
$this.clearTimeout();
|
||||
$this.hideBars();
|
||||
}
|
||||
}
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + currentX + '%, 0, 0)',
|
||||
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
||||
} );
|
||||
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '.touching' ).off( 'touchmove' ).removeClass( 'touching' );
|
||||
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set timer to hide the action bars
|
||||
*/
|
||||
setTimeout: function () {
|
||||
if ( plugin.settings.hideBarsDelay > 0 ) {
|
||||
var $this = this;
|
||||
$this.clearTimeout();
|
||||
$this.timeout = window.setTimeout( function() {
|
||||
$this.hideBars();
|
||||
},
|
||||
|
||||
plugin.settings.hideBarsDelay
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear timer
|
||||
*/
|
||||
clearTimeout: function () {
|
||||
window.clearTimeout( this.timeout );
|
||||
this.timeout = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Show navigation and title bars
|
||||
*/
|
||||
showBars : function () {
|
||||
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
if ( this.doCssTrans() ) {
|
||||
bars.addClass( 'visible-bars' );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).animate( { top : 0 }, 500 );
|
||||
$( '#swipebox-bottom-bar' ).animate( { bottom : 0 }, 500 );
|
||||
setTimeout( function() {
|
||||
bars.addClass( 'visible-bars' );
|
||||
}, 1000 );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide navigation and title bars
|
||||
*/
|
||||
hideBars : function () {
|
||||
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
if ( this.doCssTrans() ) {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).animate( { top : '-50px' }, 500 );
|
||||
$( '#swipebox-bottom-bar' ).animate( { bottom : '-50px' }, 500 );
|
||||
setTimeout( function() {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
}, 1000 );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Animate navigation and top bars
|
||||
*/
|
||||
animBars : function () {
|
||||
var $this = this,
|
||||
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
|
||||
$( '#swipebox-slider' ).click( function() {
|
||||
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
||||
$this.showBars();
|
||||
$this.setTimeout();
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#swipebox-bottom-bar' ).hover( function() {
|
||||
$this.showBars();
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.clearTimeout();
|
||||
|
||||
}, function() {
|
||||
if ( plugin.settings.hideBarsDelay > 0 ) {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
}
|
||||
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Keyboard navigation
|
||||
*/
|
||||
keyboard : function () {
|
||||
var $this = this;
|
||||
$( window ).bind( 'keyup', function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if ( event.keyCode === 37 ) {
|
||||
|
||||
$this.getPrev();
|
||||
|
||||
} else if ( event.keyCode === 39 ) {
|
||||
|
||||
$this.getNext();
|
||||
|
||||
} else if ( event.keyCode === 27 ) {
|
||||
|
||||
$this.closeSlide();
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Navigation events : go to next slide, go to prevous slide and close
|
||||
*/
|
||||
actions : function () {
|
||||
var $this = this,
|
||||
action = 'touchend click'; // Just detect for both event types to allow for multi-input
|
||||
|
||||
if ( elements.length < 2 ) {
|
||||
|
||||
$( '#swipebox-bottom-bar' ).hide();
|
||||
|
||||
if ( undefined === elements[ 1 ] ) {
|
||||
$( '#swipebox-top-bar' ).hide();
|
||||
}
|
||||
|
||||
} else {
|
||||
$( '#swipebox-prev' ).bind( action, function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$this.getPrev();
|
||||
$this.setTimeout();
|
||||
} );
|
||||
|
||||
$( '#swipebox-next' ).bind( action, function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$this.getNext();
|
||||
$this.setTimeout();
|
||||
} );
|
||||
}
|
||||
|
||||
$( '#swipebox-close' ).bind( action, function() {
|
||||
$this.closeSlide();
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set current slide
|
||||
*/
|
||||
setSlide : function ( index, isFirst ) {
|
||||
|
||||
isFirst = isFirst || false;
|
||||
|
||||
var slider = $( '#swipebox-slider' );
|
||||
|
||||
currentX = -index*100;
|
||||
|
||||
if ( this.doCssTrans() ) {
|
||||
slider.css( {
|
||||
'-webkit-transform' : 'translate3d(' + (-index*100)+'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + (-index*100)+'%, 0, 0)'
|
||||
} );
|
||||
} else {
|
||||
slider.animate( { left : ( -index*100 )+'%' } );
|
||||
}
|
||||
|
||||
$( '#swipebox-slider .slide' ).removeClass( 'current' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).addClass( 'current' );
|
||||
this.setTitle( index );
|
||||
|
||||
if ( isFirst ) {
|
||||
slider.fadeIn();
|
||||
}
|
||||
|
||||
$( '#swipebox-prev, #swipebox-next' ).removeClass( 'disabled' );
|
||||
|
||||
if ( index === 0 ) {
|
||||
$( '#swipebox-prev' ).addClass( 'disabled' );
|
||||
} else if ( index === elements.length - 1 && plugin.settings.loopAtEnd !== true ) {
|
||||
$( '#swipebox-next' ).addClass( 'disabled' );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Open slide
|
||||
*/
|
||||
openSlide : function ( index ) {
|
||||
$( 'html' ).addClass( 'swipebox-html' );
|
||||
if ( isTouch ) {
|
||||
$( 'html' ).addClass( 'swipebox-touch' );
|
||||
|
||||
if ( plugin.settings.hideCloseButtonOnMobile ) {
|
||||
$( 'html' ).addClass( 'swipebox-no-close-button' );
|
||||
}
|
||||
} else {
|
||||
$( 'html' ).addClass( 'swipebox-no-touch' );
|
||||
}
|
||||
$( window ).trigger( 'resize' ); // fix scroll bar visibility on desktop
|
||||
this.setSlide( index, true );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set a time out if the media is a video
|
||||
*/
|
||||
preloadMedia : function ( index ) {
|
||||
var $this = this,
|
||||
src = null;
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
src = elements[ index ].href;
|
||||
}
|
||||
|
||||
if ( ! $this.isVideo( src ) ) {
|
||||
setTimeout( function() {
|
||||
$this.openMedia( index );
|
||||
}, 1000);
|
||||
} else {
|
||||
$this.openMedia( index );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Open
|
||||
*/
|
||||
openMedia : function ( index ) {
|
||||
var $this = this,
|
||||
src,
|
||||
slide;
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
src = elements[ index ].href;
|
||||
}
|
||||
|
||||
if ( index < 0 || index >= elements.length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
slide = $( '#swipebox-slider .slide' ).eq( index );
|
||||
|
||||
if ( ! $this.isVideo( src ) ) {
|
||||
slide.addClass( 'slide-loading' );
|
||||
$this.loadMedia( src, function() {
|
||||
slide.removeClass( 'slide-loading' );
|
||||
slide.html( this );
|
||||
} );
|
||||
} else {
|
||||
slide.html( $this.getVideo( src ) );
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Set link title attribute as caption
|
||||
*/
|
||||
setTitle : function ( index ) {
|
||||
var title = null;
|
||||
|
||||
$( '#swipebox-title' ).empty();
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
title = elements[ index ].title;
|
||||
}
|
||||
|
||||
if ( title ) {
|
||||
$( '#swipebox-top-bar' ).show();
|
||||
$( '#swipebox-title' ).append( title );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if the URL is a video
|
||||
*/
|
||||
isVideo : function ( src ) {
|
||||
|
||||
if ( src ) {
|
||||
if ( src.match( /(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || src.match( /vimeo\.com\/([0-9]*)/ ) || src.match( /youtu\.be\/([a-zA-Z0-9\-_]+)/ ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( src.toLowerCase().indexOf( 'swipeboxvideo=1' ) >= 0 ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse URI querystring and:
|
||||
* - overrides value provided via dictionary
|
||||
* - rebuild it again returning a string
|
||||
*/
|
||||
parseUri : function (uri, customData) {
|
||||
var a = document.createElement('a'),
|
||||
qs = {};
|
||||
|
||||
// Decode the URI
|
||||
a.href = decodeURIComponent( uri );
|
||||
|
||||
// QueryString to Object
|
||||
if ( a.search ) {
|
||||
qs = JSON.parse( '{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}' );
|
||||
}
|
||||
|
||||
// Extend with custom data
|
||||
if ( $.isPlainObject( customData ) ) {
|
||||
qs = $.extend( qs, customData, plugin.settings.queryStringData ); // The dev has always the final word
|
||||
}
|
||||
|
||||
// Return querystring as a string
|
||||
return $
|
||||
.map( qs, function (val, key) {
|
||||
if ( val && val > '' ) {
|
||||
return encodeURIComponent( key ) + '=' + encodeURIComponent( val );
|
||||
}
|
||||
})
|
||||
.join('&');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get video iframe code from URL
|
||||
*/
|
||||
getVideo : function( url ) {
|
||||
var iframe = '',
|
||||
youtubeUrl = url.match( /((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/ ),
|
||||
youtubeShortUrl = url.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),
|
||||
vimeoUrl = url.match( /(?:www\.)?vimeo\.com\/([0-9]*)/ ),
|
||||
qs = '';
|
||||
if ( youtubeUrl || youtubeShortUrl) {
|
||||
if ( youtubeShortUrl ) {
|
||||
youtubeUrl = youtubeShortUrl;
|
||||
}
|
||||
qs = ui.parseUri( url, {
|
||||
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
||||
'v' : ''
|
||||
});
|
||||
iframe = '<iframe width="560" height="315" src="//' + youtubeUrl[1] + '/embed/' + youtubeUrl[2] + '?' + qs + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if ( vimeoUrl ) {
|
||||
qs = ui.parseUri( url, {
|
||||
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
||||
'byline' : '0',
|
||||
'portrait' : '0',
|
||||
'color': plugin.settings.vimeoColor
|
||||
});
|
||||
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?' + qs + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else {
|
||||
iframe = '<iframe width="560" height="315" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
|
||||
}
|
||||
|
||||
return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videoMaxWidth + 'px"><div class="swipebox-video">' + iframe + '</div></div>';
|
||||
},
|
||||
|
||||
/**
|
||||
* Load image
|
||||
*/
|
||||
loadMedia : function ( src, callback ) {
|
||||
// Inline content
|
||||
if ( src.trim().indexOf('#') === 0 ) {
|
||||
callback.call(
|
||||
$('<div>', {
|
||||
'class' : 'swipebox-inline-container'
|
||||
})
|
||||
.append(
|
||||
$(src)
|
||||
.clone()
|
||||
.toggleClass( plugin.settings.toggleClassOnLoad )
|
||||
)
|
||||
);
|
||||
}
|
||||
// Everything else
|
||||
else {
|
||||
if ( ! this.isVideo( src ) ) {
|
||||
var img = $( '<img>' ).on( 'load', function() {
|
||||
callback.call( img );
|
||||
} );
|
||||
|
||||
img.attr( 'src', src );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get next slide
|
||||
*/
|
||||
getNext : function () {
|
||||
var $this = this,
|
||||
src,
|
||||
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
||||
if ( index + 1 < elements.length ) {
|
||||
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index++;
|
||||
$this.setSlide( index );
|
||||
$this.preloadMedia( index+1 );
|
||||
if ( plugin.settings.nextSlide ) {
|
||||
plugin.settings.nextSlide();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( plugin.settings.loopAtEnd === true ) {
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index = 0;
|
||||
$this.preloadMedia( index );
|
||||
$this.setSlide( index );
|
||||
$this.preloadMedia( index + 1 );
|
||||
if ( plugin.settings.nextSlide ) {
|
||||
plugin.settings.nextSlide();
|
||||
}
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).addClass( 'rightSpring' );
|
||||
setTimeout( function() {
|
||||
$( '#swipebox-overlay' ).removeClass( 'rightSpring' );
|
||||
}, 500 );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get previous slide
|
||||
*/
|
||||
getPrev : function () {
|
||||
var index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) ),
|
||||
src;
|
||||
if ( index > 0 ) {
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe').attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index--;
|
||||
this.setSlide( index );
|
||||
this.preloadMedia( index-1 );
|
||||
if ( plugin.settings.prevSlide ) {
|
||||
plugin.settings.prevSlide();
|
||||
}
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).addClass( 'leftSpring' );
|
||||
setTimeout( function() {
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpring' );
|
||||
}, 500 );
|
||||
}
|
||||
},
|
||||
|
||||
nextSlide : function () {
|
||||
// Callback for next slide
|
||||
},
|
||||
|
||||
prevSlide : function () {
|
||||
// Callback for prev slide
|
||||
},
|
||||
|
||||
/**
|
||||
* Close
|
||||
*/
|
||||
closeSlide : function () {
|
||||
$( 'html' ).removeClass( 'swipebox-html' );
|
||||
$( 'html' ).removeClass( 'swipebox-touch' );
|
||||
$( window ).trigger( 'resize' );
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy the whole thing
|
||||
*/
|
||||
destroy : function () {
|
||||
$( window ).unbind( 'keyup' );
|
||||
$( 'body' ).unbind( 'touchstart' );
|
||||
$( 'body' ).unbind( 'touchmove' );
|
||||
$( 'body' ).unbind( 'touchend' );
|
||||
$( '#swipebox-slider' ).unbind();
|
||||
$( '#swipebox-overlay' ).remove();
|
||||
|
||||
if ( ! $.isArray( elem ) ) {
|
||||
elem.removeData( '_swipebox' );
|
||||
}
|
||||
|
||||
if ( this.target ) {
|
||||
this.target.trigger( 'swipebox-destroy' );
|
||||
}
|
||||
|
||||
$.swipebox.isOpen = false;
|
||||
|
||||
if ( plugin.settings.afterClose ) {
|
||||
plugin.settings.afterClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
plugin.init();
|
||||
};
|
||||
|
||||
$.fn.swipebox = function( options ) {
|
||||
|
||||
if ( ! $.data( this, '_swipebox' ) ) {
|
||||
var swipebox = new $.swipebox( this, options );
|
||||
this.data( '_swipebox', swipebox );
|
||||
}
|
||||
return this.data( '_swipebox' );
|
||||
|
||||
};
|
||||
|
||||
}( window, document, jQuery ) );
|
2
dashboard-ui/bower_components/swipebox/src/js/jquery.swipebox.min.js
vendored
Normal file
2
dashboard-ui/bower_components/swipebox/src/js/jquery.swipebox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue