mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-22 09:54:48 +00:00
Initial Fork from https://bitbucket.org/raphaelmutschler/calibreserver/
This commit is contained in:
1999
html/js/bootstrap.js
vendored
Normal file
1999
html/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
html/js/bootstrap.min.js
vendored
Normal file
6
html/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
html/js/jquery.magnific-popup.min.js
vendored
Normal file
4
html/js/jquery.magnific-popup.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
html/js/jquery.vegas.min.js
vendored
Normal file
11
html/js/jquery.vegas.min.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Vegas – Fullscreen Backgrounds and Slideshows with jQuery.
|
||||
// v1.3.3 - released 2013-09-03 13:27
|
||||
// Licensed under the MIT license.
|
||||
// http://vegas.jaysalvat.com/
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2010-2013 Jay Salvat
|
||||
// http://jaysalvat.com/
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
(function(e){function t(a,n){var r={align:"center",valign:"center"};if(e.extend(r,n),0===a.height())return a.load(function(){t(e(this),n)}),void 0;var i,s,g,d=o(),l=d.width,u=d.height,v=a.width(),c=a.height(),p=u/l,f=c/v;p>f?(i=u/f,s=u):(i=l,s=l*f),g={width:i+"px",height:s+"px",top:"auto",bottom:"auto",left:"auto",right:"auto"},isNaN(parseInt(r.valign,10))?"top"==r.valign?g.top=0:"bottom"==r.valign?g.bottom=0:g.top=(u-s)/2:g.top=0-(s-u)/100*parseInt(r.valign,10)+"px",isNaN(parseInt(r.align,10))?"left"==r.align?g.left=0:"right"==r.align?g.right=0:g.left=(l-i)/2:g.left=0-(i-l)/100*parseInt(r.align,10)+"px",a.css(g)}function a(){d.prependTo("body").fadeIn()}function n(){d.fadeOut("fast",function(){e(this).remove()})}function r(){return e("body").css("backgroundImage")?e("body").css("backgroundImage").replace(/url\("?(.*?)"?\)/i,"$1"):void 0}function o(){var e=window,t="inner";return"innerWidth"in window||(e=document.documentElement||document.body,t="client"),{width:e[t+"Width"],height:e[t+"Height"]}}var i,s=e("<img />").addClass("vegas-background"),g=e("<div />").addClass("vegas-overlay"),d=e("<div />").addClass("vegas-loading"),l=e(),u=null,v=[],c=0,p=5e3,f=function(){},h={init:function(o){var i={src:r(),align:"center",valign:"center",fade:0,loading:!0,load:function(){},complete:function(){}};e.extend(i,e.vegas.defaults.background,o),i.loading&&a();var g=s.clone();return g.css({position:"fixed",left:"0px",top:"0px"}).bind("load",function(){g!=l&&(e(window).bind("load resize.vegas",function(){t(g,i)}),l.is("img")?(l.stop(),g.hide().insertAfter(l).fadeIn(i.fade,function(){e(".vegas-background").not(this).remove(),e("body").trigger("vegascomplete",[this,c-1]),i.complete.apply(g,[c-1])})):g.hide().prependTo("body").fadeIn(i.fade,function(){e("body").trigger("vegascomplete",[this,c-1]),i.complete.apply(this,[c-1])}),l=g,t(l,i),i.loading&&n(),e("body").trigger("vegasload",[l.get(0),c-1]),i.load.apply(l.get(0),[c-1]),c&&(e("body").trigger("vegaswalk",[l.get(0),c-1]),i.walk.apply(l.get(0),[c-1])))}).attr("src",i.src),e.vegas},destroy:function(t){return t&&"background"!=t||(e(".vegas-background, .vegas-loading").remove(),e(window).unbind("*.vegas"),l=e()),t&&"overlay"!=t||e(".vegas-overlay").remove(),clearInterval(i),e.vegas},overlay:function(t){var a={src:null,opacity:null};return e.extend(a,e.vegas.defaults.overlay,t),g.remove(),g.css({margin:"0",padding:"0",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),a.src&&g.css("backgroundImage","url("+a.src+")"),a.opacity&&g.css("opacity",a.opacity),g.prependTo("body"),e.vegas},slideshow:function(t,a){var n={step:c,delay:p,preload:!1,backgrounds:v,walk:f};if(e.extend(n,e.vegas.defaults.slideshow,t),n.backgrounds!=v&&(t.step||(n.step=0),t.walk||(n.walk=function(){}),n.preload&&e.vegas("preload",n.backgrounds)),v=n.backgrounds,p=n.delay,c=n.step,f=n.walk,clearInterval(i),!v.length)return e.vegas;var r=function(){0>c&&(c=v.length-1),(c>=v.length||!v[c-1])&&(c=0);var t=v[c++];t.walk=n.walk,t.fade===void 0&&(t.fade=n.fade),t.fade>n.delay&&(t.fade=n.delay),e.vegas(t)};return r(),a||(u=!1,e("body").trigger("vegasstart",[l.get(0),c-1])),u||(i=setInterval(r,n.delay)),e.vegas},next:function(){var t=c;return c&&(e.vegas("slideshow",{step:c},!0),e("body").trigger("vegasnext",[l.get(0),c-1,t-1])),e.vegas},previous:function(){var t=c;return c&&(e.vegas("slideshow",{step:c-2},!0),e("body").trigger("vegasprevious",[l.get(0),c-1,t-1])),e.vegas},jump:function(t){var a=c;return c&&(e.vegas("slideshow",{step:t},!0),e("body").trigger("vegasjump",[l.get(0),c-1,a-1])),e.vegas},stop:function(){var t=c;return c=0,u=null,clearInterval(i),e("body").trigger("vegasstop",[l.get(0),t-1]),e.vegas},pause:function(){return u=!0,clearInterval(i),e("body").trigger("vegaspause",[l.get(0),c-1]),e.vegas},get:function(e){return null===e||"background"==e?l.get(0):"overlay"==e?g.get(0):"step"==e?c-1:"paused"==e?u:void 0},preload:function(t){var a=[];for(var n in t)if(t[n].src){var r=document.createElement("img");r.src=t[n].src,a.push(r)}return e.vegas}};e.vegas=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(e.error("Method "+t+" does not exist"),void 0):h.init.apply(this,arguments)},e.vegas.defaults={background:{},slideshow:{},overlay:{}}})(jQuery);
|
||||
107
html/js/main.js
Executable file
107
html/js/main.js
Executable file
@@ -0,0 +1,107 @@
|
||||
$(window).load(function(){
|
||||
//initialize background slideshow
|
||||
if(!$('body').hasClass("no-bg-slides")){
|
||||
$.vegas('slideshow', {
|
||||
delay: 50000,
|
||||
backgrounds:[
|
||||
{ src:'images/slide01.jpg', fade: 1000 },
|
||||
{ src:'images/slide02.jpg', fade: 1000 },
|
||||
{ src:'images/slide03.jpg', fade: 1000 },
|
||||
{ src:'images/slide04.jpg', fade: 1000 }
|
||||
]
|
||||
})();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
//toggle the slideshow mode
|
||||
$('#gallery-swap').click(function(event) {
|
||||
if ($('body').hasClass('slideshow')){
|
||||
$('body').removeClass('slideshow');
|
||||
|
||||
} else {
|
||||
$('body').addClass('slideshow');
|
||||
}
|
||||
});
|
||||
|
||||
//slideshow naviagaion
|
||||
$('.slide-nav li').click(function(event) {
|
||||
if ($(this).hasClass('next')) {
|
||||
$.vegas('next');
|
||||
} else {
|
||||
$.vegas('previous');
|
||||
}
|
||||
});
|
||||
|
||||
$('nav li a').click(function(event) {
|
||||
$(this).parents('ul').find('li').removeClass('active');
|
||||
$(this).parent('li').addClass('active');
|
||||
});
|
||||
|
||||
//keyboard navigation for slideshow.
|
||||
//left, right, esc
|
||||
$(window).keydown(function(event) {
|
||||
if($('body').hasClass('slideshow')) {
|
||||
if(event.keyCode==37){
|
||||
$.vegas('previous');
|
||||
}
|
||||
if(event.keyCode==39){
|
||||
$.vegas('next');
|
||||
}
|
||||
if(event.keyCode==27){
|
||||
$('body').removeClass('slideshow');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#open-menu').click(function(){
|
||||
$('nav').toggleClass('open');
|
||||
$('body').toggleClass('open');
|
||||
});
|
||||
|
||||
$('header').swipe({
|
||||
swipe: function(event, direction, distance, duration, fingers){
|
||||
// console.log(direction, distance, event, duration);
|
||||
if(direction=="right"){
|
||||
$('nav').addClass('open');
|
||||
$('body').addClass('open');
|
||||
}
|
||||
|
||||
if(direction=="left"){
|
||||
$('nav').removeClass('open');
|
||||
$('body').removeClass('open');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.magnific').magnificPopup({
|
||||
type: 'image',
|
||||
mainClass: 'mfp-with-zoom',
|
||||
gallery: {
|
||||
enabled: true,
|
||||
tCounter: '<span class="mfp-counter">%curr%/%total%</span>',
|
||||
arrowMarkup: '<button title="%title%" type="button" class="entypo slide-button chevron-thin-%dir%"></button>'
|
||||
//arrowMarkup: '<span class="entypo slide-button chevron-thin-%dir%"></span>'
|
||||
//<span class="entypo chevron-thin-left"></span>
|
||||
},
|
||||
zoom: {
|
||||
enabled: true, // By default it's false, so don't forget to enable it
|
||||
|
||||
duration: 300, // duration of the effect, in milliseconds
|
||||
easing: 'ease-in-out', // CSS transition easing function
|
||||
|
||||
// The "opener" function should return the element from which popup will be zoomed in
|
||||
// and to which popup will be scaled down
|
||||
// By defailt it looks for an image tag:
|
||||
opener: function(openerElement) {
|
||||
// openerElement is the element on which popup was initialized, in this case its <a> tag
|
||||
// you don't need to add "opener" option if this code matches your needs, it's defailt one.
|
||||
return openerElement.is('img') ? openerElement : openerElement.find('img');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
14
html/js/plugins.js
Executable file
14
html/js/plugins.js
Executable file
File diff suppressed because one or more lines are too long
6
html/js/vendor/jquery-1.10.1.min.js
vendored
Normal file
6
html/js/vendor/jquery-1.10.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
html/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js
vendored
Normal file
11
html/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user