linaro-jekyll-theme 0.1.2 → 0.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +52 -19
- data/_data/authors.yml +7 -0
- data/_data/company.yml +29 -0
- data/_data/footer.yml +111 -0
- data/_data/linaro.yml +4 -0
- data/_data/members_db.yaml +115 -0
- data/_data/nav.yml +62 -0
- data/_data/news.yaml +230 -0
- data/_data/sub-nav-stacked.yml +67 -0
- data/_data/sub-nav.yml +61 -0
- data/_includes/_theme-includes/_blog/pagination.html +1 -1
- data/_includes/_theme-includes/_footer/footer.html +54 -23
- data/_includes/_theme-includes/_head/head.html +15 -7
- data/_includes/_theme-includes/_navigation/nav.html +62 -14
- data/_includes/_theme-includes/_navigation/stacked-nav.html +20 -0
- data/_includes/_theme-includes/_navigation/tabbed-nav.html +35 -0
- data/_includes/_theme-includes/_page-structure/breadcrumb.html +77 -27
- data/_includes/_theme-includes/_page-structure/home-hero-shape.html +34 -0
- data/_includes/_theme-includes/_page-structure/home-hero.html +23 -0
- data/_includes/_theme-includes/_page-structure/shape-divider.html +12 -0
- data/_includes/_theme-includes/_script-includes/css.html +40 -1
- data/_includes/_theme-includes/_script-includes/google-analytics/script.html +10 -0
- data/_includes/_theme-includes/_script-includes/gtm/gtm-noscript.html +2 -1
- data/_includes/_theme-includes/_script-includes/gtm/gtm-script.html +9 -7
- data/_includes/_theme-includes/_script-includes/javascript.html +50 -2
- data/_includes/_theme-includes/_third-party/disqus.html +1 -1
- data/_includes/_theme-includes/_third-party/mailchimp-homepage.html +1 -6
- data/_includes/_theme-includes/members.html +3 -3
- data/_includes/image.html +6 -1
- data/_includes/media.html +9 -1
- data/_includes/youtube.html +7 -0
- data/{assets/vendor.js → _layouts/about.html} +0 -0
- data/_layouts/accessory-display-page.html +88 -0
- data/_layouts/blog-breadcrumbless.html +49 -0
- data/_layouts/blog.html +56 -0
- data/_layouts/contact.html +10 -0
- data/_layouts/default-empty.html +11 -0
- data/_layouts/default-no-sub-nav.html +15 -0
- data/_layouts/default-plain.html +16 -0
- data/_layouts/default-stacked-breadcrumb.html +23 -0
- data/_layouts/default-stacked.html +22 -0
- data/_layouts/default.html +20 -0
- data/_layouts/empty.html +10 -0
- data/_layouts/{plain-page.html → fluid-no-sub-nav.html} +2 -2
- data/_layouts/fluid.html +15 -0
- data/_layouts/home-shape.html +18 -0
- data/_layouts/home.html +18 -0
- data/_layouts/post.html +146 -0
- data/_layouts/product-display-page.html +262 -0
- data/_layouts/project-display-page.html +28 -0
- data/_sass/bootstrap/_variables.scss +28 -5
- data/{_assets/css → _sass}/core/animations.scss +0 -0
- data/{_assets/css → _sass}/core/blog.scss +36 -25
- data/{_assets/css → _sass}/core/breadcrumb.scss +20 -1
- data/_sass/core/carousel-styles.scss +3 -0
- data/{_assets/css → _sass}/core/carousel.scss +0 -0
- data/{_assets/css → _sass}/core/cookieconsent.scss +31 -2
- data/_sass/core/custom.scss +3 -0
- data/{_assets/css → _sass}/core/fa.scss +7 -2
- data/{_assets/css → _sass}/core/flipclock.scss +0 -0
- data/{_assets/css → _sass}/core/font-awesome.min.scss +0 -0
- data/{_assets/css → _sass}/core/fonts.scss +0 -0
- data/{_assets/css → _sass}/core/footer.scss +55 -13
- data/_sass/core/homepage.scss +40 -0
- data/{_assets/css → _sass}/core/lightbox.scss +0 -0
- data/{_assets/css → _sass}/core/nav.scss +136 -15
- data/{_assets/css → _sass}/core/openhours.scss +0 -0
- data/{_assets/css → _sass}/core/owl.carousel.min.scss +1 -1
- data/{_assets/css → _sass}/core/owl.theme.default.min.scss +0 -0
- data/{_assets/css → _sass}/core/products.scss +1 -1
- data/{_assets/css → _sass}/core/projects.scss +0 -0
- data/{_assets/css → _sass}/core/social-media-icons.scss +0 -0
- data/{_assets/css → _sass}/core/syntax.scss +0 -0
- data/{_assets/css → _sass}/core/tables.scss +38 -0
- data/_sass/core/theme.scss +538 -0
- data/_sass/custom.scss +0 -0
- data/assets/css/main-blog.scss +19 -0
- data/assets/css/main-home.scss +16 -0
- data/assets/css/main-lightbox.scss +22 -0
- data/assets/css/main-openhours.scss +19 -0
- data/assets/css/main-products.scss +20 -0
- data/assets/css/main-projects.scss +20 -0
- data/{_assets → assets}/css/main.scss +6 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +2671 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/fonts/fontello.eot +0 -0
- data/assets/fonts/fontello.svg +44 -0
- data/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/fonts/lato-regular/LICENSE.txt +93 -0
- data/assets/fonts/lato-regular/Lato-regular.eot +0 -0
- data/assets/fonts/lato-regular/Lato-regular.svg +435 -0
- data/assets/fonts/lato-regular/Lato-regular.ttf +0 -0
- data/assets/fonts/lato-regular/Lato-regular.woff +0 -0
- data/assets/fonts/lato-regular/Lato-regular.woff2 +0 -0
- data/{_assets → assets}/images/96boards-Logo.svg +0 -0
- data/{_assets → assets}/images/Linaro-Logo_light.png +0 -0
- data/{_assets → assets}/images/Linaro-Logo_standard.svg +0 -0
- data/{_assets → assets}/images/Linaro-Sprinkle.svg +0 -0
- data/assets/images/avatar-placeholder.png +0 -0
- data/assets/images/background-image.jpg +0 -0
- data/assets/images/banner.jpg +0 -0
- data/assets/images/close.png +0 -0
- data/assets/images/css3.png +0 -0
- data/assets/images/favicon.ico +0 -0
- data/assets/images/favicon.png +0 -0
- data/assets/images/html5.png +0 -0
- data/assets/images/jekyll.svg +1 -0
- data/assets/images/js.jpeg +0 -0
- data/assets/images/loading.gif +0 -0
- data/assets/images/next.png +0 -0
- data/assets/images/owl.video.play.png +0 -0
- data/assets/images/placeholder.png +0 -0
- data/assets/images/prev.png +0 -0
- data/assets/images/social-media-image.png +0 -0
- data/assets/js/app/main.js +16 -23
- data/{_assets/js/app/search-page.js → assets/js/app/search.js} +1 -1
- data/{_assets/js/app/sticky-navbar.js → assets/js/app/sticky.js} +0 -0
- data/assets/js/app/tables.js +8 -0
- data/assets/js/vendor/cognito-forms.js +150 -0
- data/assets/js/vendor/cookieconsent.min.js +2 -9
- data/assets/js/vendor/flipclock.min.js +33 -0
- data/assets/js/vendor/lightbox.min.js +14 -0
- data/robots.txt +9 -0
- metadata +156 -226
- data/_assets/css/_bootstrap-compass.scss +0 -9
- data/_assets/css/_bootstrap-mincer.scss +0 -19
- data/_assets/css/_bootstrap-sprockets.scss +0 -9
- data/_assets/css/_bootstrap.scss +0 -56
- data/_assets/css/blog-pages.scss +0 -5
- data/_assets/css/bootstrap/_alerts.scss +0 -73
- data/_assets/css/bootstrap/_badges.scss +0 -68
- data/_assets/css/bootstrap/_breadcrumbs.scss +0 -28
- data/_assets/css/bootstrap/_button-groups.scss +0 -244
- data/_assets/css/bootstrap/_buttons.scss +0 -168
- data/_assets/css/bootstrap/_carousel.scss +0 -270
- data/_assets/css/bootstrap/_close.scss +0 -36
- data/_assets/css/bootstrap/_code.scss +0 -69
- data/_assets/css/bootstrap/_component-animations.scss +0 -37
- data/_assets/css/bootstrap/_dropdowns.scss +0 -216
- data/_assets/css/bootstrap/_forms.scss +0 -617
- data/_assets/css/bootstrap/_glyphicons.scss +0 -307
- data/_assets/css/bootstrap/_grid.scss +0 -84
- data/_assets/css/bootstrap/_input-groups.scss +0 -171
- data/_assets/css/bootstrap/_jumbotron.scss +0 -54
- data/_assets/css/bootstrap/_labels.scss +0 -66
- data/_assets/css/bootstrap/_list-group.scss +0 -130
- data/_assets/css/bootstrap/_media.scss +0 -66
- data/_assets/css/bootstrap/_mixins.scss +0 -40
- data/_assets/css/bootstrap/_modals.scss +0 -150
- data/_assets/css/bootstrap/_navbar.scss +0 -662
- data/_assets/css/bootstrap/_navs.scss +0 -242
- data/_assets/css/bootstrap/_normalize.scss +0 -424
- data/_assets/css/bootstrap/_pager.scss +0 -54
- data/_assets/css/bootstrap/_pagination.scss +0 -89
- data/_assets/css/bootstrap/_panels.scss +0 -271
- data/_assets/css/bootstrap/_popovers.scss +0 -131
- data/_assets/css/bootstrap/_print.scss +0 -101
- data/_assets/css/bootstrap/_progress-bars.scss +0 -87
- data/_assets/css/bootstrap/_responsive-embed.scss +0 -35
- data/_assets/css/bootstrap/_responsive-utilities.scss +0 -179
- data/_assets/css/bootstrap/_scaffolding.scss +0 -161
- data/_assets/css/bootstrap/_tables.scss +0 -234
- data/_assets/css/bootstrap/_theme.scss +0 -291
- data/_assets/css/bootstrap/_thumbnails.scss +0 -38
- data/_assets/css/bootstrap/_tooltip.scss +0 -101
- data/_assets/css/bootstrap/_type.scss +0 -298
- data/_assets/css/bootstrap/_utilities.scss +0 -55
- data/_assets/css/bootstrap/_variables.scss +0 -874
- data/_assets/css/bootstrap/_wells.scss +0 -29
- data/_assets/css/bootstrap/mixins/_alerts.scss +0 -14
- data/_assets/css/bootstrap/mixins/_background-variant.scss +0 -12
- data/_assets/css/bootstrap/mixins/_border-radius.scss +0 -18
- data/_assets/css/bootstrap/mixins/_buttons.scss +0 -65
- data/_assets/css/bootstrap/mixins/_center-block.scss +0 -7
- data/_assets/css/bootstrap/mixins/_clearfix.scss +0 -22
- data/_assets/css/bootstrap/mixins/_forms.scss +0 -88
- data/_assets/css/bootstrap/mixins/_gradients.scss +0 -58
- data/_assets/css/bootstrap/mixins/_grid-framework.scss +0 -81
- data/_assets/css/bootstrap/mixins/_grid.scss +0 -122
- data/_assets/css/bootstrap/mixins/_hide-text.scss +0 -21
- data/_assets/css/bootstrap/mixins/_image.scss +0 -33
- data/_assets/css/bootstrap/mixins/_labels.scss +0 -12
- data/_assets/css/bootstrap/mixins/_list-group.scss +0 -32
- data/_assets/css/bootstrap/mixins/_nav-divider.scss +0 -10
- data/_assets/css/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/_assets/css/bootstrap/mixins/_opacity.scss +0 -8
- data/_assets/css/bootstrap/mixins/_pagination.scss +0 -24
- data/_assets/css/bootstrap/mixins/_panels.scss +0 -24
- data/_assets/css/bootstrap/mixins/_progress-bar.scss +0 -10
- data/_assets/css/bootstrap/mixins/_reset-filter.scss +0 -8
- data/_assets/css/bootstrap/mixins/_reset-text.scss +0 -18
- data/_assets/css/bootstrap/mixins/_resize.scss +0 -6
- data/_assets/css/bootstrap/mixins/_responsive-visibility.scss +0 -21
- data/_assets/css/bootstrap/mixins/_size.scss +0 -10
- data/_assets/css/bootstrap/mixins/_tab-focus.scss +0 -9
- data/_assets/css/bootstrap/mixins/_table-row.scss +0 -28
- data/_assets/css/bootstrap/mixins/_text-emphasis.scss +0 -12
- data/_assets/css/bootstrap/mixins/_text-overflow.scss +0 -8
- data/_assets/css/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- data/_assets/css/core/critical.scss +0 -991
- data/_assets/css/core/homepage.scss +0 -16
- data/_assets/css/core/members-sprite.scss +0 -425
- data/_assets/css/core/theme.scss +0 -244
- data/_assets/css/documentation-pages.scss +0 -3
- data/_assets/css/home-page.scss +0 -3
- data/_assets/css/openhours-page.scss +0 -4
- data/_assets/css/products-pages.scss +0 -5
- data/_assets/css/projects-pages.scss +0 -5
- data/_assets/js/app/96boards.js +0 -133
- data/_assets/js/app/mixitup.js +0 -23
- data/_assets/js/app.js +0 -5
- data/_assets/js/vendor/bootstrap.min.js +0 -7
- data/_assets/js/vendor/cookieconsent.min.js +0 -15
- data/_assets/js/vendor/filtrify.js +0 -11
- data/_assets/js/vendor/flipclock.min.js +0 -2
- data/_assets/js/vendor/jquery.min.js +0 -4
- data/_assets/js/vendor/lazysizes.min.js +0 -2
- data/_assets/js/vendor/lightbox.js +0 -519
- data/_assets/js/vendor/loadCSS.js +0 -35
- data/_assets/js/vendor/loadCSS.min.js +0 -2
- data/_assets/js/vendor/mc-validate.js +0 -14
- data/_assets/js/vendor/owl.carousel.min.js +0 -27
- data/_assets/js/vendor/picturefill.min.js +0 -5
- data/_assets/js/vendor/shuffle.js +0 -2004
- data/_assets/js/vendor.js +0 -6
- data/_includes/_theme-includes/_footer/backup.html +0 -71
- data/_includes/_theme-includes/_head/ascii-art.html +0 -11
- data/_includes/_theme-includes/_navigation/_sub-navigation/tabbed-nav.html +0 -150
- data/_includes/_theme-includes/_page-structure/old-breadcrumb.html +0 -139
- data/_includes/_theme-includes/_third-party/mailchimp-sub-footer.html +0 -40
- data/_layouts/empty-container-page.html +0 -13
- data/_sass/animations.scss +0 -125
- data/_sass/blog.scss +0 -188
- data/_sass/breadcrumb.scss +0 -48
- data/_sass/carousel.scss +0 -122
- data/_sass/cookieconsent.scss +0 -13
- data/_sass/critical.scss +0 -991
- data/_sass/fa.scss +0 -2331
- data/_sass/flipclock.scss +0 -435
- data/_sass/font-awesome.min.scss +0 -4
- data/_sass/fonts.scss +0 -7
- data/_sass/footer.scss +0 -76
- data/_sass/lightbox.scss +0 -213
- data/_sass/members-sprite.scss +0 -425
- data/_sass/nav.scss +0 -533
- data/_sass/openhours.scss +0 -51
- data/_sass/owl.carousel.min.scss +0 -6
- data/_sass/owl.theme.default.min.scss +0 -6
- data/_sass/products.scss +0 -214
- data/_sass/projects.scss +0 -34
- data/_sass/social-media-icons.scss +0 -71
- data/_sass/syntax.scss +0 -65
- data/_sass/tables.scss +0 -87
- data/_sass/theme.scss +0 -208
- data/assets/js/app/mixitup.js +0 -23
- data/assets/js/app/search-page.js +0 -41
- data/assets/js/app/sticky-navbar.js +0 -65
- data/assets/js/vendor/lightbox.js +0 -519
- data/assets/js/vendor/picturefill.min.js +0 -5
- data/assets/js/vendor/shuffle.js +0 -2004
@@ -1,519 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Lightbox v2.9.0
|
3
|
-
* by Lokesh Dhakar
|
4
|
-
*
|
5
|
-
* More info:
|
6
|
-
* http://lokeshdhakar.com/projects/lightbox2/
|
7
|
-
*
|
8
|
-
* Copyright 2007, 2015 Lokesh Dhakar
|
9
|
-
* Released under the MIT license
|
10
|
-
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
11
|
-
*
|
12
|
-
* @preserve
|
13
|
-
*/
|
14
|
-
|
15
|
-
// Uses Node, AMD or browser globals to create a module.
|
16
|
-
(function (root, factory) {
|
17
|
-
if (typeof define === 'function' && define.amd) {
|
18
|
-
// AMD. Register as an anonymous module.
|
19
|
-
define(['jquery'], factory);
|
20
|
-
} else if (typeof exports === 'object') {
|
21
|
-
// Node. Does not work with strict CommonJS, but
|
22
|
-
// only CommonJS-like environments that support module.exports,
|
23
|
-
// like Node.
|
24
|
-
module.exports = factory(require('jquery'));
|
25
|
-
} else {
|
26
|
-
// Browser globals (root is window)
|
27
|
-
root.lightbox = factory(root.jQuery);
|
28
|
-
}
|
29
|
-
}(this, function ($) {
|
30
|
-
|
31
|
-
function Lightbox(options) {
|
32
|
-
this.album = [];
|
33
|
-
this.currentImageIndex = void 0;
|
34
|
-
this.init();
|
35
|
-
|
36
|
-
// options
|
37
|
-
this.options = $.extend({}, this.constructor.defaults);
|
38
|
-
this.option(options);
|
39
|
-
}
|
40
|
-
|
41
|
-
// Descriptions of all options available on the demo site:
|
42
|
-
// http://lokeshdhakar.com/projects/lightbox2/index.html#options
|
43
|
-
Lightbox.defaults = {
|
44
|
-
albumLabel: 'Image %1 of %2',
|
45
|
-
alwaysShowNavOnTouchDevices: false,
|
46
|
-
fadeDuration: 600,
|
47
|
-
fitImagesInViewport: true,
|
48
|
-
imageFadeDuration: 600,
|
49
|
-
// maxWidth: 800,
|
50
|
-
// maxHeight: 600,
|
51
|
-
positionFromTop: 50,
|
52
|
-
resizeDuration: 700,
|
53
|
-
showImageNumberLabel: true,
|
54
|
-
wrapAround: false,
|
55
|
-
disableScrolling: false,
|
56
|
-
/*
|
57
|
-
Sanitize Title
|
58
|
-
If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
|
59
|
-
This will free you to add html tags, such as links, in the caption.
|
60
|
-
|
61
|
-
If the caption data is user submitted or from some other untrusted source, then set this to true
|
62
|
-
to prevent xss and other injection attacks.
|
63
|
-
*/
|
64
|
-
sanitizeTitle: false
|
65
|
-
};
|
66
|
-
|
67
|
-
Lightbox.prototype.option = function(options) {
|
68
|
-
$.extend(this.options, options);
|
69
|
-
};
|
70
|
-
|
71
|
-
Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) {
|
72
|
-
return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
|
73
|
-
};
|
74
|
-
|
75
|
-
Lightbox.prototype.init = function() {
|
76
|
-
var self = this;
|
77
|
-
// Both enable and build methods require the body tag to be in the DOM.
|
78
|
-
$(document).ready(function() {
|
79
|
-
self.enable();
|
80
|
-
self.build();
|
81
|
-
});
|
82
|
-
};
|
83
|
-
|
84
|
-
// Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
|
85
|
-
// that contain 'lightbox'. When these are clicked, start lightbox.
|
86
|
-
Lightbox.prototype.enable = function() {
|
87
|
-
var self = this;
|
88
|
-
$('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
|
89
|
-
self.start($(event.currentTarget));
|
90
|
-
return false;
|
91
|
-
});
|
92
|
-
};
|
93
|
-
|
94
|
-
// Build html for the lightbox and the overlay.
|
95
|
-
// Attach event handlers to the new DOM elements. click click click
|
96
|
-
Lightbox.prototype.build = function() {
|
97
|
-
var self = this;
|
98
|
-
$('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
|
99
|
-
|
100
|
-
// Cache jQuery objects
|
101
|
-
this.$lightbox = $('#lightbox');
|
102
|
-
this.$overlay = $('#lightboxOverlay');
|
103
|
-
this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
|
104
|
-
this.$container = this.$lightbox.find('.lb-container');
|
105
|
-
this.$image = this.$lightbox.find('.lb-image');
|
106
|
-
this.$nav = this.$lightbox.find('.lb-nav');
|
107
|
-
|
108
|
-
// Store css values for future lookup
|
109
|
-
this.containerPadding = {
|
110
|
-
top: parseInt(this.$container.css('padding-top'), 10),
|
111
|
-
right: parseInt(this.$container.css('padding-right'), 10),
|
112
|
-
bottom: parseInt(this.$container.css('padding-bottom'), 10),
|
113
|
-
left: parseInt(this.$container.css('padding-left'), 10)
|
114
|
-
};
|
115
|
-
|
116
|
-
this.imageBorderWidth = {
|
117
|
-
top: parseInt(this.$image.css('border-top-width'), 10),
|
118
|
-
right: parseInt(this.$image.css('border-right-width'), 10),
|
119
|
-
bottom: parseInt(this.$image.css('border-bottom-width'), 10),
|
120
|
-
left: parseInt(this.$image.css('border-left-width'), 10)
|
121
|
-
};
|
122
|
-
|
123
|
-
// Attach event handlers to the newly minted DOM elements
|
124
|
-
this.$overlay.hide().on('click', function() {
|
125
|
-
self.end();
|
126
|
-
return false;
|
127
|
-
});
|
128
|
-
|
129
|
-
this.$lightbox.hide().on('click', function(event) {
|
130
|
-
if ($(event.target).attr('id') === 'lightbox') {
|
131
|
-
self.end();
|
132
|
-
}
|
133
|
-
return false;
|
134
|
-
});
|
135
|
-
|
136
|
-
this.$outerContainer.on('click', function(event) {
|
137
|
-
if ($(event.target).attr('id') === 'lightbox') {
|
138
|
-
self.end();
|
139
|
-
}
|
140
|
-
return false;
|
141
|
-
});
|
142
|
-
|
143
|
-
this.$lightbox.find('.lb-prev').on('click', function() {
|
144
|
-
if (self.currentImageIndex === 0) {
|
145
|
-
self.changeImage(self.album.length - 1);
|
146
|
-
} else {
|
147
|
-
self.changeImage(self.currentImageIndex - 1);
|
148
|
-
}
|
149
|
-
return false;
|
150
|
-
});
|
151
|
-
|
152
|
-
this.$lightbox.find('.lb-next').on('click', function() {
|
153
|
-
if (self.currentImageIndex === self.album.length - 1) {
|
154
|
-
self.changeImage(0);
|
155
|
-
} else {
|
156
|
-
self.changeImage(self.currentImageIndex + 1);
|
157
|
-
}
|
158
|
-
return false;
|
159
|
-
});
|
160
|
-
|
161
|
-
/*
|
162
|
-
Show context menu for image on right-click
|
163
|
-
|
164
|
-
There is a div containing the navigation that spans the entire image and lives above of it. If
|
165
|
-
you right-click, you are right clicking this div and not the image. This prevents users from
|
166
|
-
saving the image or using other context menu actions with the image.
|
167
|
-
|
168
|
-
To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
|
169
|
-
set pointer-events to none on the nav div. This is so that the upcoming right-click event on
|
170
|
-
the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
|
171
|
-
we set the pointer events back to auto for the nav div so it can capture hover and left-click
|
172
|
-
events as usual.
|
173
|
-
*/
|
174
|
-
this.$nav.on('mousedown', function(event) {
|
175
|
-
if (event.which === 3) {
|
176
|
-
self.$nav.css('pointer-events', 'none');
|
177
|
-
|
178
|
-
self.$lightbox.one('contextmenu', function() {
|
179
|
-
setTimeout(function() {
|
180
|
-
this.$nav.css('pointer-events', 'auto');
|
181
|
-
}.bind(self), 0);
|
182
|
-
});
|
183
|
-
}
|
184
|
-
});
|
185
|
-
|
186
|
-
|
187
|
-
this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
|
188
|
-
self.end();
|
189
|
-
return false;
|
190
|
-
});
|
191
|
-
};
|
192
|
-
|
193
|
-
// Show overlay and lightbox. If the image is part of a set, add siblings to album array.
|
194
|
-
Lightbox.prototype.start = function($link) {
|
195
|
-
var self = this;
|
196
|
-
var $window = $(window);
|
197
|
-
|
198
|
-
$window.on('resize', $.proxy(this.sizeOverlay, this));
|
199
|
-
|
200
|
-
$('select, object, embed').css({
|
201
|
-
visibility: 'hidden'
|
202
|
-
});
|
203
|
-
|
204
|
-
this.sizeOverlay();
|
205
|
-
|
206
|
-
this.album = [];
|
207
|
-
var imageNumber = 0;
|
208
|
-
|
209
|
-
function addToAlbum($link) {
|
210
|
-
self.album.push({
|
211
|
-
link: $link.attr('href'),
|
212
|
-
title: $link.attr('data-title') || $link.attr('title')
|
213
|
-
});
|
214
|
-
}
|
215
|
-
|
216
|
-
// Support both data-lightbox attribute and rel attribute implementations
|
217
|
-
var dataLightboxValue = $link.attr('data-lightbox');
|
218
|
-
var $links;
|
219
|
-
|
220
|
-
if (dataLightboxValue) {
|
221
|
-
$links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
|
222
|
-
for (var i = 0; i < $links.length; i = ++i) {
|
223
|
-
addToAlbum($($links[i]));
|
224
|
-
if ($links[i] === $link[0]) {
|
225
|
-
imageNumber = i;
|
226
|
-
}
|
227
|
-
}
|
228
|
-
} else {
|
229
|
-
if ($link.attr('rel') === 'lightbox') {
|
230
|
-
// If image is not part of a set
|
231
|
-
addToAlbum($link);
|
232
|
-
} else {
|
233
|
-
// If image is part of a set
|
234
|
-
$links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
|
235
|
-
for (var j = 0; j < $links.length; j = ++j) {
|
236
|
-
addToAlbum($($links[j]));
|
237
|
-
if ($links[j] === $link[0]) {
|
238
|
-
imageNumber = j;
|
239
|
-
}
|
240
|
-
}
|
241
|
-
}
|
242
|
-
}
|
243
|
-
|
244
|
-
// Position Lightbox
|
245
|
-
var top = $window.scrollTop() + this.options.positionFromTop;
|
246
|
-
var left = $window.scrollLeft();
|
247
|
-
this.$lightbox.css({
|
248
|
-
top: top + 'px',
|
249
|
-
left: left + 'px'
|
250
|
-
}).fadeIn(this.options.fadeDuration);
|
251
|
-
|
252
|
-
// Disable scrolling of the page while open
|
253
|
-
if (this.options.disableScrolling) {
|
254
|
-
$('body').addClass('lb-disable-scrolling');
|
255
|
-
}
|
256
|
-
|
257
|
-
this.changeImage(imageNumber);
|
258
|
-
};
|
259
|
-
|
260
|
-
// Hide most UI elements in preparation for the animated resizing of the lightbox.
|
261
|
-
Lightbox.prototype.changeImage = function(imageNumber) {
|
262
|
-
var self = this;
|
263
|
-
|
264
|
-
this.disableKeyboardNav();
|
265
|
-
var $image = this.$lightbox.find('.lb-image');
|
266
|
-
|
267
|
-
this.$overlay.fadeIn(this.options.fadeDuration);
|
268
|
-
|
269
|
-
$('.lb-loader').fadeIn('slow');
|
270
|
-
this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
|
271
|
-
|
272
|
-
this.$outerContainer.addClass('animating');
|
273
|
-
|
274
|
-
// When image to show is preloaded, we send the width and height to sizeContainer()
|
275
|
-
var preloader = new Image();
|
276
|
-
preloader.onload = function() {
|
277
|
-
var $preloader;
|
278
|
-
var imageHeight;
|
279
|
-
var imageWidth;
|
280
|
-
var maxImageHeight;
|
281
|
-
var maxImageWidth;
|
282
|
-
var windowHeight;
|
283
|
-
var windowWidth;
|
284
|
-
|
285
|
-
$image.attr('src', self.album[imageNumber].link);
|
286
|
-
|
287
|
-
$preloader = $(preloader);
|
288
|
-
|
289
|
-
$image.width(preloader.width);
|
290
|
-
$image.height(preloader.height);
|
291
|
-
|
292
|
-
if (self.options.fitImagesInViewport) {
|
293
|
-
// Fit image inside the viewport.
|
294
|
-
// Take into account the border around the image and an additional 10px gutter on each side.
|
295
|
-
|
296
|
-
windowWidth = $(window).width();
|
297
|
-
windowHeight = $(window).height();
|
298
|
-
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
|
299
|
-
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120;
|
300
|
-
|
301
|
-
// Check if image size is larger then maxWidth|maxHeight in settings
|
302
|
-
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
|
303
|
-
maxImageWidth = self.options.maxWidth;
|
304
|
-
}
|
305
|
-
if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
|
306
|
-
maxImageHeight = self.options.maxHeight;
|
307
|
-
}
|
308
|
-
|
309
|
-
// Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
|
310
|
-
// option than we need to size down while maintaining the aspect ratio.
|
311
|
-
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
|
312
|
-
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
|
313
|
-
imageWidth = maxImageWidth;
|
314
|
-
imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
|
315
|
-
$image.width(imageWidth);
|
316
|
-
$image.height(imageHeight);
|
317
|
-
} else {
|
318
|
-
imageHeight = maxImageHeight;
|
319
|
-
imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
|
320
|
-
$image.width(imageWidth);
|
321
|
-
$image.height(imageHeight);
|
322
|
-
}
|
323
|
-
}
|
324
|
-
}
|
325
|
-
self.sizeContainer($image.width(), $image.height());
|
326
|
-
};
|
327
|
-
|
328
|
-
preloader.src = this.album[imageNumber].link;
|
329
|
-
this.currentImageIndex = imageNumber;
|
330
|
-
};
|
331
|
-
|
332
|
-
// Stretch overlay to fit the viewport
|
333
|
-
Lightbox.prototype.sizeOverlay = function() {
|
334
|
-
this.$overlay
|
335
|
-
.width($(document).width())
|
336
|
-
.height($(document).height());
|
337
|
-
};
|
338
|
-
|
339
|
-
// Animate the size of the lightbox to fit the image we are showing
|
340
|
-
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
|
341
|
-
var self = this;
|
342
|
-
|
343
|
-
var oldWidth = this.$outerContainer.outerWidth();
|
344
|
-
var oldHeight = this.$outerContainer.outerHeight();
|
345
|
-
var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
|
346
|
-
var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
|
347
|
-
|
348
|
-
function postResize() {
|
349
|
-
self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
350
|
-
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
351
|
-
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
352
|
-
self.showImage();
|
353
|
-
}
|
354
|
-
|
355
|
-
if (oldWidth !== newWidth || oldHeight !== newHeight) {
|
356
|
-
this.$outerContainer.animate({
|
357
|
-
width: newWidth,
|
358
|
-
height: newHeight
|
359
|
-
}, this.options.resizeDuration, 'swing', function() {
|
360
|
-
postResize();
|
361
|
-
});
|
362
|
-
} else {
|
363
|
-
postResize();
|
364
|
-
}
|
365
|
-
};
|
366
|
-
|
367
|
-
// Display the image and its details and begin preload neighboring images.
|
368
|
-
Lightbox.prototype.showImage = function() {
|
369
|
-
this.$lightbox.find('.lb-loader').stop(true).hide();
|
370
|
-
this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
|
371
|
-
|
372
|
-
this.updateNav();
|
373
|
-
this.updateDetails();
|
374
|
-
this.preloadNeighboringImages();
|
375
|
-
this.enableKeyboardNav();
|
376
|
-
};
|
377
|
-
|
378
|
-
// Display previous and next navigation if appropriate.
|
379
|
-
Lightbox.prototype.updateNav = function() {
|
380
|
-
// Check to see if the browser supports touch events. If so, we take the conservative approach
|
381
|
-
// and assume that mouse hover events are not supported and always show prev/next navigation
|
382
|
-
// arrows in image sets.
|
383
|
-
var alwaysShowNav = false;
|
384
|
-
try {
|
385
|
-
document.createEvent('TouchEvent');
|
386
|
-
alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
|
387
|
-
} catch (e) {}
|
388
|
-
|
389
|
-
this.$lightbox.find('.lb-nav').show();
|
390
|
-
|
391
|
-
if (this.album.length > 1) {
|
392
|
-
if (this.options.wrapAround) {
|
393
|
-
if (alwaysShowNav) {
|
394
|
-
this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
|
395
|
-
}
|
396
|
-
this.$lightbox.find('.lb-prev, .lb-next').show();
|
397
|
-
} else {
|
398
|
-
if (this.currentImageIndex > 0) {
|
399
|
-
this.$lightbox.find('.lb-prev').show();
|
400
|
-
if (alwaysShowNav) {
|
401
|
-
this.$lightbox.find('.lb-prev').css('opacity', '1');
|
402
|
-
}
|
403
|
-
}
|
404
|
-
if (this.currentImageIndex < this.album.length - 1) {
|
405
|
-
this.$lightbox.find('.lb-next').show();
|
406
|
-
if (alwaysShowNav) {
|
407
|
-
this.$lightbox.find('.lb-next').css('opacity', '1');
|
408
|
-
}
|
409
|
-
}
|
410
|
-
}
|
411
|
-
}
|
412
|
-
};
|
413
|
-
|
414
|
-
// Display caption, image number, and closing button.
|
415
|
-
Lightbox.prototype.updateDetails = function() {
|
416
|
-
var self = this;
|
417
|
-
|
418
|
-
// Enable anchor clicks in the injected caption html.
|
419
|
-
// Thanks Nate Wright for the fix. @https://github.com/NateWr
|
420
|
-
if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
|
421
|
-
this.album[this.currentImageIndex].title !== '') {
|
422
|
-
var $caption = this.$lightbox.find('.lb-caption');
|
423
|
-
if (this.options.sanitizeTitle) {
|
424
|
-
$caption.text(this.album[this.currentImageIndex].title);
|
425
|
-
} else {
|
426
|
-
$caption.html(this.album[this.currentImageIndex].title);
|
427
|
-
}
|
428
|
-
$caption.fadeIn('fast')
|
429
|
-
.find('a').on('click', function(event) {
|
430
|
-
if ($(this).attr('target') !== undefined) {
|
431
|
-
window.open($(this).attr('href'), $(this).attr('target'));
|
432
|
-
} else {
|
433
|
-
location.href = $(this).attr('href');
|
434
|
-
}
|
435
|
-
});
|
436
|
-
}
|
437
|
-
|
438
|
-
if (this.album.length > 1 && this.options.showImageNumberLabel) {
|
439
|
-
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
|
440
|
-
this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
441
|
-
} else {
|
442
|
-
this.$lightbox.find('.lb-number').hide();
|
443
|
-
}
|
444
|
-
|
445
|
-
this.$outerContainer.removeClass('animating');
|
446
|
-
|
447
|
-
this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
|
448
|
-
return self.sizeOverlay();
|
449
|
-
});
|
450
|
-
};
|
451
|
-
|
452
|
-
// Preload previous and next images in set.
|
453
|
-
Lightbox.prototype.preloadNeighboringImages = function() {
|
454
|
-
if (this.album.length > this.currentImageIndex + 1) {
|
455
|
-
var preloadNext = new Image();
|
456
|
-
preloadNext.src = this.album[this.currentImageIndex + 1].link;
|
457
|
-
}
|
458
|
-
if (this.currentImageIndex > 0) {
|
459
|
-
var preloadPrev = new Image();
|
460
|
-
preloadPrev.src = this.album[this.currentImageIndex - 1].link;
|
461
|
-
}
|
462
|
-
};
|
463
|
-
|
464
|
-
Lightbox.prototype.enableKeyboardNav = function() {
|
465
|
-
$(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
466
|
-
};
|
467
|
-
|
468
|
-
Lightbox.prototype.disableKeyboardNav = function() {
|
469
|
-
$(document).off('.keyboard');
|
470
|
-
};
|
471
|
-
|
472
|
-
Lightbox.prototype.keyboardAction = function(event) {
|
473
|
-
var KEYCODE_ESC = 27;
|
474
|
-
var KEYCODE_LEFTARROW = 37;
|
475
|
-
var KEYCODE_RIGHTARROW = 39;
|
476
|
-
|
477
|
-
var keycode = event.keyCode;
|
478
|
-
var key = String.fromCharCode(keycode).toLowerCase();
|
479
|
-
if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
|
480
|
-
this.end();
|
481
|
-
} else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
|
482
|
-
if (this.currentImageIndex !== 0) {
|
483
|
-
this.changeImage(this.currentImageIndex - 1);
|
484
|
-
} else if (this.options.wrapAround && this.album.length > 1) {
|
485
|
-
this.changeImage(this.album.length - 1);
|
486
|
-
}
|
487
|
-
} else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
|
488
|
-
if (this.currentImageIndex !== this.album.length - 1) {
|
489
|
-
this.changeImage(this.currentImageIndex + 1);
|
490
|
-
} else if (this.options.wrapAround && this.album.length > 1) {
|
491
|
-
this.changeImage(0);
|
492
|
-
}
|
493
|
-
}
|
494
|
-
};
|
495
|
-
|
496
|
-
// Closing time. :-(
|
497
|
-
Lightbox.prototype.end = function() {
|
498
|
-
this.disableKeyboardNav();
|
499
|
-
$(window).off('resize', this.sizeOverlay);
|
500
|
-
this.$lightbox.fadeOut(this.options.fadeDuration);
|
501
|
-
this.$overlay.fadeOut(this.options.fadeDuration);
|
502
|
-
$('select, object, embed').css({
|
503
|
-
visibility: 'visible'
|
504
|
-
});
|
505
|
-
if (this.options.disableScrolling) {
|
506
|
-
$('body').removeClass('lb-disable-scrolling');
|
507
|
-
}
|
508
|
-
};
|
509
|
-
|
510
|
-
return new Lightbox();
|
511
|
-
}));
|
512
|
-
|
513
|
-
|
514
|
-
$(document).ready(function(){
|
515
|
-
lightbox.option({
|
516
|
-
'disableScrolling': true,
|
517
|
-
'albumLabel': ''
|
518
|
-
})
|
519
|
-
});
|
@@ -1,35 +0,0 @@
|
|
1
|
-
/*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
|
2
|
-
! function(e) {
|
3
|
-
"use strict";
|
4
|
-
var n = function(n, t, o) {
|
5
|
-
function i(e) {
|
6
|
-
return a.body ? e() : void setTimeout(function() {
|
7
|
-
i(e)
|
8
|
-
})
|
9
|
-
}
|
10
|
-
|
11
|
-
function r() {
|
12
|
-
l.addEventListener && l.removeEventListener("load", r), l.media = o || "all"
|
13
|
-
}
|
14
|
-
var d, a = e.document,
|
15
|
-
l = a.createElement("link");
|
16
|
-
if (t) d = t;
|
17
|
-
else {
|
18
|
-
var s = (a.body || a.getElementsByTagName("head")[0]).childNodes;
|
19
|
-
d = s[s.length - 1]
|
20
|
-
}
|
21
|
-
var f = a.styleSheets;
|
22
|
-
l.rel = "stylesheet", l.href = n, l.media = "only x", i(function() {
|
23
|
-
d.parentNode.insertBefore(l, t ? d : d.nextSibling)
|
24
|
-
});
|
25
|
-
var u = function(e) {
|
26
|
-
for (var n = l.href, t = f.length; t--;)
|
27
|
-
if (f[t].href === n) return e();
|
28
|
-
setTimeout(function() {
|
29
|
-
u(e)
|
30
|
-
})
|
31
|
-
};
|
32
|
-
return l.addEventListener && l.addEventListener("load", r), l.onloadcssdefined = u, u(r), l
|
33
|
-
};
|
34
|
-
"undefined" != typeof exports ? exports.loadCSS = n : e.loadCSS = n
|
35
|
-
}("undefined" != typeof global ? global : this);
|
@@ -1,2 +0,0 @@
|
|
1
|
-
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
|
2
|
-
!function(a){"use strict";var b=function(b,c,d){function e(a){return h.body?a():void setTimeout(function(){e(a)})}function f(){i.addEventListener&&i.removeEventListener("load",f),i.media=d||"all"}var g,h=a.document,i=h.createElement("link");if(c)g=c;else{var j=(h.body||h.getElementsByTagName("head")[0]).childNodes;g=j[j.length-1]}var k=h.styleSheets;i.rel="stylesheet",i.href=b,i.media="only x",e(function(){g.parentNode.insertBefore(i,c?g:g.nextSibling)});var l=function(a){for(var b=i.href,c=k.length;c--;)if(k[c].href===b)return a();setTimeout(function(){l(a)})};return i.addEventListener&&i.addEventListener("load",f),i.onloadcssdefined=l,l(f),i};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this);
|