jekyll-theme-artsy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/css/bootstrap.min.css +8143 -0
- data/css/galleries.css +150 -0
- data/css/home.css +151 -0
- data/css/journal.css +235 -0
- data/css/magnificpopup.css +352 -0
- data/css/main.css +856 -0
- data/css/selena.css +50 -0
- data/css/super-search.css +110 -0
- data/css/tags-wrap.css +35 -0
- data/img/404.jpg +0 -0
- data/img/about-bg.jpg +0 -0
- data/img/add-to-cart.png +0 -0
- data/img/archive-bg.jpg +0 -0
- data/img/avatar.png +0 -0
- data/img/bookbutton.png +0 -0
- data/img/cart-empty.png +0 -0
- data/img/cart-full.png +0 -0
- data/img/donate.png +0 -0
- data/img/gallery-bg.jpg +0 -0
- data/img/journal/post01.jpg +0 -0
- data/img/journal/post02.jpg +0 -0
- data/img/journal/post03.jpg +0 -0
- data/img/left-arrow.svg +36 -0
- data/img/lightbox/close.png +0 -0
- data/img/lightbox/loading.gif +0 -0
- data/img/lightbox/next.png +0 -0
- data/img/lightbox/prev.png +0 -0
- data/img/loading.gif +0 -0
- data/img/logo.png +0 -0
- data/img/misc-bg.jpg +0 -0
- data/img/postcover/pc001.jpg +0 -0
- data/img/postcover/pc002.jpg +0 -0
- data/img/postcover/pc003.jpg +0 -0
- data/img/postcover/pc004.jpg +0 -0
- data/img/postcover/pc005.jpg +0 -0
- data/img/postcover/pc006.jpg +0 -0
- data/img/postcover/pc007.jpg +0 -0
- data/img/postcover/pc008.jpg +0 -0
- data/img/right-arrow.svg +36 -0
- data/img/siteicon.png +0 -0
- data/img/watermark-1900x1900-alt.png +0 -0
- data/img/watermark-1900x1900.png +0 -0
- data/img/watermark-800x800.png +0 -0
- data/img/writing-bg.jpg +0 -0
- data/js/dripload.js +37 -0
- data/js/fullcart.js +22 -0
- data/js/isotope.pkgd.min.js +8 -0
- data/js/jquery.cycle.min.js +1 -0
- data/js/jquery.isotope.min.js +13 -0
- data/js/jquery.lazylinepainter.min.js +17 -0
- data/js/jquery.magnific-popup.js +1861 -0
- data/js/jquery.mousewheel.min.js +8 -0
- data/js/jquery.tinycarousel.min.js +7 -0
- data/js/kenburns.min.js +6 -0
- data/js/main.min.js +588 -0
- data/js/modernizr.js +2 -0
- data/js/owlcarousel/.gitattributes +5 -0
- data/js/owlcarousel/.gitignore +18 -0
- data/js/owlcarousel/.travis.yml +14 -0
- data/js/owlcarousel/CONTRIBUTING.md +88 -0
- data/js/owlcarousel/Gruntfile.js +320 -0
- data/js/owlcarousel/ISSUE_TEMPLATE.md +14 -0
- data/js/owlcarousel/LICENSE +23 -0
- data/js/owlcarousel/README.md +122 -0
- data/js/owlcarousel/ROADMAP.md +57 -0
- data/js/owlcarousel/_config.json +30 -0
- data/js/owlcarousel/bower.json +13 -0
- data/js/owlcarousel/dist/LICENSE +23 -0
- data/js/owlcarousel/dist/README.md +122 -0
- data/js/owlcarousel/dist/assets/ajax-loader.gif +0 -0
- data/js/owlcarousel/dist/assets/owl.carousel.css +186 -0
- data/js/owlcarousel/dist/assets/owl.carousel.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.theme.default.css +50 -0
- data/js/owlcarousel/dist/assets/owl.theme.default.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.theme.green.css +50 -0
- data/js/owlcarousel/dist/assets/owl.theme.green.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.video.play.png +0 -0
- data/js/owlcarousel/dist/owl.carousel.js +3448 -0
- data/js/owlcarousel/dist/owl.carousel.min.js +7 -0
- data/js/owlcarousel/docs/assets/css/animate.css +3303 -0
- data/js/owlcarousel/docs/assets/css/docs.theme.min.css +1 -0
- data/js/owlcarousel/docs/assets/img/bird_blue_32.png +0 -0
- data/js/owlcarousel/docs/assets/img/download.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-drag.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-modern.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-module.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-options.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-responsive.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-zombie.png +0 -0
- data/js/owlcarousel/docs/assets/img/owl-logo.png +0 -0
- data/js/owlcarousel/docs/assets/img/twitter_25.png +0 -0
- data/js/owlcarousel/docs/assets/js/app.js +32 -0
- data/js/owlcarousel/docs/assets/js/foundation.min.js +3 -0
- data/js/owlcarousel/docs/assets/owlcarousel/README.md +122 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/ajax-loader.gif +0 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.carousel.css +186 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.carousel.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.default.css +50 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.default.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.green.css +50 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.green.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.video.play.png +0 -0
- data/js/owlcarousel/docs/assets/owlcarousel/owl.carousel.js +3448 -0
- data/js/owlcarousel/docs/assets/owlcarousel/owl.carousel.min.js +7 -0
- data/js/owlcarousel/docs/assets/vendors/foundation.min.js +3 -0
- data/js/owlcarousel/docs/assets/vendors/highlight.js +1 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.min.js +2 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.min.map +1 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.mousewheel.min.js +8 -0
- data/js/owlcarousel/docs/demos/animate.html +272 -0
- data/js/owlcarousel/docs/demos/autoheight.html +165 -0
- data/js/owlcarousel/docs/demos/autoplay.html +186 -0
- data/js/owlcarousel/docs/demos/autowidth.html +185 -0
- data/js/owlcarousel/docs/demos/basic.html +199 -0
- data/js/owlcarousel/docs/demos/center.html +239 -0
- data/js/owlcarousel/docs/demos/demos.html +198 -0
- data/js/owlcarousel/docs/demos/events.html +207 -0
- data/js/owlcarousel/docs/demos/lazyLoad.html +165 -0
- data/js/owlcarousel/docs/demos/merge.html +202 -0
- data/js/owlcarousel/docs/demos/mousewheel.html +209 -0
- data/js/owlcarousel/docs/demos/responsive.html +297 -0
- data/js/owlcarousel/docs/demos/rtl.html +202 -0
- data/js/owlcarousel/docs/demos/stagepadding.html +202 -0
- data/js/owlcarousel/docs/demos/test.html +144 -0
- data/js/owlcarousel/docs/demos/urlhashnav.html +190 -0
- data/js/owlcarousel/docs/demos/video.html +189 -0
- data/js/owlcarousel/docs/docs/api-classes.html +227 -0
- data/js/owlcarousel/docs/docs/api-events.html +358 -0
- data/js/owlcarousel/docs/docs/api-options.html +395 -0
- data/js/owlcarousel/docs/docs/dev-buildin-plugins.html +157 -0
- data/js/owlcarousel/docs/docs/dev-external.html +151 -0
- data/js/owlcarousel/docs/docs/dev-plugin-api.html +160 -0
- data/js/owlcarousel/docs/docs/dev-styles.html +171 -0
- data/js/owlcarousel/docs/docs/started-faq.html +162 -0
- data/js/owlcarousel/docs/docs/started-installation.html +173 -0
- data/js/owlcarousel/docs/docs/started-welcome.html +196 -0
- data/js/owlcarousel/docs/docs/support-changelog.html +169 -0
- data/js/owlcarousel/docs/docs/support-contact.html +140 -0
- data/js/owlcarousel/docs/docs/support-contributing.html +162 -0
- data/js/owlcarousel/docs/index.html +239 -0
- data/js/owlcarousel/package-lock.json +6169 -0
- data/js/owlcarousel/package.json +57 -0
- data/js/owlcarousel/src/img/ajax-loader.gif +0 -0
- data/js/owlcarousel/src/img/owl.video.play.png +0 -0
- data/js/owlcarousel/src/js/.jscsrc +47 -0
- data/js/owlcarousel/src/js/.jshintrc +13 -0
- data/js/owlcarousel/src/js/owl.animate.js +121 -0
- data/js/owlcarousel/src/js/owl.autoheight.js +132 -0
- data/js/owlcarousel/src/js/owl.autoplay.js +233 -0
- data/js/owlcarousel/src/js/owl.autorefresh.js +111 -0
- data/js/owlcarousel/src/js/owl.carousel.js +1750 -0
- data/js/owlcarousel/src/js/owl.hash.js +122 -0
- data/js/owlcarousel/src/js/owl.lazyload.js +149 -0
- data/js/owlcarousel/src/js/owl.navigation.js +406 -0
- data/js/owlcarousel/src/js/owl.support.js +83 -0
- data/js/owlcarousel/src/js/owl.support.modernizr.js +66 -0
- data/js/owlcarousel/src/js/owl.video.js +327 -0
- data/js/owlcarousel/src/scss/_animate.scss +28 -0
- data/js/owlcarousel/src/scss/_autoheight.scss +7 -0
- data/js/owlcarousel/src/scss/_core.scss +126 -0
- data/js/owlcarousel/src/scss/_lazyload.scss +25 -0
- data/js/owlcarousel/src/scss/_theme.default.scss +30 -0
- data/js/owlcarousel/src/scss/_theme.green.scss +30 -0
- data/js/owlcarousel/src/scss/_theme.scss +64 -0
- data/js/owlcarousel/src/scss/_video.scss +53 -0
- data/js/owlcarousel/src/scss/owl.carousel.scss +5 -0
- data/js/owlcarousel/src/scss/owl.theme.default.scss +1 -0
- data/js/owlcarousel/src/scss/owl.theme.green.scss +1 -0
- data/js/owlcarousel/test/index.html +32 -0
- data/js/owlcarousel/test/unit/autoplay.js +86 -0
- data/js/owlcarousel/test/unit/core.js +140 -0
- data/js/retina.min.js +10 -0
- data/js/scripts.js +204 -0
- data/js/super-search.js +136 -0
- data/js/zepto.min.js +2 -0
- metadata +176 -1
@@ -0,0 +1,140 @@
|
|
1
|
+
module('Core tests');
|
2
|
+
|
3
|
+
test('replace with loop', function() {
|
4
|
+
expect(1);
|
5
|
+
before_and_after_replace({ loop: true });
|
6
|
+
});
|
7
|
+
|
8
|
+
test('replace without loop', function() {
|
9
|
+
expect(1);
|
10
|
+
before_and_after_replace({ loop: false });
|
11
|
+
});
|
12
|
+
|
13
|
+
function before_and_after_replace(options) {
|
14
|
+
var simple = $('#simple'),
|
15
|
+
replacement = simple.html(),
|
16
|
+
expected = null;
|
17
|
+
|
18
|
+
simple.owlCarousel(options);
|
19
|
+
|
20
|
+
expected = simple.html();
|
21
|
+
|
22
|
+
simple.trigger('replace.owl.carousel', [ replacement ]);
|
23
|
+
simple.trigger('refresh.owl.carousel');
|
24
|
+
|
25
|
+
equal(simple.html(), expected, 'Inner HTML before and after replace equals.');
|
26
|
+
}
|
27
|
+
|
28
|
+
test('remove with loop', function() {
|
29
|
+
expect(3);
|
30
|
+
|
31
|
+
before_and_after_remove({ loop: true });
|
32
|
+
});
|
33
|
+
|
34
|
+
test('remove without loop', function() {
|
35
|
+
expect(3);
|
36
|
+
|
37
|
+
before_and_after_remove({ loop: false });
|
38
|
+
});
|
39
|
+
|
40
|
+
function before_and_after_remove(options) {
|
41
|
+
var simple = $('#simple'),
|
42
|
+
one = simple.clone().removeAttr('id').insertAfter('#simple'),
|
43
|
+
two = one.clone().insertAfter(one),
|
44
|
+
all = two.clone().insertAfter(two);
|
45
|
+
|
46
|
+
one.children(':eq(0)').remove();
|
47
|
+
two.children(':eq(0),:eq(2)').remove();
|
48
|
+
all.children().remove();
|
49
|
+
|
50
|
+
simple.owlCarousel(options);
|
51
|
+
one.owlCarousel(options);
|
52
|
+
two.owlCarousel(options);
|
53
|
+
all.owlCarousel(options);
|
54
|
+
|
55
|
+
simple.trigger('remove.owl.carousel', [ 0 ]);
|
56
|
+
simple.trigger('refresh.owl.carousel');
|
57
|
+
|
58
|
+
equal(simple.html(), one.html(), 'Inner HTML before and after remove one equals.');
|
59
|
+
|
60
|
+
simple.trigger('remove.owl.carousel', [ 1 ]);
|
61
|
+
simple.trigger('refresh.owl.carousel');
|
62
|
+
|
63
|
+
equal(simple.html(), two.html(), 'Inner HTML before and after remove two equals.');
|
64
|
+
|
65
|
+
simple.trigger('remove.owl.carousel', [ 0 ]);
|
66
|
+
simple.trigger('refresh.owl.carousel');
|
67
|
+
|
68
|
+
equal(simple.html(), all.html(), 'Inner HTML before and after remove all equals.');
|
69
|
+
}
|
70
|
+
|
71
|
+
test('remove and add with loop', function() {
|
72
|
+
expect(1);
|
73
|
+
|
74
|
+
before_and_after_remove_add({ loop: true });
|
75
|
+
});
|
76
|
+
|
77
|
+
test('remove and add without loop', function() {
|
78
|
+
expect(1);
|
79
|
+
|
80
|
+
before_and_after_remove_add({ loop: false });
|
81
|
+
});
|
82
|
+
|
83
|
+
function before_and_after_remove_add(options) {
|
84
|
+
var simple = $('#simple'),
|
85
|
+
simpleClone = $('#simple').clone().removeAttr('id').insertAfter('#simple');
|
86
|
+
|
87
|
+
//move the text along as 'add' adds the new element to the add as expected.
|
88
|
+
simpleClone.children(':eq(0)').text('2');
|
89
|
+
simpleClone.children(':eq(1)').text('3');
|
90
|
+
simpleClone.children(':eq(2)').text('1');
|
91
|
+
|
92
|
+
simple.owlCarousel(options);
|
93
|
+
simpleClone.owlCarousel(options);
|
94
|
+
|
95
|
+
simple.trigger('remove.owl.carousel', [ 0 ]);
|
96
|
+
simple.trigger('add.owl.carousel', [ '<li>1</li>' ]);
|
97
|
+
simple.trigger('refresh.owl.carousel');
|
98
|
+
|
99
|
+
equal(simple.html(), simpleClone.html(), 'Inner HTML before and after `remove()` and `add()` equals.');
|
100
|
+
}
|
101
|
+
|
102
|
+
test('invalidate', function() {
|
103
|
+
expect(6);
|
104
|
+
|
105
|
+
var carousel = $('#simple').owlCarousel().data('owl.carousel');
|
106
|
+
|
107
|
+
deepEqual(carousel.invalidate(), [], 'No invalid parts after initializing.');
|
108
|
+
|
109
|
+
carousel.invalidate('first');
|
110
|
+
|
111
|
+
deepEqual(carousel.invalidate(), [ 'first' ], 'One invalid part after invalidating one.');
|
112
|
+
|
113
|
+
carousel.invalidate('second');
|
114
|
+
|
115
|
+
deepEqual(carousel.invalidate(), [ 'first', 'second' ], 'Two invalid parts after invalidating a second one.');
|
116
|
+
|
117
|
+
carousel.invalidate('second');
|
118
|
+
|
119
|
+
deepEqual(carousel.invalidate(), [ 'first', 'second' ], 'Two invalid parts after invalidating a part twice.');
|
120
|
+
|
121
|
+
carousel.update();
|
122
|
+
|
123
|
+
deepEqual(carousel.invalidate(), [], 'No invalid parts after updating.');
|
124
|
+
|
125
|
+
deepEqual(carousel.invalidate('first'), [ 'first' ], 'Invalidating one part returns it directly.');
|
126
|
+
});
|
127
|
+
|
128
|
+
test('destroy', function() {
|
129
|
+
expect(1);
|
130
|
+
|
131
|
+
var simple = $('#simple'),
|
132
|
+
expected = simple.get(0).outerHTML.replace(/\s{2,}/g, '');
|
133
|
+
|
134
|
+
simple.owlCarousel().owlCarousel('destroy');
|
135
|
+
|
136
|
+
equal(simple.get(0).outerHTML.replace(/\s{2,}/g, ''), expected, 'Outer HTML before create and after destroy is equal.');
|
137
|
+
});
|
138
|
+
|
139
|
+
start();
|
140
|
+
|
data/js/retina.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
/*!
|
2
|
+
* Retina.js v1.3.0
|
3
|
+
*
|
4
|
+
* Copyright 2014 Imulus, LLC
|
5
|
+
* Released under the MIT license
|
6
|
+
*
|
7
|
+
* Retina.js is an open source script that makes it easy to serve
|
8
|
+
* high-resolution images to devices with retina displays.
|
9
|
+
*/
|
10
|
+
!function(){function a(){}function b(a){return f.retinaImageSuffix+a}function c(a,c){if(this.path=a||"","undefined"!=typeof c&&null!==c)this.at_2x_path=c,this.perform_check=!1;else{if(void 0!==document.createElement){var d=document.createElement("a");d.href=this.path,d.pathname=d.pathname.replace(g,b),this.at_2x_path=d.href}else{var e=this.path.split("?");e[0]=e[0].replace(g,b),this.at_2x_path=e.join("?")}this.perform_check=!0}}function d(a){this.el=a,this.path=new c(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var b=this;this.path.check_2x_variant(function(a){a&&b.swap()})}var e="undefined"==typeof exports?window:exports,f={retinaImageSuffix:"@2x",check_mime_type:!0,force_original_dimensions:!0};e.Retina=a,a.configure=function(a){null===a&&(a={});for(var b in a)a.hasOwnProperty(b)&&(f[b]=a[b])},a.init=function(a){null===a&&(a=e);var b=a.onload||function(){};a.onload=function(){var a,c,e=document.getElementsByTagName("img"),f=[];for(a=0;a<e.length;a+=1)c=e[a],c.getAttributeNode("data-no-retina")||f.push(new d(c));b()}},a.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return e.devicePixelRatio>1?!0:e.matchMedia&&e.matchMedia(a).matches?!0:!1};var g=/\.\w+$/;e.RetinaImagePath=c,c.confirmed_paths=[],c.prototype.is_external=function(){return!(!this.path.match(/^https?\:/i)||this.path.match("//"+document.domain))},c.prototype.check_2x_variant=function(a){var b,d=this;return this.is_external()?a(!1):this.perform_check||"undefined"==typeof this.at_2x_path||null===this.at_2x_path?this.at_2x_path in c.confirmed_paths?a(!0):(b=new XMLHttpRequest,b.open("HEAD",this.at_2x_path),b.onreadystatechange=function(){if(4!==b.readyState)return a(!1);if(b.status>=200&&b.status<=399){if(f.check_mime_type){var e=b.getResponseHeader("Content-Type");if(null===e||!e.match(/^image/i))return a(!1)}return c.confirmed_paths.push(d.at_2x_path),a(!0)}return a(!1)},b.send(),void 0):a(!0)},e.RetinaImage=d,d.prototype.swap=function(a){function b(){c.el.complete?(f.force_original_dimensions&&(c.el.setAttribute("width",c.el.offsetWidth),c.el.setAttribute("height",c.el.offsetHeight)),c.el.setAttribute("src",a)):setTimeout(b,5)}"undefined"==typeof a&&(a=this.path.at_2x_path);var c=this;b()},a.isRetina()&&a.init(e)}();
|
data/js/scripts.js
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
(function( $ ){
|
2
|
+
|
3
|
+
// fullscreen gallery
|
4
|
+
var $fullscreen_gallery = jQuery('.fullscreen-gallery.gallery');
|
5
|
+
if ( $fullscreen_gallery.length > 0 ) {
|
6
|
+
|
7
|
+
if ( $fullscreen_gallery.find('.gallery-item').length > 1 ) { // if there are more than 1 image
|
8
|
+
|
9
|
+
if ( !$fullscreen_gallery.hasClass('kenburns-gallery') ) { // do not initialize if kenburns
|
10
|
+
jQuery('#footer').prepend('<nav id="gallerynav"><a href="#" class="thumbs"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> <rect width="5" height="5" x="0" y="0" /><rect width="5" height="5" x="8" y="0" /><rect width="5" height="5" x="0" y="8" /><rect width="5" height="5" x="8" y="8" /></svg></a><a href="#" class="prev"><</a> <a href="#" class="pause">▎▎</a> <a href="#" class="next">></a></nav>');
|
11
|
+
|
12
|
+
$fullscreen_gallery.before('<ul id="gallerythumbs">').cycle({
|
13
|
+
slideExpr: '.gallery-item',
|
14
|
+
fx: 'fade',
|
15
|
+
speed: 1000,
|
16
|
+
timeout: 5000,
|
17
|
+
pager: '#gallerythumbs',
|
18
|
+
slideResize: true,
|
19
|
+
containerResize: true,
|
20
|
+
width: '100%',
|
21
|
+
height: '100%',
|
22
|
+
fit: 1,
|
23
|
+
cleartypeNoBg : true,
|
24
|
+
pagerAnchorBuilder: function(idx, slide) {
|
25
|
+
return '<li><a href="#"><img src="' + jQuery(slide).find('img').attr('src') + '" alt="" /></a></li>';
|
26
|
+
},
|
27
|
+
prev: '#gallerynav .prev',
|
28
|
+
next: '#gallerynav .next'
|
29
|
+
});
|
30
|
+
var paused = false;
|
31
|
+
jQuery('#gallerynav .pause').on('click', function() {
|
32
|
+
if ( !paused ) {
|
33
|
+
$fullscreen_gallery.cycle('pause');
|
34
|
+
paused = true;
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
$fullscreen_gallery.cycle('resume');
|
38
|
+
paused = false;
|
39
|
+
}
|
40
|
+
jQuery(this).toggleClass('active');
|
41
|
+
});
|
42
|
+
// show/hide thumbs
|
43
|
+
var revealed = false;
|
44
|
+
jQuery('#gallerynav a.thumbs').on('click', function() { // if clicked on svg button
|
45
|
+
// show thumbs wrapper
|
46
|
+
jQuery('#gallerythumbs').toggleClass('reveal');
|
47
|
+
// show thumbs
|
48
|
+
if (!revealed) {
|
49
|
+
jQuery('body').addClass('gallerythumbsrevealed');
|
50
|
+
revealed = true;
|
51
|
+
}
|
52
|
+
// hide thumbs
|
53
|
+
else {
|
54
|
+
jQuery('body').removeClass('gallerythumbsrevealed');
|
55
|
+
revealed = false;
|
56
|
+
}
|
57
|
+
// pause cycling
|
58
|
+
$fullscreen_gallery.cycle('pause');
|
59
|
+
paused = true;
|
60
|
+
});
|
61
|
+
jQuery('#gallerythumbs').on('click', function() { // if clicked on a thumb (large image will be automatically shown) or somewhere else
|
62
|
+
// hide thumbs wrapper
|
63
|
+
jQuery('#gallerythumbs').toggleClass('reveal');
|
64
|
+
jQuery('body').removeClass('gallerythumbsrevealed');
|
65
|
+
// resume cycling
|
66
|
+
$fullscreen_gallery.cycle('resume');
|
67
|
+
paused = false;
|
68
|
+
revealed = false;
|
69
|
+
});
|
70
|
+
// scroll gallery thumbs with mousewheel
|
71
|
+
jQuery('#gallerythumbs').on('mousewheel', function(event) {
|
72
|
+
if (event.deltaY < 0) { // scroll right
|
73
|
+
jQuery('#gallerythumbs').stop().animate({scrollLeft: '+=180px' }, 300);
|
74
|
+
}
|
75
|
+
else {
|
76
|
+
jQuery('#gallerythumbs').stop().animate({scrollLeft: '-=180px' }, 300);
|
77
|
+
}
|
78
|
+
});
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
// kenburns on one featured image header image
|
86
|
+
var $kenburns = jQuery('.kenburns-gallery.gallery');
|
87
|
+
if ( $kenburns.length > 0 ) {
|
88
|
+
var gallery_set = [];
|
89
|
+
$kenburns.find('.gallery-icon img').each( function() {
|
90
|
+
gallery_set.push(jQuery(this).attr('src'));
|
91
|
+
});
|
92
|
+
|
93
|
+
jQuery('#kenburns').attr('width', jQuery(window).width());
|
94
|
+
jQuery('#kenburns').attr('height', jQuery(window).height());
|
95
|
+
jQuery('#kenburns').kenburns({
|
96
|
+
images: gallery_set,
|
97
|
+
frames_per_second: 30,
|
98
|
+
display_time: 5000,
|
99
|
+
fade_time: 1000,
|
100
|
+
zoom: 1.2,
|
101
|
+
background_color:'#F7F6F5'
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
/* ********* WINDOW LOAD ********** */
|
109
|
+
jQuery(window).load(function() {
|
110
|
+
|
111
|
+
// load screen
|
112
|
+
jQuery('.loadreveal').addClass('reveal');
|
113
|
+
jQuery('#loadscreen').stop().animate( { opacity: 0 }, 200, function() {
|
114
|
+
jQuery('body.home').removeClass('loading');
|
115
|
+
jQuery(this).hide();
|
116
|
+
});
|
117
|
+
|
118
|
+
|
119
|
+
// masonry gallery
|
120
|
+
var $masonry_gallery = jQuery('.masonry-gallery.gallery');
|
121
|
+
if ( $masonry_gallery.length > 0 ) {
|
122
|
+
|
123
|
+
$masonry_gallery.each( function(index, element) {
|
124
|
+
var $masonry_items = $(element).find('.gallery-item');
|
125
|
+
|
126
|
+
// set masonry layout
|
127
|
+
$(element).isotope({
|
128
|
+
masonry: { columnWidth: $(element).find('.gallery-item')[0] },
|
129
|
+
itemSelector: '.gallery-item'
|
130
|
+
});
|
131
|
+
$(element).isotope('layout');
|
132
|
+
|
133
|
+
// filtering
|
134
|
+
jQuery('#gallery-filter li a').on('click', function(){
|
135
|
+
jQuery('#gallery-filter li a').removeClass('active');
|
136
|
+
jQuery(this).addClass('active');
|
137
|
+
var selector = jQuery(this).attr('data-filter');
|
138
|
+
$masonry_gallery.isotope({ filter: selector });
|
139
|
+
return false;
|
140
|
+
});
|
141
|
+
|
142
|
+
// changing layout
|
143
|
+
jQuery('#grid-changer li a').on('click', function(){
|
144
|
+
jQuery('#grid-changer li a').removeClass('active');
|
145
|
+
jQuery(this).toggleClass('active');
|
146
|
+
|
147
|
+
$masonry_items.removeClass('col-3');
|
148
|
+
$masonry_items.removeClass('col-4');
|
149
|
+
$masonry_items.removeClass('col-5');
|
150
|
+
$masonry_items.toggleClass(jQuery(this).closest('li').attr('class'));
|
151
|
+
$masonry_gallery.isotope('layout');
|
152
|
+
});
|
153
|
+
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
// before-after
|
159
|
+
var $before_after = jQuery('.before-after.gallery');
|
160
|
+
if ( $before_after.length > 0 ) {
|
161
|
+
$before_after.imageReveal({
|
162
|
+
barWidth: 4,
|
163
|
+
touchBarWidth: 50,
|
164
|
+
startPosition: 0.5,
|
165
|
+
width: jQuery('.before-after img').width(),
|
166
|
+
height: jQuery('.before-after img').height()
|
167
|
+
});
|
168
|
+
}
|
169
|
+
|
170
|
+
// changing blog layout
|
171
|
+
var $blog_layout = jQuery('#blog-timeline');
|
172
|
+
if ( $blog_layout.length > 0 ) {
|
173
|
+
|
174
|
+
jQuery('#grid-changer li a').on('click', function(){
|
175
|
+
jQuery('#grid-changer li a').removeClass('active');
|
176
|
+
jQuery(this).toggleClass('active');
|
177
|
+
|
178
|
+
$blog_layout.closest('.wrapper').toggleClass('blog-masonry');
|
179
|
+
|
180
|
+
if ( $blog_layout.closest('.wrapper').hasClass('blog-masonry') ) {
|
181
|
+
jQuery('#blog-post').animate({'left': '100%'}, 400, function() {
|
182
|
+
// set masonry layout
|
183
|
+
$blog_layout.isotope({
|
184
|
+
masonry: { columnWidth: $blog_layout.find('article')[0], gutter: 60 },
|
185
|
+
itemSelector: 'article'
|
186
|
+
});
|
187
|
+
$blog_layout.isotope('layout');
|
188
|
+
jQuery('#blog-post').hide();
|
189
|
+
});
|
190
|
+
}
|
191
|
+
else {
|
192
|
+
jQuery('#blog-post').show().animate({'left': '0'}, 400 );
|
193
|
+
$blog_layout.isotope('destroy');
|
194
|
+
|
195
|
+
if ( $masonry_gallery.length > 0 ) {
|
196
|
+
$masonry_gallery.isotope('layout');
|
197
|
+
}
|
198
|
+
}
|
199
|
+
});
|
200
|
+
}
|
201
|
+
});
|
202
|
+
|
203
|
+
|
204
|
+
} )( jQuery );
|
data/js/super-search.js
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
/* super-search
|
2
|
+
Author: Kushagra Gour (http://kushagragour.in)
|
3
|
+
MIT Licensed
|
4
|
+
*/
|
5
|
+
(function () {
|
6
|
+
var searchFile = '/feed.xml',
|
7
|
+
searchEl,
|
8
|
+
searchInputEl,
|
9
|
+
searchResultsEl,
|
10
|
+
currentInputValue = '',
|
11
|
+
lastSearchResultHash,
|
12
|
+
posts = [];
|
13
|
+
|
14
|
+
// Changes XML to JSON
|
15
|
+
// Modified version from here: http://davidwalsh.name/convert-xml-json
|
16
|
+
function xmlToJson(xml) {
|
17
|
+
// Create the return object
|
18
|
+
var obj = {};
|
19
|
+
if (xml.nodeType == 3) { // text
|
20
|
+
obj = xml.nodeValue;
|
21
|
+
}
|
22
|
+
|
23
|
+
// do children
|
24
|
+
// If all text nodes inside, get concatenated text from them.
|
25
|
+
var textNodes = [].slice.call(xml.childNodes).filter(function (node) { return node.nodeType === 3; });
|
26
|
+
if (xml.hasChildNodes() && xml.childNodes.length === textNodes.length) {
|
27
|
+
obj = [].slice.call(xml.childNodes).reduce(function (text, node) { return text + node.nodeValue; }, '');
|
28
|
+
}
|
29
|
+
else if (xml.hasChildNodes()) {
|
30
|
+
for(var i = 0; i < xml.childNodes.length; i++) {
|
31
|
+
var item = xml.childNodes.item(i);
|
32
|
+
var nodeName = item.nodeName;
|
33
|
+
if (typeof(obj[nodeName]) == "undefined") {
|
34
|
+
obj[nodeName] = xmlToJson(item);
|
35
|
+
} else {
|
36
|
+
if (typeof(obj[nodeName].push) == "undefined") {
|
37
|
+
var old = obj[nodeName];
|
38
|
+
obj[nodeName] = [];
|
39
|
+
obj[nodeName].push(old);
|
40
|
+
}
|
41
|
+
obj[nodeName].push(xmlToJson(item));
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
return obj;
|
46
|
+
}
|
47
|
+
|
48
|
+
function getPostsFromXml(xml) {
|
49
|
+
var json = xmlToJson(xml);
|
50
|
+
return json.channel.item;
|
51
|
+
}
|
52
|
+
|
53
|
+
window.toggleSearch = function toggleSearch() {
|
54
|
+
searchEl.classList.toggle('is-active');
|
55
|
+
if (searchEl.classList.contains('is-active')) {
|
56
|
+
// while opening
|
57
|
+
searchInputEl.value = '';
|
58
|
+
} else {
|
59
|
+
// while closing
|
60
|
+
searchResultsEl.classList.add('is-hidden');
|
61
|
+
}
|
62
|
+
setTimeout(function () {
|
63
|
+
searchInputEl.focus();
|
64
|
+
}, 210);
|
65
|
+
}
|
66
|
+
|
67
|
+
function handleInput() {
|
68
|
+
var currentResultHash, d;
|
69
|
+
|
70
|
+
currentInputValue = (searchInputEl.value + '').toLowerCase();
|
71
|
+
if (!currentInputValue || currentInputValue.length < 3) {
|
72
|
+
lastSearchResultHash = '';
|
73
|
+
searchResultsEl.classList.add('is-hidden');
|
74
|
+
return;
|
75
|
+
}
|
76
|
+
searchResultsEl.style.offsetWidth;
|
77
|
+
|
78
|
+
var matchingPosts = posts.filter(function (post) {
|
79
|
+
if ((post.title + '').toLowerCase().indexOf(currentInputValue) !== -1 || (post.description + '').toLowerCase().indexOf(currentInputValue) !== -1) {
|
80
|
+
return true;
|
81
|
+
}
|
82
|
+
});
|
83
|
+
if (!matchingPosts.length) {
|
84
|
+
searchResultsEl.classList.add('is-hidden');
|
85
|
+
}
|
86
|
+
currentResultHash = matchingPosts.reduce(function(hash, post) { return post.title + hash; }, '');
|
87
|
+
if (matchingPosts.length && currentResultHash !== lastSearchResultHash) {
|
88
|
+
searchResultsEl.classList.remove('is-hidden');
|
89
|
+
searchResultsEl.innerHTML = matchingPosts.map(function (post) {
|
90
|
+
d = new Date(post.pubDate);
|
91
|
+
return '<li><a href="' + post.link + '">' + post.title + '<span class="super-search__result-date">' + d.toUTCString().replace(/.*(\d{2})\s+(\w{3})\s+(\d{4}).*/,'$2 $1, $3') + '</span></a></li>';
|
92
|
+
}).join('');
|
93
|
+
}
|
94
|
+
lastSearchResultHash = currentResultHash;
|
95
|
+
}
|
96
|
+
|
97
|
+
function init(options) {
|
98
|
+
searchFile = options.searchFile || searchFile;
|
99
|
+
searchEl = document.querySelector(options.searchSelector || '#js-super-search');
|
100
|
+
searchInputEl = document.querySelector(options.inputSelector || '#js-super-search__input');
|
101
|
+
searchResultsEl = document.querySelector(options.resultsSelector || '#js-super-search__results');
|
102
|
+
|
103
|
+
var xmlhttp=new XMLHttpRequest();
|
104
|
+
xmlhttp.open('GET', searchFile);
|
105
|
+
xmlhttp.onreadystatechange = function () {
|
106
|
+
if (xmlhttp.readyState != 4) return;
|
107
|
+
if (xmlhttp.status != 200 && xmlhttp.status != 304) { return; }
|
108
|
+
var node = (new DOMParser).parseFromString(xmlhttp.responseText, 'text/xml');
|
109
|
+
node = node.children[0];
|
110
|
+
posts = getPostsFromXml(node);
|
111
|
+
}
|
112
|
+
xmlhttp.send();
|
113
|
+
|
114
|
+
// Toggle on ESC key
|
115
|
+
window.addEventListener('keyup', function onKeyPress(e) {
|
116
|
+
if (e.which === 27) {
|
117
|
+
toggleSearch();
|
118
|
+
}
|
119
|
+
});
|
120
|
+
// Open on '/' key
|
121
|
+
window.addEventListener('keypress', function onKeyPress(e) {
|
122
|
+
if (e.which === 47 && !searchEl.classList.contains('is-active')) {
|
123
|
+
toggleSearch();
|
124
|
+
}
|
125
|
+
});
|
126
|
+
|
127
|
+
searchInputEl.addEventListener('input', function onInputChange() {
|
128
|
+
handleInput();
|
129
|
+
});
|
130
|
+
}
|
131
|
+
|
132
|
+
init.toggle = toggleSearch;
|
133
|
+
|
134
|
+
window.superSearch = init;
|
135
|
+
|
136
|
+
})();
|