jumbo-jekyll-theme 3.5.6 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/settings.yml +1 -0
- data/_includes/post-sidebar.html +15 -0
- data/_layouts/post.html +10 -4
- data/_sass/app/overrides.scss +7 -1
- data/_sass/core/blog.scss +15 -0
- data/assets/js/vendor/bootstrap-multiselect.js +1776 -0
- data/assets/js/vendor/jquery.doubleScroll.js +128 -0
- metadata +4 -2
@@ -0,0 +1,128 @@
|
|
1
|
+
/*
|
2
|
+
* @name DoubleScroll
|
3
|
+
* @desc displays scroll bar on top and on the bottom of the div
|
4
|
+
* @requires jQuery
|
5
|
+
*
|
6
|
+
* @author Pawel Suwala - http://suwala.eu/
|
7
|
+
* @author Antoine Vianey - http://www.astek.fr/
|
8
|
+
* @version 0.5 (11-11-2015)
|
9
|
+
*
|
10
|
+
* Dual licensed under the MIT and GPL licenses:
|
11
|
+
* http://www.opensource.org/licenses/mit-license.php
|
12
|
+
* http://www.gnu.org/licenses/gpl.html
|
13
|
+
*
|
14
|
+
* Usage:
|
15
|
+
* https://github.com/avianey/jqDoubleScroll
|
16
|
+
*/
|
17
|
+
(function ($) {
|
18
|
+
|
19
|
+
jQuery.fn.doubleScroll = function (userOptions) {
|
20
|
+
|
21
|
+
// Default options
|
22
|
+
var options = {
|
23
|
+
contentElement: undefined, // Widest element, if not specified first child element will be used
|
24
|
+
scrollCss: {
|
25
|
+
'overflow-x': 'auto',
|
26
|
+
'overflow-y': 'hidden',
|
27
|
+
'height': '20px'
|
28
|
+
},
|
29
|
+
contentCss: {
|
30
|
+
'overflow-x': 'auto',
|
31
|
+
'overflow-y': 'hidden'
|
32
|
+
},
|
33
|
+
onlyIfScroll: true, // top scrollbar is not shown if the bottom one is not present
|
34
|
+
resetOnWindowResize: false, // recompute the top ScrollBar requirements when the window is resized
|
35
|
+
timeToWaitForResize: 30 // wait for the last update event (usefull when browser fire resize event constantly during ressing)
|
36
|
+
};
|
37
|
+
|
38
|
+
$.extend(true, options, userOptions);
|
39
|
+
|
40
|
+
// do not modify
|
41
|
+
// internal stuff
|
42
|
+
$.extend(options, {
|
43
|
+
topScrollBarMarkup: '<div class="doubleScroll-scroll-wrapper"><div class="doubleScroll-scroll"></div></div>',
|
44
|
+
topScrollBarWrapperSelector: '.doubleScroll-scroll-wrapper',
|
45
|
+
topScrollBarInnerSelector: '.doubleScroll-scroll'
|
46
|
+
});
|
47
|
+
|
48
|
+
var _showScrollBar = function ($self, options) {
|
49
|
+
|
50
|
+
if (options.onlyIfScroll && $self.get(0).scrollWidth <= $self.width()) {
|
51
|
+
// content doesn't scroll
|
52
|
+
// remove any existing occurrence...
|
53
|
+
$self.prev(options.topScrollBarWrapperSelector).remove();
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
|
57
|
+
// add div that will act as an upper scroll only if not already added to the DOM
|
58
|
+
var $topScrollBar = $self.prev(options.topScrollBarWrapperSelector);
|
59
|
+
|
60
|
+
if ($topScrollBar.length == 0) {
|
61
|
+
|
62
|
+
// creating the scrollbar
|
63
|
+
// added before in the DOM
|
64
|
+
$topScrollBar = $(options.topScrollBarMarkup);
|
65
|
+
$self.before($topScrollBar);
|
66
|
+
|
67
|
+
// apply the css
|
68
|
+
$topScrollBar.css(options.scrollCss);
|
69
|
+
$(options.topScrollBarInnerSelector).css("height", "20px");
|
70
|
+
$self.css(options.contentCss);
|
71
|
+
|
72
|
+
// bind upper scroll to bottom scroll
|
73
|
+
$topScrollBar.bind('scroll.doubleScroll', function () {
|
74
|
+
$self.scrollLeft($topScrollBar.scrollLeft());
|
75
|
+
});
|
76
|
+
|
77
|
+
// bind bottom scroll to upper scroll
|
78
|
+
var selfScrollHandler = function () {
|
79
|
+
$topScrollBar.scrollLeft($self.scrollLeft());
|
80
|
+
};
|
81
|
+
$self.bind('scroll.doubleScroll', selfScrollHandler);
|
82
|
+
}
|
83
|
+
|
84
|
+
// find the content element (should be the widest one)
|
85
|
+
var $contentElement;
|
86
|
+
|
87
|
+
if (options.contentElement !== undefined && $self.find(options.contentElement).length !== 0) {
|
88
|
+
$contentElement = $self.find(options.contentElement);
|
89
|
+
} else {
|
90
|
+
$contentElement = $self.find('>:first-child');
|
91
|
+
}
|
92
|
+
|
93
|
+
// set the width of the wrappers
|
94
|
+
$(options.topScrollBarInnerSelector, $topScrollBar).width($contentElement.outerWidth());
|
95
|
+
$topScrollBar.width($self.width());
|
96
|
+
$topScrollBar.scrollLeft($self.scrollLeft());
|
97
|
+
|
98
|
+
}
|
99
|
+
|
100
|
+
return this.each(function () {
|
101
|
+
|
102
|
+
var $self = $(this);
|
103
|
+
|
104
|
+
_showScrollBar($self, options);
|
105
|
+
|
106
|
+
// bind the resize handler
|
107
|
+
// do it once
|
108
|
+
if (options.resetOnWindowResize) {
|
109
|
+
|
110
|
+
var id;
|
111
|
+
var handler = function (e) {
|
112
|
+
_showScrollBar($self, options);
|
113
|
+
};
|
114
|
+
|
115
|
+
$(window).bind('resize.doubleScroll', function () {
|
116
|
+
// adding/removing/replacing the scrollbar might resize the window
|
117
|
+
// so the resizing flag will avoid the infinite loop here...
|
118
|
+
clearTimeout(id);
|
119
|
+
id = setTimeout(handler, options.timeToWaitForResize);
|
120
|
+
});
|
121
|
+
|
122
|
+
}
|
123
|
+
|
124
|
+
});
|
125
|
+
|
126
|
+
}
|
127
|
+
|
128
|
+
}(jQuery));
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jumbo-jekyll-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Kirkby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -577,11 +577,13 @@ files:
|
|
577
577
|
- assets/js/package-home.js
|
578
578
|
- assets/js/package-main.js
|
579
579
|
- assets/js/package-search.js
|
580
|
+
- assets/js/vendor/bootstrap-multiselect.js
|
580
581
|
- assets/js/vendor/bootstrap.js
|
581
582
|
- assets/js/vendor/cognito.js
|
582
583
|
- assets/js/vendor/cookieconsent.js
|
583
584
|
- assets/js/vendor/disqus-loader.js
|
584
585
|
- assets/js/vendor/featherlight.js
|
586
|
+
- assets/js/vendor/jquery.doubleScroll.js
|
585
587
|
- assets/js/vendor/jquery.js
|
586
588
|
- assets/js/vendor/jquery.rss.js
|
587
589
|
- assets/js/vendor/jquery.validate.js
|