1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 14:25:02 -05:00

Upgrade Galleria and always show videos in a new browser window

This commit is contained in:
Reinhard Pointner 2018-06-17 18:36:00 +07:00
parent d03453450b
commit 76b9a61b60
11 changed files with 28 additions and 499 deletions

View File

@ -1,10 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="galleria/galleria-1.4.2.min.js"></script>
<script src="galleria/themes/classic/galleria.classic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/galleria.min.js" integrity="sha384-nUTmcZGvHkqUWk8Vex26NS0QsXEK8QAPLIZ22xLiy7OLCHX1QUbIqptlSLnH+aOg" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/themes/classic/galleria.classic.min.js" integrity="sha384-2b7KAxHmRxLZu0x5c6OMtaUOSns5VJ666Fe4F7u9OjRdY6SSEvFLVDxIV+u+/hYp" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/themes/classic/galleria.classic.min.css" integrity="sha384-C9txWX+EICTgr4AN/wWQhKhdd/BsXl1lVS/E+daOWUZn6Mjm5oHGeEEU0jxP55oV" crossorigin="anonymous">
<script src="index.js"></script>
<link rel="stylesheet" href="galleria/themes/classic/galleria.classic.css">
<link rel="stylesheet" href="index.css">
<title>Getting Started</title>
</head>

View File

@ -1,21 +0,0 @@
The MIT License
Copyright (c) 2013 Aino http://aino.se
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

File diff suppressed because one or more lines are too long

View File

