elixir-toolkit-theme 3.1.0 → 3.2.0
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/README.md +19 -10
- data/_includes/head.html +7 -7
- data/_includes/more-information-tiles.html +15 -5
- data/_includes/pageids-overview.html +1 -3
- data/_includes/resource-table-all.html +4 -2
- data/_includes/scroll-top.html +5 -0
- data/_includes/section-navigation-tiles.html +1 -1
- data/_includes/toc.html +31 -1
- data/_layouts/default.html +2 -6
- data/_layouts/page.html +1 -1
- data/_sass/bootstrap/_accordion.scss +11 -11
- data/_sass/bootstrap/_buttons.scss +9 -0
- data/_sass/bootstrap/_carousel.scss +2 -10
- data/_sass/bootstrap/_modal.scss +0 -1
- data/_sass/bootstrap/_offcanvas.scss +1 -4
- data/_sass/bootstrap/_tables.scss +1 -1
- data/_sass/bootstrap/_variables.scss +7 -3
- data/_sass/bootstrap/forms/_form-check.scss +1 -1
- data/_sass/bootstrap/mixins/_banner.scss +2 -2
- data/_sass/bootstrap/mixins/_forms.scss +12 -2
- data/_sass/bootstrap/mixins/_grid.scss +1 -1
- data/_sass/bootstrap/tests/mixins/_auto-import-of-variables-dark.test.scss +7 -0
- data/_sass/bootstrap/tests/mixins/_utilities.test.scss +1 -1
- data/assets/css/all.min.css +5 -5
- data/assets/css/dataTables.bootstrap5.min.css +2 -2
- data/assets/css/main.scss +0 -1
- data/assets/js/bootstrap.bundle.min.js +3 -3
- data/assets/js/bootstrap.bundle.min.js.map +1 -1
- data/assets/js/dataTables.bootstrap5.min.js +2 -2
- data/assets/js/jquery.dataTables.min.js +3 -3
- data/assets/js/jquery.min.js +2 -2
- data/assets/js/jquery.min.map +1 -1
- data/assets/js/toc.js +35 -53
- data/assets/webfonts/fa-brands-400.ttf +0 -0
- data/assets/webfonts/fa-brands-400.woff2 +0 -0
- data/assets/webfonts/fa-regular-400.ttf +0 -0
- data/assets/webfonts/fa-regular-400.woff2 +0 -0
- data/assets/webfonts/fa-solid-900.ttf +0 -0
- data/assets/webfonts/fa-solid-900.woff2 +0 -0
- data/assets/webfonts/fa-v4compatibility.ttf +0 -0
- data/assets/webfonts/fa-v4compatibility.woff2 +0 -0
- 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
|
-
|
|
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 =
|
|
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
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
})
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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 (
|
|
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
|
|
63
|
+
var level = get_level(headers[0]), this_level;
|
|
64
|
+
var html = settings.title + " <" + settings.listType + " class=\"" + settings.classes.list + "\">";
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
this_level
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
|
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.
|
|
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-
|
|
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
|