docs-jekyll-theme 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.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +69 -0
  4. data/_includes/footer.html +4 -0
  5. data/_includes/head.html +20 -0
  6. data/_includes/header.html +34 -0
  7. data/_includes/sidebar.html +21 -0
  8. data/_layouts/default.html +18 -0
  9. data/_layouts/home.html +17 -0
  10. data/_layouts/page.html +5 -0
  11. data/_layouts/post.html +5 -0
  12. data/assets/css/custom.css +36 -0
  13. data/assets/css/theDocs.all.min.css +10 -0
  14. data/assets/css/theDocs.css +1 -0
  15. data/assets/fonts/FontAwesome.otf +0 -0
  16. data/assets/fonts/fontawesome-webfont.eot +0 -0
  17. data/assets/fonts/fontawesome-webfont.svg +565 -0
  18. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  19. data/assets/fonts/fontawesome-webfont.woff +0 -0
  20. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  21. data/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  22. data/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  23. data/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  24. data/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  25. data/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  26. data/assets/images/logo.png +0 -0
  27. data/assets/js/.DS_Store +0 -0
  28. data/assets/js/custom.js +26 -0
  29. data/assets/js/custom_index.js +119 -0
  30. data/assets/js/images/Thumbs.db +0 -0
  31. data/assets/js/images/mapicon.png +0 -0
  32. data/assets/js/jquery-1.10.2.min.js +6 -0
  33. data/assets/js/jquery.viewport.js +58 -0
  34. data/assets/js/pace.min.js +2 -0
  35. data/assets/js/particles.min.js +9 -0
  36. data/assets/js/retina.js +182 -0
  37. data/assets/js/theDocs.all.min.js +12 -0
  38. data/assets/js/theDocs.js +379 -0
  39. metadata +123 -0
