elixir-toolkit-theme 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -10
  3. data/_includes/head.html +7 -7
  4. data/_includes/pageids-overview.html +1 -3
  5. data/_includes/scroll-top.html +5 -0
  6. data/_includes/section-navigation-tiles.html +1 -1
  7. data/_includes/toc.html +31 -1
  8. data/_layouts/default.html +2 -6
  9. data/_layouts/page.html +1 -1
  10. data/_sass/bootstrap/_accordion.scss +11 -11
  11. data/_sass/bootstrap/_buttons.scss +9 -0
  12. data/_sass/bootstrap/_carousel.scss +2 -10
  13. data/_sass/bootstrap/_modal.scss +0 -1
  14. data/_sass/bootstrap/_offcanvas.scss +1 -4
  15. data/_sass/bootstrap/_tables.scss +1 -1
  16. data/_sass/bootstrap/_variables.scss +7 -3
  17. data/_sass/bootstrap/forms/_form-check.scss +1 -1
  18. data/_sass/bootstrap/mixins/_banner.scss +2 -2
  19. data/_sass/bootstrap/mixins/_forms.scss +12 -2
  20. data/_sass/bootstrap/mixins/_grid.scss +1 -1
  21. data/_sass/bootstrap/tests/mixins/_auto-import-of-variables-dark.test.scss +7 -0
  22. data/_sass/bootstrap/tests/mixins/_utilities.test.scss +1 -1
  23. data/assets/css/all.min.css +5 -5
  24. data/assets/css/dataTables.bootstrap5.min.css +2 -2
  25. data/assets/css/main.scss +0 -1
  26. data/assets/js/bootstrap.bundle.min.js +3 -3
  27. data/assets/js/bootstrap.bundle.min.js.map +1 -1
  28. data/assets/js/dataTables.bootstrap5.min.js +2 -2
  29. data/assets/js/jquery.dataTables.min.js +3 -3
  30. data/assets/js/jquery.min.js +2 -2
  31. data/assets/js/jquery.min.map +1 -1
  32. data/assets/js/toc.js +35 -53
  33. data/assets/webfonts/fa-brands-400.ttf +0 -0
  34. data/assets/webfonts/fa-brands-400.woff2 +0 -0
  35. data/assets/webfonts/fa-regular-400.ttf +0 -0
  36. data/assets/webfonts/fa-regular-400.woff2 +0 -0
  37. data/assets/webfonts/fa-solid-900.ttf +0 -0
  38. data/assets/webfonts/fa-solid-900.woff2 +0 -0
  39. data/assets/webfonts/fa-v4compatibility.ttf +0 -0
  40. data/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  41. metadata +4 -2