@ -1,124 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Galleria Classic Theme</title>
<style>
/* Demo styles */
html,body{background:#222;margin:0;}
body{border-top:4px solid #000;}
.content{color:#777;font:12px/1.4 "helvetica neue",arial,sans-serif;width:620px;margin:20px auto;}
h1{font-size:12px;font-weight:normal;color:#ddd;margin:0;}
p{margin:0 0 20px}
a {color:#22BCB9;text-decoration:none;}
.cred{margin-top:20px;font-size:11px;}
/* This rule is read by Galleria to define the gallery height: */
#galleria{height:320px}
</style>
<!-- load jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.4.2.min.js"></script>
</head>
<body>
<div class="content">
<h1>Galleria Classic Theme</h1>
<p>Demonstrating a basic gallery example.</p>
<!-- Adding gallery images. We use resized thumbnails here for better performance, but its not necessary -->
<div id="galleria">
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/800px-Biandintz_eta_zaldiak_-_modified2.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/100px-Biandintz_eta_zaldiak_-_modified2.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/1280px-Biandintz_eta_zaldiak_-_modified2.jpg"
data-title="Biandintz eta zaldiak"
data-description="Horses on Bianditz mountain, in Navarre, Spain."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/800px-Athabasca_Rail_at_Brule_Lake.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/100px-Athabasca_Rail_at_Brule_Lake.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/1280px-Athabasca_Rail_at_Brule_Lake.jpg"
data-title="Athabasca Rail"
data-description="The Athabasca River railroad track at the mouth of Brulé Lake in Alberta, Canada."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/1280px-Back-scattering_crepuscular_rays_panorama_1.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/100px-Back-scattering_crepuscular_rays_panorama_1.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/1400px-Back-scattering_crepuscular_rays_panorama_1.jpg"
data-title="Back-scattering crepuscular rays"
data-description="Picture of the day on Wikimedia Commons 26 September 2010."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/800px-Interior_convento_3.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/120px-Interior_convento_3.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/1400px-Interior_convento_3.jpg"
data-title="Interior convento"
data-description="Interior view of Yuriria Convent, founded in 1550."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/800px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/100px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/1280px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg"
data-title="Oxbow Bend outlook"
data-description="View over the Snake River to the Mount Moran with the Skillet Glacier."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/800px-Hazy_blue_hour_in_Grand_Canyon.JPG">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/100px-Hazy_blue_hour_in_Grand_Canyon.JPG",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/1280px-Hazy_blue_hour_in_Grand_Canyon.JPG"
data-title="Hazy blue hour"
data-description="Hazy blue hour in Grand Canyon. View from the South Rim."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/800px-2909_vallon_moy_res.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/100px-2909_vallon_moy_res.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/1280px-2909_vallon_moy_res.jpg"
data-title="Haute Severaisse valley"
data-description="View of Haute Severaisse valley and surrounding summits from the slopes of Les Vernets."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/800px-Bohinjsko_jezero_2.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/100px-Bohinjsko_jezero_2.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/1280px-Bohinjsko_jezero_2.jpg"
data-title="Bohinj lake"
data-description="Bohinj lake (Triglav National Park, Slovenia) in the morning."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/800px-Bowling_Balls_Beach_2_edit.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/100px-Bowling_Balls_Beach_2_edit.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/1280px-Bowling_Balls_Beach_2_edit.jpg"
data-title="Bowling Balls"
data-description="Mendocino county, California, USA."
>
</a>
</div>
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
</div>
<script>
// Load the classic theme
Galleria.loadTheme('galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#galleria');
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,219 +0,0 @@
/* Galleria Classic Theme 2012-08-07 | https://raw.github.com/aino/galleria/master/LICENSE | (c) Aino */
#galleria-loader{height:1px!important}
.galleria-theme-classic {
position: relative;
overflow: hidden;
background: #000;
}
.galleria-theme-classic img {
-moz-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
.galleria-theme-classic .galleria-stage {
position: absolute;
top: 10px;
bottom: 60px;
left: 10px;
right: 10px;
overflow:hidden;
}
.galleria-theme-classic .galleria-thumbnails-container {
height: 50px;
bottom: 0;
position: absolute;
left: 10px;
right: 10px;
z-index: 2;
}
.galleria-theme-classic .galleria-carousel .galleria-thumbnails-list {
margin-left: 30px;
margin-right: 30px;
}
.galleria-theme-classic .galleria-thumbnails .galleria-image {
height: 40px;
width: 60px;
background: #000;
margin: 0 5px 0 0;
border: 1px solid #000;
float: left;
cursor: pointer;
}
.galleria-theme-classic .galleria-counter {
position: absolute;
bottom: 10px;
left: 10px;
text-align: right;
color: #fff;
font: normal 11px/1 arial,sans-serif;
z-index: 1;
}
.galleria-theme-classic .galleria-loader {
background: #000;
width: 20px;
height: 20px;
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
display: none;
background: url(classic-loader.gif) no-repeat 2px 2px;
}
.galleria-theme-classic .galleria-info {
width: 50%;
top: 15px;
left: 15px;
z-index: 2;
position: absolute;
}
.galleria-theme-classic .galleria-info-text {
background-color: #000;
padding: 12px;
display: none;
/* IE7 */ zoom:1;
}
.galleria-theme-classic .galleria-info-title {
font: bold 12px/1.1 arial,sans-serif;
margin: 0;
color: #fff;
margin-bottom: 7px;
}
.galleria-theme-classic .galleria-info-description {
font: italic 12px/1.4 georgia,serif;
margin: 0;
color: #bbb;
}
.galleria-theme-classic .galleria-info-close {
width: 9px;
height: 9px;
position: absolute;
top: 5px;
right: 5px;
background-position: -753px -11px;
opacity: .5;
filter: alpha(opacity=50);
cursor: pointer;
display: none;
}
.galleria-theme-classic .notouch .galleria-info-close:hover{
opacity:1;
filter: alpha(opacity=100);
}
.galleria-theme-classic .touch .galleria-info-close:active{
opacity:1;
filter: alpha(opacity=100);
}
.galleria-theme-classic .galleria-info-link {
background-position: -669px -5px;
opacity: .7;
filter: alpha(opacity=70);
position: absolute;
width: 20px;
height: 20px;
cursor: pointer;
background-color: #000;
}
.galleria-theme-classic.notouch .galleria-info-link:hover {
opacity: 1;
filter: alpha(opacity=100);
}
.galleria-theme-classic.touch .galleria-info-link:active {
opacity: 1;
filter: alpha(opacity=100);
}
.galleria-theme-classic .galleria-image-nav {
position: absolute;
top: 50%;
margin-top: -62px;
width: 100%;
height: 62px;
left: 0;
}
.galleria-theme-classic .galleria-image-nav-left,
.galleria-theme-classic .galleria-image-nav-right {
opacity: .3;
filter: alpha(opacity=30);
cursor: pointer;
width: 62px;
height: 124px;
position: absolute;
left: 10px;
z-index: 2;
background-position: 0 46px;
}
.galleria-theme-classic .galleria-image-nav-right {
left: auto;
right: 10px;
background-position: -254px 46px;
z-index: 2;
}
.galleria-theme-classic.notouch .galleria-image-nav-left:hover,
.galleria-theme-classic.notouch .galleria-image-nav-right:hover {
opacity: 1;
filter: alpha(opacity=100);
}
.galleria-theme-classic.touch .galleria-image-nav-left:active,
.galleria-theme-classic.touch .galleria-image-nav-right:active {
opacity: 1;
filter: alpha(opacity=100);
}
.galleria-theme-classic .galleria-thumb-nav-left,
.galleria-theme-classic .galleria-thumb-nav-right {
cursor: pointer;
display: none;
background-position: -495px 5px;
position: absolute;
left: 0;
top: 0;
height: 40px;
width: 23px;
z-index: 3;
opacity: .8;
filter: alpha(opacity=80);
}
.galleria-theme-classic .galleria-thumb-nav-right {
background-position: -578px 5px;
border-right: none;
right: 0;
left: auto;
}
.galleria-theme-classic .galleria-thumbnails-container .disabled {
opacity: .2;
filter: alpha(opacity=20);
cursor: default;
}
.galleria-theme-classic.notouch .galleria-thumb-nav-left:hover,
.galleria-theme-classic.notouch .galleria-thumb-nav-right:hover {
opacity: 1;
filter: alpha(opacity=100);
background-color: #111;
}
.galleria-theme-classic.touch .galleria-thumb-nav-left:active,
.galleria-theme-classic.touch .galleria-thumb-nav-right:active {
opacity: 1;
filter: alpha(opacity=100);
background-color: #111;
}
.galleria-theme-classic.notouch .galleria-thumbnails-container .disabled:hover {
opacity: .2;
filter: alpha(opacity=20);
background-color: transparent;
}
.galleria-theme-classic .galleria-carousel .galleria-thumb-nav-left,
.galleria-theme-classic .galleria-carousel .galleria-thumb-nav-right {
display: block;
}
.galleria-theme-classic .galleria-thumb-nav-left,
.galleria-theme-classic .galleria-thumb-nav-right,
.galleria-theme-classic .galleria-info-link,
.galleria-theme-classic .galleria-info-close,
.galleria-theme-classic .galleria-image-nav-left,
.galleria-theme-classic .galleria-image-nav-right {
background-image: url(classic-map.png);
background-repeat: no-repeat;
}
.galleria-theme-classic.galleria-container.videoplay .galleria-info,
.galleria-theme-classic.galleria-container.videoplay .galleria-counter{ display:none!important; }

View File

@ -1,100 +0,0 @@
/**
* Galleria Classic Theme 2012-08-08
* http://galleria.io
*
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
*
*/
(function($) {
/*global window, jQuery, Galleria */
Galleria.addTheme({
name: 'classic',
author: 'Galleria',
css: 'galleria.classic.css',
defaults: {
transition: 'slide',
thumbCrop: 'height',
// set this to false if you want to show the caption all the time:
_toggleInfo: true
},
init: function(options) {
Galleria.requires(1.4, 'This version of Classic theme requires Galleria 1.4 or later');
// add some elements
this.addElement('info-link','info-close');
this.append({
'info' : ['info-link','info-close']
});
// cache some stuff
var info = this.$('info-link,info-close,info-text'),
touch = Galleria.TOUCH;
// show loader & counter with opacity
this.$('loader,counter').show().css('opacity', 0.4);
// some stuff for non-touch browsers
if (! touch ) {
this.addIdleState( this.get('image-nav-left'), { left:-50 });
this.addIdleState( this.get('image-nav-right'), { right:-50 });
this.addIdleState( this.get('counter'), { opacity:0 });
}
// toggle info
if ( options._toggleInfo === true ) {
info.bind( 'click:fast', function() {
info.toggle();
});
} else {
info.show();
this.$('info-link, info-close').hide();
}
// bind some stuff
this.bind('thumbnail', function(e) {
if (! touch ) {
// fade thumbnails
$(e.thumbTarget).css('opacity', 0.6).parent().hover(function() {
$(this).not('.active').children().stop().fadeTo(100, 1);
}, function() {
$(this).not('.active').children().stop().fadeTo(400, 0.6);
});
if ( e.index === this.getIndex() ) {
$(e.thumbTarget).css('opacity',1);
}
} else {
$(e.thumbTarget).css('opacity', this.getIndex() ? 1 : 0.6).bind('click:fast', function() {
$(this).css( 'opacity', 1 ).parent().siblings().children().css('opacity', 0.6);
});
}
});
var activate = function(e) {
$(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6);
};
this.bind('loadstart', function(e) {
if (!e.cached) {
this.$('loader').show().fadeTo(200, 0.4);
}
window.setTimeout(function() {
activate(e);
}, touch ? 300 : 0);
this.$('info').toggle( this.hasInfo() );
});
this.bind('loadfinish', function(e) {
this.$('loader').fadeOut(200);
});
}
});
}(jQuery));

View File

@ -1 +0,0 @@
!function(i){Galleria.addTheme({name:"classic",author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:true},init:function(t){Galleria.requires(1.4,"This version of Classic theme requires Galleria 1.4 or later");this.addElement("info-link","info-close");this.append({info:["info-link","info-close"]});var e=this.$("info-link,info-close,info-text"),s=Galleria.TOUCH;this.$("loader,counter").show().css("opacity",.4);if(!s){this.addIdleState(this.get("image-nav-left"),{left:-50});this.addIdleState(this.get("image-nav-right"),{right:-50});this.addIdleState(this.get("counter"),{opacity:0})}if(t._toggleInfo===true){e.bind("click:fast",function(){e.toggle()})}else{e.show();this.$("info-link, info-close").hide()}this.bind("thumbnail",function(t){if(!s){i(t.thumbTarget).css("opacity",.6).parent().hover(function(){i(this).not(".active").children().stop().fadeTo(100,1)},function(){i(this).not(".active").children().stop().fadeTo(400,.6)});if(t.index===this.getIndex()){i(t.thumbTarget).css("opacity",1)}}else{i(t.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){i(this).css("opacity",1).parent().siblings().children().css("opacity",.6)})}});var n=function(t){i(t.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(i){if(!i.cached){this.$("loader").show().fadeTo(200,.4)}window.setTimeout(function(){n(i)},s?300:0);this.$("info").toggle(this.hasInfo())});this.bind("loadfinish",function(i){this.$("loader").fadeOut(200)})}})}(jQuery);

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="galleria/galleria-1.4.2.min.js"></script>
<script src="galleria/themes/classic/galleria.classic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/galleria.min.js" integrity="sha384-nUTmcZGvHkqUWk8Vex26NS0QsXEK8QAPLIZ22xLiy7OLCHX1QUbIqptlSLnH+aOg" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/themes/classic/galleria.classic.min.js" integrity="sha384-2b7KAxHmRxLZu0x5c6OMtaUOSns5VJ666Fe4F7u9OjRdY6SSEvFLVDxIV+u+/hYp" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/themes/classic/galleria.classic.min.css" integrity="sha384-C9txWX+EICTgr4AN/wWQhKhdd/BsXl1lVS/E+daOWUZn6Mjm5oHGeEEU0jxP55oV" crossorigin="anonymous">
<script src="index.js"></script>
<link rel="stylesheet" href="galleria/themes/classic/galleria.classic.css">
<link rel="stylesheet" href="index.css">
<title>Getting Started</title>
</head>
<body onload="runGalleria()">
<img class="fullscreen" src="fullscreen.png" width="16" height="16" onclick="toggleFullScreen()" />
<div class="galleria"></div>
</body>
</html>

View File

@ -66,16 +66,12 @@ function getData() {
}
}
data.forEach(function(it) {
it.video = it[youtube ? 'link' : 'video']
})
if (!youtube) {
data.forEach(function(it) {
it['iframe'] = it.video
delete it.video
it.link = it.video
})
}
return data
}