@@ -0,0 +1,379 @@
1
+
2
+ $(function() {
3
+
4
+ "use strict";
5
+
6
+ // Back to top
7
+ $('#scroll-up').on('click', function() {
8
+ $('html, body').animate({scrollTop : 0}, 900);
9
+ return false;
10
+ });
11
+
12
+ // Smooth scroll for ToC
13
+ $('.toc a, .sidenav.nav a').click(function(){
14
+ $('html, body').animate({scrollTop: $($.attr(this, 'href')).offset().top - 80}, 500);
15
+ return false;
16
+ });
17
+
18
+ // Smoothscroll to anchor in page load
19
+ var hash = location.hash.replace('#','');
20
+ if (hash != '' && $("#"+hash).length > 0) {
21
+ $('html, body').animate({scrollTop: $("#"+hash).offset().top-100}, 600);
22
+ }
23
+
24
+
25
+ // Full height body to make sure footer will place in bottom of the page
26
+ if ($(window).height() > $('body').height()) {
27
+ var min_height = $(window).height() - $('.site-header').height() - $('.site-footer').height();
28
+ $('body > main').css('min-height', min_height);
29
+ }
30
+
31
+ // Set the height of sidebar if it's fixed .height(sidenav_max_height)
32
+ if ($('.sidenav.sticky').length > 0) {
33
+ var sidenav_max_height = $(window).height() - $('.sidenav.sticky').position().top - 100;
34
+ $('.sidenav.sticky').height(sidenav_max_height);
35
+ }
36
+
37
+ //
38
+ // Top navbar
39
+ //
40
+ if ($('.site-header').hasClass('sticky') && !$('.site-header').hasClass('navbar-sm')) {
41
+ var navbar_lg = false;
42
+ if ($('.site-header').hasClass('navbar-lg')) {
43
+ navbar_lg = true;
44
+ }
45
+
46
+ $(window).on('scroll', function() {
47
+ var offset = $('.site-header').offset().top + $('.site-header').height();
48
+
49
+ if ($(window).scrollTop() > offset) {
50
+ if (navbar_lg) {
51
+ $('.site-header').removeClass('navbar-lg');
52
+ }
53
+ $('.site-header').addClass('navbar-sm');
54
+
55
+ }
56
+ else {
57
+ if (navbar_lg) {
58
+ $('.site-header').addClass('navbar-lg');
59
+ }
60
+ $('.site-header').removeClass('navbar-sm');
61
+ }
62
+ });
63
+ }
64
+
65
+ // Manage transparent navbar
66
+ if ($('.site-header').hasClass('navbar-transparent') && $('.site-header').hasClass('sticky')) {
67
+
68
+ if ($('.site-header > .banner').length == 0) {
69
+ $('.site-header').removeClass('navbar-transparent');
70
+ }
71
+ else {
72
+ if ($('.site-header').hasClass('sticky')) {
73
+
74
+ $(window).on('scroll', function() {
75
+ var offset = $('.site-header .navbar').height();
76
+ if ($(window).scrollTop() > offset) {
77
+ $('.site-header').removeClass('navbar-transparent')
78
+ }
79
+ else {
80
+ $('.site-header').addClass('navbar-transparent')
81
+ }
82
+ });
83
+
84
+ }
85
+ }
86
+
87
+ }
88
+
89
+ // Margin top for sticky navbar without banner
90
+ if ($('.site-header').hasClass('sticky') && $('.site-header > .banner').length == 0) {
91
+ $('.site-header').css('padding-top', $('.site-header > .navbar').height() + 30);
92
+ }
93
+
94
+ // Add .force-middle if navbar-brand contains image
95
+ if ('.navbar-brand > img') {
96
+ $('.navbar-brand').prepend('<span class="force-middle"></span>');
97
+ }
98
+
99
+
100
+ //
101
+ // Sidebar
102
+ //
103
+
104
+ // Offcanvas
105
+ $('[data-toggle="offcanvas"]').on('click', function () {
106
+ //$('.main-content').css('height', $('.sidenav').height()+100 + 'px');
107
+ $('body').toggleClass('open-sidebar');
108
+ if ($('body').hasClass('open-sidebar')) {
109
+ $('html').css('overflow', 'hidden');
110
+ //$('.main-content').css('height', $('.sidenav').height()+100 + 'px');
111
+ $('.site-header .jumbotron').slideUp(50);
112
+ }
113
+ else {
114
+ $('html').css('overflow', 'visible');
115
+ //$('.main-content').css('height', 'auto');
116
+ $('.site-header .jumbotron').slideDown(900);
117
+ }
118
+ });
119
+
120
+ // Dropdown
121
+ $('.sidenav.dropable > li > a').on('click', function(e){
122
+
123
+ if ( 0 < $(this).next("ul").length ) {
124
+ e.preventDefault();
125
+ }
126
+
127
+ if ( 0 == $(this).next("ul").length ) {
128
+ return;
129
+ }
130
+
131
+ if ( $(this).hasClass('open') ) {
132
+ $(this).removeClass('open').next("ul").slideUp(300);
133
+ return;
134
+ }
135
+
136
+ $(this).parents(".sidenav").find("> li > a").removeClass('open');
137
+ $(this).parents(".sidenav").find("ul").not(":hidden").slideUp(300);
138
+ $(this).addClass('open').next("ul").slideDown(300);
139
+ });
140
+
141
+ $('.sidenav.dropable > li > a.active').addClass('open');
142
+ $('.sidenav.dropable > li > ul').prev('a').addClass('has-child');
143
+
144
+ if ($(window).width() < 768) {
145
+ $('.sidebar-boxed').removeClass('sidebar-dark');
146
+ }
147
+
148
+ // Sticky behaviour
149
+ if ($('.sidenav').hasClass('sticky')) {
150
+ $(window).on('scroll', function() {
151
+ var $sidenav = $('.sidenav'),
152
+ offset = $('.sidebar').offset();
153
+
154
+ if ($(window).scrollTop() > offset.top) {
155
+ $sidenav.css({ position: 'fixed', top: '100px' });
156
+ } else {
157
+ $sidenav.css('position', 'static');
158
+ }
159
+ });
160
+ }
161
+
162
+ // Auto link creator for headings
163
+ $('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function(index, value) {
164
+ var link = '<a href="#'+ $(this).attr("id") +'">'+ $(this).html() +'</a>';
165
+ $(this).html(link);
166
+ });
167
+
168
+ //
169
+ // FAQ Component
170
+ //
171
+
172
+ // Case insensitive contains selector
173
+ jQuery.expr[':'].icontains = function(a, i, m) {
174
+ return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
175
+ };
176
+
177
+ // Search
178
+ $('.faq-search').on('keyup', function(e) {
179
+ var s = $(this).val().trim(),
180
+ result = $(this).parent().find("li");
181
+ if (s === '') {
182
+ result.show();
183
+ return true;
184
+ }
185
+ result.not(':icontains(' + s + ')').hide();
186
+ result.filter(':icontains(' + s + ')').show();
187
+ });
188
+
189
+ $('.faq li > h6').on('click', function() {
190
+ $(this).toggleClass('open').next('div').slideToggle(300);
191
+ });
192
+
193
+ //Taking care of video
194
+ if ($.fn.mediaelementplayer) {
195
+ $('video').mediaelementplayer();
196
+ }
197
+
198
+ if ($.fn.fitVids) {
199
+ $('.video').fitVids();
200
+ }
201
+
202
+ //
203
+ // File Tree
204
+ //
205
+ $('.file-tree li.is-file').on('click', function(e){
206
+ e.stopPropagation();
207
+ });
208
+
209
+ $('.file-tree li.is-folder').on('click', function(e){
210
+ $(this).find('ul:first').slideToggle(400, function(){
211
+ $(this).parent('li').toggleClass('open');
212
+ });
213
+ e.stopPropagation();
214
+ });
215
+
216
+
217
+ //Equal height for grid view
218
+ $('.grid-view > li, .categorized-view > li, .promo.small-icon').matchHeight();
219
+
220
+ //
221
+ // Code viewers
222
+ //
223
+
224
+ // Copy to clipboard
225
+ // It doesn't support Safari yet, and also has some minor bugs
226
+ $('pre').each(function(index, value) {
227
+ $(this).prepend('<a class="btn btn-sm btn-purple clipboard-copy" data-original-title="Copied!">Copy</a>');
228
+ });
229
+
230
+ // Code snippet
231
+ $('pre').each(function(index, value) {
232
+ if ($(this).parents('.code-window').length || $(this).parents('.code-taps').length) {
233
+ return;
234
+ }
235
+ var title = "";
236
+ if ($(this).children("code").attr('class')) {
237
+ title = $(this).children("code").attr('class');
238
+ title = title.replace("language-", "");
239
+ title = title.toLowerCase();
240
+ if (title == "markup") {
241
+ title = "html";
242
+ }
243
+ }
244
+ var span = '<span class="language-name">'+ title +'</span>';
245
+ $(this).prepend(span);
246
+ });
247
+
248
+ $('pre .language-name').parent().on('scroll', function(){
249
+ $(this).find('.language-name').css('transform', 'translate('+ $(this).scrollLeft() +'px, '+ $(this).scrollTop() +'px)');
250
+ });
251
+
252
+ // Code window
253
+ $('.code-window').each(function(index, value){
254
+ var topbar = '<div class="window-bar"><div class="circles">';
255
+ topbar += '<span class="circle circle-red"></span> <span class="circle circle-yellow"></span> <span class="circle circle-green"></span>';
256
+ if ($(this).attr('data-title')) {
257
+ topbar += '<span class="window-title">'+ $(this).data('title') +'</span>';
258
+ }
259
+ topbar += '</div>';//.circles
260
+
261
+ //Languages
262
+ if ($(this).children().length > 1) {
263
+ topbar += '<div class="languages"><div class="btn-group" data-toggle="buttons">';
264
+
265
+ $(this).children(':not(.prism-show-language)').each(function(index, value){
266
+ var active='', check='', title='';
267
+ if (index == 0) {
268
+ active = ' active';
269
+ check = ' checked';
270
+ }
271
+ if ($(this).children("code").attr('class')) {
272
+ title = $(this).children("code").attr('class');
273
+ title = title.replace("language-", "");
274
+ title = title.toLowerCase();
275
+ if (title == "markup") {
276
+ title = "html";
277
+ }
278
+ }
279
+ else if ($(this).hasClass('code-preview')) {
280
+ title = 'Example';
281
+ }
282
+ topbar += '<label class="btn'+ active +'"><input type="radio" autocomplete="off"'+ check +'>'+ title +'</label>';
283
+ });
284
+
285
+ topbar += '</div></div>';
286
+ }
287
+
288
+ topbar += '</div>';//.window-bar
289
+
290
+ $(this).children(':not(:first)').hide(0);
291
+ $(this).children().wrapAll('<div class="window-content"></div>');
292
+ $(this).prepend(topbar);
293
+
294
+ //Event handler, change tab
295
+ var window_content = $(this).children('.window-content');
296
+ $(this).find(".btn-group .btn").on('click', function() {
297
+ var i = $(this).index();
298
+ window_content.children(":visible").fadeOut(200, function() {
299
+ window_content.children(":not(.prism-show-language):eq("+ i +")").fadeIn(200);
300
+ });
301
+ });
302
+ });
303
+
304
+ // Code tabs
305
+ $('.code-tabs').each(function(index, value){
306
+ var topbar = '';
307
+
308
+ //Languages
309
+ if ($(this).children().length > 1) {
310
+ topbar += '<div class="languages"><div class="btn-group" data-toggle="buttons">';
311
+
312
+ $(this).children(':not(.prism-show-language)').each(function(index, value){
313
+ var active='', check='', title='';
314
+ if (index == 0) {
315
+ active = ' active';
316
+ check = ' checked';
317
+ }
318
+ if ($(this).children("code").attr('class')) {
319
+ title = $(this).children("code").attr('class');
320
+ title = title.replace("language-", "");
321
+ title = title.toLowerCase();
322
+ if (title == "markup") {
323
+ title = "html";
324
+ }
325
+ }
326
+ else if ($(this).hasClass('code-preview')) {
327
+ title = 'Example';
328
+ }
329
+ topbar += '<label class="btn'+ active +'"><input type="radio" autocomplete="off"'+ check +'>'+ title +'</label>';
330
+ });
331
+
332
+ topbar += '</div></div>';
333
+ }
334
+
335
+ $(this).children(':not(:first)').hide(0);
336
+ $(this).children().wrapAll('<div class="window-content"></div>');
337
+ $(this).prepend(topbar);
338
+
339
+ //Event handler, change tab
340
+ var window_content = $(this).children('.window-content');
341
+ $(this).find(".btn-group .btn").on('click', function() {
342
+ var i = $(this).index();
343
+ window_content.children(":visible").fadeOut(200, function() {
344
+ window_content.children(":not(.prism-show-language):eq("+ i +")").fadeIn(200);
345
+ });
346
+ });
347
+ });
348
+
349
+ // Trim code blocks
350
+ $('pre code').each(function(){
351
+ $(this).html($.trim($(this).html()));
352
+ });
353
+
354
+
355
+ // Copy to clipboard
356
+ $('.code-preview .clipboard-copy').remove();
357
+ $('.clipboard-copy').tooltip({placement: 'bottom', trigger: 'manual'});
358
+ // Move copy button when the content is scrolling
359
+ $('.clipboard-copy').parent().on('scroll', function(){
360
+ $(this).find('.clipboard-copy').css('transform', 'translate('+ $(this).scrollLeft() +'px, '+ $(this).scrollTop() +'px)');
361
+ });
362
+
363
+ if ($('.clipboard-copy').length > 0) {
364
+
365
+ var clipboardSnippets = new Clipboard('.clipboard-copy', {
366
+ target: function(trigger) {
367
+ return trigger.nextElementSibling;
368
+ }
369
+ });
370
+
371
+ clipboardSnippets.on('success', function(e) {
372
+ e.clearSelection();
373
+ $(e.trigger).tooltip('show');
374
+ setTimeout(function(el){ $(el.trigger).tooltip('hide'); }, 1000, e);
375
+ });
376
+ }
377
+
378
+
379
+ });
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docs-jekyll-theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Bruno Louvem
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description:
56
+ email:
57
+ - btlouvem@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - LICENSE.txt
63
+ - README.md
64
+ - _includes/footer.html
65
+ - _includes/head.html
66
+ - _includes/header.html
67
+ - _includes/sidebar.html
68
+ - _layouts/default.html
69
+ - _layouts/home.html
70
+ - _layouts/page.html
71
+ - _layouts/post.html
72
+ - assets/css/custom.css
73
+ - assets/css/theDocs.all.min.css
74
+ - assets/css/theDocs.css
75
+ - assets/fonts/FontAwesome.otf
76
+ - assets/fonts/fontawesome-webfont.eot
77
+ - assets/fonts/fontawesome-webfont.svg
78
+ - assets/fonts/fontawesome-webfont.ttf
79
+ - assets/fonts/fontawesome-webfont.woff
80
+ - assets/fonts/fontawesome-webfont.woff2
81
+ - assets/fonts/glyphicons-halflings-regular.eot
82
+ - assets/fonts/glyphicons-halflings-regular.svg
83
+ - assets/fonts/glyphicons-halflings-regular.ttf
84
+ - assets/fonts/glyphicons-halflings-regular.woff
85
+ - assets/fonts/glyphicons-halflings-regular.woff2
86
+ - assets/images/logo.png
87
+ - assets/js/.DS_Store
88
+ - assets/js/custom.js
89
+ - assets/js/custom_index.js
90
+ - assets/js/images/Thumbs.db
91
+ - assets/js/images/mapicon.png
92
+ - assets/js/jquery-1.10.2.min.js
93
+ - assets/js/jquery.viewport.js
94
+ - assets/js/pace.min.js
95
+ - assets/js/particles.min.js
96
+ - assets/js/retina.js
97
+ - assets/js/theDocs.all.min.js
98
+ - assets/js/theDocs.js
99
+ homepage: https://github.com/Bruno-Louvem/docs-jekyll-theme
100
+ licenses:
101
+ - MIT
102
+ metadata: {}
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ requirements: []
118
+ rubyforge_project:
119
+ rubygems_version: 2.6.13
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: A simple and pretty theme for documentations sites .
123
+ test_files: []