data/assets/js/toc.js CHANGED
@@ -1,8 +1,7 @@
1
- // https://github.com/ghiculescu/jekyll-table-of-contents
1
+ // Modified from: https://github.com/ghiculescu/jekyll-table-of-contents
2
2
  (function ($) {
3
3
  $.fn.toc = function (options) {
4
4
  var defaults = {
5
- noBackToTopLinks: false,
6
5
  title: '<i>Jump to...</i>',
7
6
  minimumHeaders: 3,
8
7
  headers: 'h1, h2, h3, h4, h5, h6',
@@ -16,7 +15,7 @@
16
15
  toc: ''
17
16
  }
18
17
  },
19
- settings = $.extend(defaults, options);
18
+ settings = $.extend(defaults, options);
20
19
 
21
20
  function fixedEncodeURIComponent(str) {
22
21
  return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
@@ -25,30 +24,32 @@
25
24
  }
26
25
 
27
26
  function createLink(header) {
28
- var innerText = (header.textContent === undefined) ? header.innerText : header.textContent;
27
+ var innerText = header.textContent || header.innerText;
29
28
  return "<a class='" + settings.classes.link + "' href='#" + fixedEncodeURIComponent(header.id) + "'>" + innerText + "</a>";
30
29
  }
31
30
 
32
31
  var headers = $(settings.headers).filter(function () {
33
- // get all headers with an ID
34
- var previousSiblingName = $(this).prev().attr("name");
35
- if (!this.id && previousSiblingName) {
36
- this.id = $(this).attr("id", previousSiblingName.replace(/\./g, "-"));
32
+ // Ensure headers have IDs
33
+ if (!this.id) {
34
+ this.id = $(this).text().trim().replace(/\s+/g, '-').toLowerCase();
37
35
  }
38
36
  return this.id;
39
- }), output = $(this);
37
+ });
38
+
39
+ var output = $(this);
40
+
41
+ // Check if there are any headers
40
42
  if (!headers.length || headers.length < settings.minimumHeaders || !output.length) {
41
- return;
42
- } else {
43
- $('#main').addClass("add-grid");
44
- $("#toc").show();
43
+ $('#main').removeClass("add-grid");
44
+ $("#toc").hide();
45
+ return; // Exit early if there are no headers
45
46
  }
46
47
 
47
- if (0 === settings.showSpeed) {
48
+ if (settings.showSpeed === 0) {
48
49
  settings.showEffect = 'none';
49
50
  }
50
51
 
51
- $(this).addClass(settings.classes.toc)
52
+ $(this).addClass(settings.classes.toc);
52
53
 
53
54
  var render = {
54
55
  show: function () { output.hide().html(html).show(settings.showSpeed); },
@@ -59,47 +60,28 @@
59
60
 
60
61
  var get_level = function (ele) { return parseInt(ele.nodeName.replace("H", ""), 10); };
61
62
  var highest_level = headers.map(function (_, ele) { return get_level(ele); }).get().sort()[0];
62
- var return_to_top = '<i class="icon-arrow-up back-to-top"> </i>';
63
+ var level = get_level(headers[0]), this_level;
64
+ var html = settings.title + " <" + settings.listType + " class=\"" + settings.classes.list + "\">";
63
65
 
64
- var level = get_level(headers[0]),
65
- this_level,
66
- html = settings.title + " <" + settings.listType + " class=\"" + settings.classes.list + "\">";
67
- headers.on('click', function () {
68
- if (!settings.noBackToTopLinks) {
69
- window.location.hash = this.id;
70
- }
71
- })
72
- .addClass('clickable-header')
73
- .each(function (_, header) {
74
- this_level = get_level(header);
75
- if (!settings.noBackToTopLinks && this_level === highest_level) {
76
- $(header).addClass('top-level-header').after(return_to_top);
66
+ headers.each(function (_, header) {
67
+ this_level = get_level(header);
68
+ if (this_level === level) { // same level as before; same indenting
69
+ html += "<li class=\"" + settings.classes.item + "\">" + createLink(header);
70
+ } else if (this_level <= level) { // higher level than before; end parent ol
71
+ for (var i = this_level; i < level; i++) {
72
+ html += "</li></" + settings.listType + ">"
77
73
  }
78
- if (this_level === level) // same level as before; same indenting
79
- html += "<li class=\"" + settings.classes.item + "\">" + createLink(header);
80
- else if (this_level <= level) { // higher level than before; end parent ol
81
- for (var i = this_level; i < level; i++) {
82
- html += "</li></" + settings.listType + ">"
83
- }
84
- html += "<li class=\"" + settings.classes.item + "\">" + createLink(header);
74
+ html += "<li class=\"" + settings.classes.item + "\">" + createLink(header);
75
+ } else if (this_level > level) { // lower level than before; expand the previous to contain a ol
76
+ for (i = this_level; i > level; i--) {
77
+ html += "<" + settings.listType + " class=\"" + settings.classes.list + "\">" +
78
+ "<li class=\"" + settings.classes.item + "\">"
85
79
  }
86
- else if (this_level > level) { // lower level than before; expand the previous to contain a ol
87
- for (i = this_level; i > level; i--) {
88
- html += "<" + settings.listType + " class=\"" + settings.classes.list + "\">" +
89
- "<li class=\"" + settings.classes.item + "\">"
90
- }
91
- html += createLink(header);
92
- }
93
- level = this_level; // update for the next one
94
- });
80
+ html += createLink(header);
81
+ }
82
+ level = this_level; // update for the next one
83
+ });
95
84
  html += "</" + settings.listType + ">";
96
- if (!settings.noBackToTopLinks) {
97
- $(document).on('click', '.back-to-top', function () {
98
- $(window).scrollTop(0);
99
- window.location.hash = '';
100
- });
101
- }
102
-
103
85
  render[settings.showEffect]();
104
86
  };
105
- })(jQuery);
87
+ })(jQuery);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elixir-toolkit-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bedroesb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-02 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -99,6 +99,7 @@ files:
99
99
  - _includes/resource-table-all.html
100
100
  - _includes/resource-table-page.html
101
101
  - _includes/schemasorg.html
102
+ - _includes/scroll-top.html
102
103
  - _includes/section-navigation-tiles-simple.html
103
104
  - _includes/section-navigation-tiles.html
104
105
  - _includes/sidebar.html
@@ -203,6 +204,7 @@ files:
203
204
  - _sass/bootstrap/mixins/_utilities.scss
204
205
  - _sass/bootstrap/mixins/_visually-hidden.scss
205
206
  - _sass/bootstrap/tests/jasmine.js
207
+ - _sass/bootstrap/tests/mixins/_auto-import-of-variables-dark.test.scss
206
208
  - _sass/bootstrap/tests/mixins/_color-modes.test.scss
207
209
  - _sass/bootstrap/tests/mixins/_media-query-color-mode-full.test.scss
208
210
  - _sass/bootstrap/tests/mixins/_utilities.test.scss