jekyll-theme-zer0 0.1.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +499 -0
- data/_includes/branding.html +43 -0
- data/_includes/breadcrumbs.html +31 -0
- data/_includes/dev-shortcuts.html +57 -0
- data/_includes/footer.html +57 -0
- data/_includes/giscus.html +16 -0
- data/_includes/google-analytics.html +9 -0
- data/_includes/google-tag-manager-body.html +8 -0
- data/_includes/google-tag-manager-head.html +10 -0
- data/_includes/halfmoon.html +35 -0
- data/_includes/head.html +95 -0
- data/_includes/header.html +79 -0
- data/_includes/info-section.html +33 -0
- data/_includes/intro.html +27 -0
- data/_includes/js-cdn.html +24 -0
- data/_includes/nav_list.html +63 -0
- data/_includes/navbar.html +34 -0
- data/_includes/powered-by.html +22 -0
- data/_includes/quick-index.html +17 -0
- data/_includes/searchbar.html +10 -0
- data/_includes/seo.html +131 -0
- data/_includes/sidebar-categories.html +21 -0
- data/_includes/sidebar-folders.html +107 -0
- data/_includes/sidebar-left.html +41 -0
- data/_includes/sidebar-right.html +47 -0
- data/_includes/sitemap.html +123 -0
- data/_includes/style.html +1574 -0
- data/_includes/svg.html +81 -0
- data/_includes/toc +7 -0
- data/_includes/toc.html +182 -0
- data/_includes/zer0-env-var.html +88 -0
- data/_layouts/collection.html +42 -0
- data/_layouts/default.html +37 -0
- data/_layouts/home.html +16 -0
- data/_layouts/index.html +8 -0
- data/_layouts/javascript.html +8 -0
- data/_layouts/journals.html +41 -0
- data/_layouts/root.html +54 -0
- data/_sass/custom.scss +331 -0
- data/_sass/it-journey/_docs.scss +3219 -0
- data/_sass/it-journey/_syntax.scss +342 -0
- data/_sass/it-journey/_theme.scss +247 -0
- data/_sass/it-journey/_variables.scss +521 -0
- data/_sass/it-journey/code-copy.scss +105 -0
- data/assets/.DS_Store +0 -0
- data/assets/css/custom.css +120 -0
- data/assets/css/main.scss +22 -0
- data/assets/images/favicon_gpt_computer_retro.png +0 -0
- data/assets/images/gravatar-small.png +0 -0
- data/assets/images/gravatar.png +0 -0
- data/assets/images/info-banner-mountain-wizard.png +0 -0
- data/assets/images/wizard-on-journey.png +0 -0
- data/assets/images/zer0-checkpoint-1.png +0 -0
- data/assets/images/zer0-checkpoint-2.png +0 -0
- data/assets/js/auto-hide-nav.js +18 -0
- data/assets/js/back-to-top.js +24 -0
- data/assets/js/cheetsheet.js +73 -0
- data/assets/js/code-copy.js +27 -0
- data/assets/js/color-modes.js +80 -0
- data/assets/js/docs.min.js +1 -0
- data/assets/js/halfmoon.js +80 -0
- data/assets/js/myScript.js +12 -0
- data/assets/js/nanobar.min.js +1 -0
- data/assets/js/particles-source.js +888 -0
- data/assets/js/particles.js +133 -0
- data/assets/js/side-bar-folders.js +12 -0
- data/assets/particles.json +110 -0
- metadata +153 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
-------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
/* Customize theme
|
|
3
|
+
/* ------------------------------------------------------------------------------------------------------------------- */
|
|
4
|
+
|
|
5
|
+
/* Remove padding so particles fill screen */
|
|
6
|
+
.masthead {
|
|
7
|
+
padding-top: 0rem;
|
|
8
|
+
padding-bottom: 0rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Add background and shadow to navbar when scrolling */
|
|
12
|
+
#mainNav.navbar-shrink {
|
|
13
|
+
background-color: white;
|
|
14
|
+
box-shadow: 0px 0px 30px rgba(44, 62, 80, 0.5);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Set navbar brand color */
|
|
18
|
+
#mainNav .navbar-brand {
|
|
19
|
+
color: #1abc9c;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Underline navbar brand on hover */
|
|
23
|
+
#mainNav .navbar-brand:hover {
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Set navbar link color */
|
|
28
|
+
#mainNav .navbar-nav li.nav-item a.nav-link {
|
|
29
|
+
color: #2c3e50;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#mainNav .navbar-nav li.nav-item a.nav-link:active, #mainNav .navbar-nav li.nav-item a.nav-link:focus {
|
|
33
|
+
color: #2c3e50;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Set navbar link color and underline on hover */
|
|
37
|
+
#mainNav .navbar-nav li.nav-item a.nav-link:hover {
|
|
38
|
+
color: #1abc9c;
|
|
39
|
+
border-bottom: 3px solid;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#mainNav .navbar-nav li.nav-item a.nav-link.active {
|
|
43
|
+
color: #1abc9c;
|
|
44
|
+
border-bottom: 3px solid;
|
|
45
|
+
background: white;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 992px) {
|
|
49
|
+
#mainNav .navbar-nav > li.nav-item > a.nav-link.active:active, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:focus, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:hover {
|
|
50
|
+
color: #1abc9c;
|
|
51
|
+
border-bottom: 3px solid;
|
|
52
|
+
background: white;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Increase top margin of divider line to align with icon */
|
|
57
|
+
.divider-custom-line {
|
|
58
|
+
margin-top: 1.75rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Increase icon size in social buttons */
|
|
62
|
+
.btn-social {
|
|
63
|
+
font-size: 1.5rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ------------------------------------------------------------------------------------------------------------------- */
|
|
67
|
+
/* Add new components
|
|
68
|
+
/* ------------------------------------------------------------------------------------------------------------------- */
|
|
69
|
+
|
|
70
|
+
/* Add divider-primary class to set dividers to primary color */
|
|
71
|
+
.divider-custom.divider-primary .divider-custom-line {
|
|
72
|
+
background-color: #1abc9c;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.divider-custom.divider-primary .divider-custom-icon {
|
|
76
|
+
color: #1abc9c !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Center text landing over previous element */
|
|
80
|
+
#textlanding {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 50%;
|
|
83
|
+
right: 50%;
|
|
84
|
+
transform: translate(50%,-50%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Move arrow near bottom of section */
|
|
88
|
+
#arrowlanding {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 95%;
|
|
91
|
+
right: 50%;
|
|
92
|
+
transform: translate(50%,-50%);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Set arrow color */
|
|
96
|
+
#arrowlanding a {
|
|
97
|
+
color: #2c3e50;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Set arrow color on hover */
|
|
101
|
+
#arrowlanding a:hover {
|
|
102
|
+
color: #1abc9c;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Ensure particles span entire section */
|
|
106
|
+
#particles-js {
|
|
107
|
+
width: 100%;
|
|
108
|
+
/* height: 100%; */
|
|
109
|
+
/* background-color: white; */
|
|
110
|
+
background-image: url('');
|
|
111
|
+
background-size: cover;
|
|
112
|
+
/* background-position: 50% 50%; */
|
|
113
|
+
background-repeat: no-repeat;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
.nanobar .bar {
|
|
118
|
+
margin-top: 56px;
|
|
119
|
+
background: #1cc927;
|
|
120
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
# this ensures Jekyll reads the file to be transformed into CSS later
|
|
3
|
+
# only Main files contain this front matter, not partials.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
@charset "utf-8";
|
|
7
|
+
|
|
8
|
+
// Styling Variables
|
|
9
|
+
@import "it-journey/variables";
|
|
10
|
+
@import "it-journey/docs";
|
|
11
|
+
@import "it-journey/theme";
|
|
12
|
+
|
|
13
|
+
// Bootstrap Styles
|
|
14
|
+
// @import "bootstrap.scss";
|
|
15
|
+
|
|
16
|
+
// Custom Styles
|
|
17
|
+
@import "custom.scss";
|
|
18
|
+
|
|
19
|
+
// Custom Features
|
|
20
|
+
@import "it-journey/code-copy";
|
|
21
|
+
@import "it-journey/syntax";
|
|
22
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Hides the navbar when scrolling down half a page and shows it when scrolling up
|
|
2
|
+
window.onload = function() {
|
|
3
|
+
let lastScrollTop = 0;
|
|
4
|
+
const navbar = document.getElementById('navbar');
|
|
5
|
+
|
|
6
|
+
window.addEventListener('scroll', function() {
|
|
7
|
+
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
8
|
+
let halfPageHeight = window.innerHeight / 2;
|
|
9
|
+
|
|
10
|
+
if (scrollTop > lastScrollTop && scrollTop > halfPageHeight) {
|
|
11
|
+
navbar.classList.add('hide-navbar');
|
|
12
|
+
navbar.classList.add('fixed-navbar');
|
|
13
|
+
} else {
|
|
14
|
+
navbar.classList.remove('hide-navbar');
|
|
15
|
+
}
|
|
16
|
+
lastScrollTop = scrollTop;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
|
2
|
+
let mybutton = document.getElementById("backToTopBtn");
|
|
3
|
+
|
|
4
|
+
function topFunction() {
|
|
5
|
+
document.body.scrollTop = 0; // For Safari
|
|
6
|
+
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
|
|
7
|
+
mybutton.style.opacity = "75%";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (mybutton) {
|
|
11
|
+
mybutton.onclick = topFunction;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// When the user scrolls down 20px from the top of the document, show the button
|
|
15
|
+
window.onscroll = function() {scrollFunction()};
|
|
16
|
+
|
|
17
|
+
function scrollFunction() {
|
|
18
|
+
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
|
|
19
|
+
mybutton.style.display = "block";
|
|
20
|
+
} else {
|
|
21
|
+
mybutton.style.display = "none";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* global bootstrap: false */
|
|
2
|
+
|
|
3
|
+
(() => {
|
|
4
|
+
'use strict'
|
|
5
|
+
|
|
6
|
+
// Tooltip and popover demos
|
|
7
|
+
document.querySelectorAll('.tooltip-demo')
|
|
8
|
+
.forEach(tooltip => {
|
|
9
|
+
new bootstrap.Tooltip(tooltip, {
|
|
10
|
+
selector: '[data-bs-toggle="tooltip"]'
|
|
11
|
+
})
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
document.querySelectorAll('[data-bs-toggle="popover"]')
|
|
15
|
+
.forEach(popover => {
|
|
16
|
+
new bootstrap.Popover(popover)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
document.querySelectorAll('.toast')
|
|
20
|
+
.forEach(toastNode => {
|
|
21
|
+
const toast = new bootstrap.Toast(toastNode, {
|
|
22
|
+
autohide: false
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
toast.show()
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
// Disable empty links and submit buttons
|
|
29
|
+
document.querySelectorAll('[href="#"], [type="submit"]')
|
|
30
|
+
.forEach(link => {
|
|
31
|
+
link.addEventListener('click', event => {
|
|
32
|
+
event.preventDefault()
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
function setActiveItem() {
|
|
37
|
+
const { hash } = window.location
|
|
38
|
+
|
|
39
|
+
if (hash === '') {
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const link = document.querySelector(`.bd-aside a[href="${hash}"]`)
|
|
44
|
+
|
|
45
|
+
if (!link) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const active = document.querySelector('.bd-aside .active')
|
|
50
|
+
const parent = link.parentNode.parentNode.previousElementSibling
|
|
51
|
+
|
|
52
|
+
link.classList.add('active')
|
|
53
|
+
|
|
54
|
+
if (parent.classList.contains('collapsed')) {
|
|
55
|
+
parent.click()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (!active) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const expanded = active.parentNode.parentNode.previousElementSibling
|
|
63
|
+
|
|
64
|
+
active.classList.remove('active')
|
|
65
|
+
|
|
66
|
+
if (expanded && parent !== expanded) {
|
|
67
|
+
expanded.click()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
setActiveItem()
|
|
72
|
+
window.addEventListener('hashchange', setActiveItem)
|
|
73
|
+
})()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
2
|
+
document
|
|
3
|
+
.querySelectorAll('pre.highlight')
|
|
4
|
+
.forEach(function (pre) {
|
|
5
|
+
var button = document.createElement('button');
|
|
6
|
+
var copyText = 'Copy';
|
|
7
|
+
button.className = 'copy';
|
|
8
|
+
button.type = 'button';
|
|
9
|
+
button.ariaLabel = 'Copy code to clipboard';
|
|
10
|
+
button.innerText = copyText;
|
|
11
|
+
button.tabIndex = 1; // Add this line to make the button focusable with the keyboard
|
|
12
|
+
button.addEventListener('click', function () {
|
|
13
|
+
var code = pre.querySelector('code').innerText
|
|
14
|
+
.split('\n')
|
|
15
|
+
.filter(line => !line.trim().startsWith('#'))
|
|
16
|
+
.join('\n')
|
|
17
|
+
.trim();
|
|
18
|
+
navigator.clipboard.writeText(code);
|
|
19
|
+
button.innerText = 'Copied';
|
|
20
|
+
setTimeout(function () {
|
|
21
|
+
button.innerText = copyText;
|
|
22
|
+
}, 4000);
|
|
23
|
+
});
|
|
24
|
+
pre.appendChild(button);
|
|
25
|
+
pre.classList.add('has-copy-button'); // Add a class to the pre element
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
|
|
3
|
+
* Copyright 2011-2024 The Bootstrap Authors
|
|
4
|
+
* Licensed under the Creative Commons Attribution 3.0 Unported License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(() => {
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
const getStoredTheme = () => localStorage.getItem('theme')
|
|
11
|
+
const setStoredTheme = theme => localStorage.setItem('theme', theme)
|
|
12
|
+
|
|
13
|
+
const getPreferredTheme = () => {
|
|
14
|
+
const storedTheme = getStoredTheme()
|
|
15
|
+
if (storedTheme) {
|
|
16
|
+
return storedTheme
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const setTheme = theme => {
|
|
23
|
+
if (theme === 'auto') {
|
|
24
|
+
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
|
25
|
+
} else {
|
|
26
|
+
document.documentElement.setAttribute('data-bs-theme', theme)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setTheme(getPreferredTheme())
|
|
31
|
+
|
|
32
|
+
const showActiveTheme = (theme, focus = false) => {
|
|
33
|
+
const themeSwitcher = document.querySelector('#bd-theme')
|
|
34
|
+
|
|
35
|
+
if (!themeSwitcher) {
|
|
36
|
+
return
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const themeSwitcherText = document.querySelector('#bd-theme-text')
|
|
40
|
+
const activeThemeIcon = document.querySelector('.theme-icon-active use')
|
|
41
|
+
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
|
|
42
|
+
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')
|
|
43
|
+
|
|
44
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
|
45
|
+
element.classList.remove('active')
|
|
46
|
+
element.setAttribute('aria-pressed', 'false')
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
btnToActive.classList.add('active')
|
|
50
|
+
btnToActive.setAttribute('aria-pressed', 'true')
|
|
51
|
+
activeThemeIcon.setAttribute('href', svgOfActiveBtn)
|
|
52
|
+
const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`
|
|
53
|
+
themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)
|
|
54
|
+
|
|
55
|
+
if (focus) {
|
|
56
|
+
themeSwitcher.focus()
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
61
|
+
const storedTheme = getStoredTheme()
|
|
62
|
+
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
|
63
|
+
setTheme(getPreferredTheme())
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
68
|
+
showActiveTheme(getPreferredTheme())
|
|
69
|
+
|
|
70
|
+
document.querySelectorAll('[data-bs-theme-value]')
|
|
71
|
+
.forEach(toggle => {
|
|
72
|
+
toggle.addEventListener('click', () => {
|
|
73
|
+
const theme = toggle.getAttribute('data-bs-theme-value')
|
|
74
|
+
setStoredTheme(theme)
|
|
75
|
+
setTheme(theme)
|
|
76
|
+
showActiveTheme(theme, true)
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
})()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a,b){"use strict";"function"==typeof define&&define.amd?define([],b):"object"==typeof module&&module.exports?module.exports=b():(a.AnchorJS=b(),a.anchors=new a.AnchorJS)}(this,function(){"use strict";return function(c){function a(a){a.icon=Object.prototype.hasOwnProperty.call(a,"icon")?a.icon:"",a.visible=Object.prototype.hasOwnProperty.call(a,"visible")?a.visible:"hover",a.placement=Object.prototype.hasOwnProperty.call(a,"placement")?a.placement:"right",a.ariaLabel=Object.prototype.hasOwnProperty.call(a,"ariaLabel")?a.ariaLabel:"Anchor",a.class=Object.prototype.hasOwnProperty.call(a,"class")?a.class:"",a.base=Object.prototype.hasOwnProperty.call(a,"base")?a.base:"",a.truncate=Object.prototype.hasOwnProperty.call(a,"truncate")?Math.floor(a.truncate):64,a.titleText=Object.prototype.hasOwnProperty.call(a,"titleText")?a.titleText:""}function b(a){var b;if("string"==typeof a||a instanceof String)b=[].slice.call(document.querySelectorAll(a));else{if(!(Array.isArray(a)||a instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");b=[].slice.call(a)}return b}this.options=c||{},this.elements=[],a(this.options),this.isTouchDevice=function(){return Boolean("ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(k){var e,o,h,c,i,n,p,g,d,m,j,f,l=[];if(a(this.options),"touch"===(m=this.options.visible)&&(m=this.isTouchDevice()?"always":"hover"),0===(e=b(k=k||"h2, h3, h4, h5, h6")).length)return this;for(null===document.head.querySelector("style.anchorjs")&&((f=document.createElement("style")).className="anchorjs",f.appendChild(document.createTextNode("")),void 0===(k=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(f):document.head.insertBefore(f,k),f.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",f.sheet.cssRules.length),f.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",f.sheet.cssRules.length),f.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",f.sheet.cssRules.length),f.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',f.sheet.cssRules.length)),f=document.querySelectorAll("[id]"),o=[].map.call(f,function(a){return a.id}),c=0;c<e.length;c++)if(this.hasAnchorJSLink(e[c]))l.push(c);else{if(e[c].hasAttribute("id"))h=e[c].getAttribute("id");else if(e[c].hasAttribute("data-anchor-id"))h=e[c].getAttribute("data-anchor-id");else{for(g=p=this.urlify(e[c].textContent),n=0;i=o.indexOf(g=void 0!==i?p+"-"+n:g),n+=1,-1!==i;);i=void 0,o.push(g),e[c].setAttribute("id",g),h=g}(d=document.createElement("a")).className="anchorjs-link "+this.options.class,d.setAttribute("aria-label",this.options.ariaLabel),d.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(d.title=this.options.titleText),j=document.querySelector("base")?window.location.pathname+window.location.search:"",j=this.options.base||j,d.href=j+"#"+h,"always"===m&&(d.style.opacity="1"),""===this.options.icon&&(d.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(d.style.lineHeight="inherit")),"left"===this.options.placement?(d.style.position="absolute",d.style.marginLeft="-1em",d.style.paddingRight=".5em",e[c].insertBefore(d,e[c].firstChild)):(d.style.paddingLeft=".375em",e[c].appendChild(d))}for(c=0;c<l.length;c++)e.splice(l[c]-c,1);return this.elements=this.elements.concat(e),this},this.remove=function(f){for(var d,e,c=b(f),a=0;a<c.length;a++)(e=c[a].querySelector(".anchorjs-link"))&&(-1!==(d=this.elements.indexOf(c[a]))&&this.elements.splice(d,1),c[a].removeChild(e));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(b){var c=document.createElement("textarea");return c.innerHTML=b,b=c.value,this.options.truncate||a(this.options),b.trim().replace(/'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(a){var b=a.firstChild&&-1<(" "+a.firstChild.className+" ").indexOf(" anchorjs-link "),a=a.lastChild&&-1<(" "+a.lastChild.className+" ").indexOf(" anchorjs-link ");return b||a||!1}}}),!function(b,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports.ClipboardJS=a():b.ClipboardJS=a()}(this,function(){return c={134:function(p,a,b){"use strict";var n,m,f,i,g;b.d(a,{default:function(){return g}}),a=b(279),n=b.n(a),a=b(370),m=b.n(a),a=b(817),f=b.n(a);function j(a){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function h(d,c){for(var b=0,a;b<c.length;b++)a=c[b],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}i=function(){function a(b){!function(b){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function")}(this),this.resolveOptions(b),this.initSelection()}var b,c,d;return b=a,(c=[{key:"resolveOptions",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=a.action,this.container=a.container,this.emitter=a.emitter,this.target=a.target,this.text=a.text,this.trigger=a.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var a="rtl"===document.documentElement.getAttribute("dir");return this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[a?"right":"left"]="-9999px",a=window.pageYOffset||document.documentElement.scrollTop,this.fakeElem.style.top="".concat(a,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var b=this,a=this.createFakeElement();this.fakeHandlerCallback=function(){return b.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(a),this.selectedText=f()(a),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=f()(this.target),this.copyText()}},{key:"copyText",value:function(){var a;try{a=document.execCommand(this.action)}catch(b){a=!1}this.handleResult(a)}},{key:"handleResult",value:function(a){this.emitter.emit(a?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=a,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==j(a)||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}])&&h(b.prototype,c),d&&h(b,d),a}();function c(a){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function k(d,c){for(var b=0,a;b<c.length;b++)a=c[b],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}function l(a,b){return(l=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function o(a){var b=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var e,f=d(a);return e=b?(e=d(this).constructor,Reflect.construct(f,arguments,e)):f.apply(this,arguments),f=this,!(e=e)||"object"!==c(e)&&"function"!=typeof e?function(a){if(void 0!==a)return a;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(f):e}}function d(a){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}function e(a,b){if(a="data-clipboard-".concat(a),b.hasAttribute(a))return b.getAttribute(a)}g=function(){!function(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),a&&l(b,a)}(a,n());var b,f,d,g=o(a);function a(c,d){var b;return function(b){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function")}(this),(b=g.call(this)).resolveOptions(d),b.listenClick(c),b}return b=a,d=[{key:"isSupported",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],a="string"==typeof a?[a]:a,b=!!document.queryCommandSupported;return a.forEach(function(a){b=b&&!!document.queryCommandSupported(a)}),b}}],(f=[{key:"resolveOptions",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof a.action?a.action:this.defaultAction,this.target="function"==typeof a.target?a.target:this.defaultTarget,this.text="function"==typeof a.text?a.text:this.defaultText,this.container="object"===c(a.container)?a.container:document.body}},{key:"listenClick",value:function(a){var b=this;this.listener=m()(a,"click",function(a){return b.onClick(a)})}},{key:"onClick",value:function(a){a=a.delegateTarget||a.currentTarget,this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i({action:this.action(a),target:this.target(a),text:this.text(a),container:this.container,trigger:a,emitter:this})}},{key:"defaultAction",value:function(a){return e("action",a)}},{key:"defaultTarget",value:function(a){if(a=e("target",a),a)return document.querySelector(a)}},{key:"defaultText",value:function(a){return e("text",a)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&k(b.prototype,f),d&&k(b,d),a}()},828:function(b){var a;"undefined"==typeof Element||Element.prototype.matches||((a=Element.prototype).matches=a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector),b.exports=function(a,b){for(;a&&9!==a.nodeType;){if("function"==typeof a.matches&&a.matches(b))return a;a=a.parentNode}}},438:function(b,e,c){var d=c(828);function a(a,f,b,g,c){var e=function(a,b,e,c){return function(e){e.delegateTarget=d(e.target,b),e.delegateTarget&&c.call(a,e)}}.apply(this,arguments);return a.addEventListener(b,e,c),{destroy:function(){a.removeEventListener(b,e,c)}}}b.exports=function(b,d,c,e,f){return"function"==typeof b.addEventListener?a.apply(null,arguments):"function"==typeof c?a.bind(null,document).apply(null,arguments):("string"==typeof b&&(b=document.querySelectorAll(b)),Array.prototype.map.call(b,function(b){return a(b,d,c,e,f)}))}},879:function(b,a){a.node=function(a){return void 0!==a&&a instanceof HTMLElement&&1===a.nodeType},a.nodeList=function(b){var c=Object.prototype.toString.call(b);return void 0!==b&&("[object NodeList]"===c||"[object HTMLCollection]"===c)&&"length"in b&&(0===b.length||a.node(b[0]))},a.string=function(a){return"string"==typeof a||a instanceof String},a.fn=function(a){return"[object Function]"===Object.prototype.toString.call(a)}},370:function(c,e,b){var a=b(879),d=b(438);c.exports=function(b,c,e){if(!b&&!c&&!e)throw new Error("Missing required arguments");if(!a.string(c))throw new TypeError("Second argument must be a String");if(!a.fn(e))throw new TypeError("Third argument must be a Function");if(a.node(b))return i=c,j=e,(k=b).addEventListener(i,j),{destroy:function(){k.removeEventListener(i,j)}};if(a.nodeList(b))return f=b,g=c,h=e,Array.prototype.forEach.call(f,function(a){a.addEventListener(g,h)}),{destroy:function(){Array.prototype.forEach.call(f,function(a){a.removeEventListener(g,h)})}};if(a.string(b))return b=b,c=c,e=e,d(document.body,b,c,e);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var f,g,h,k,i,j}},817:function(a){a.exports=function(a){var c,b="SELECT"===a.nodeName?(a.focus(),a.value):"INPUT"===a.nodeName||"TEXTAREA"===a.nodeName?((c=a.hasAttribute("readonly"))||a.setAttribute("readonly",""),a.select(),a.setSelectionRange(0,a.value.length),c||a.removeAttribute("readonly"),a.value):(a.hasAttribute("contenteditable")&&a.focus(),b=window.getSelection(),(c=document.createRange()).selectNodeContents(a),b.removeAllRanges(),b.addRange(c),b.toString());return b}},279:function(b){function a(){}a.prototype={on:function(a,c,d){var b=this.e||(this.e={});return(b[a]||(b[a]=[])).push({fn:c,ctx:d}),this},once:function(b,c,d){var e=this;function a(){e.off(b,a),c.apply(d,arguments)}return a._=c,this.on(b,a,d)},emit:function(c){for(var d=[].slice.call(arguments,1),b=((this.e||(this.e={}))[c]||[]).slice(),a=0,e=b.length;a<e;a++)b[a].fn.apply(b[a].ctx,d);return this},off:function(c,d){var e=this.e||(this.e={}),a=e[c],f=[],b,g;if(a&&d)for(b=0,g=a.length;b<g;b++)a[b].fn!==d&&a[b].fn._!==d&&f.push(a[b]);return f.length?e[c]=f:delete e[c],this}},b.exports=a,b.exports.TinyEmitter=a}},b={},a.n=function(b){var c=b&&b.__esModule?function(){return b.default}:function(){return b};return a.d(c,{a:c}),c},a.d=function(d,c){for(var b in c)a.o(c,b)&&!a.o(d,b)&&Object.defineProperty(d,b,{enumerable:!0,get:c[b]})},a.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},a(134).default;function a(d){if(b[d])return b[d].exports;var e=b[d]={exports:{}};return c[d](e,e.exports,a),e.exports}var c,b}),function(){'use strict';var a,c,h,f,e,b,g,d;document.querySelectorAll('.tooltip-demo').forEach(function(a){new bootstrap.Tooltip(a,{selector:'[data-bs-toggle="tooltip"]'})}),document.querySelectorAll('[data-bs-toggle="popover"]').forEach(function(a){new bootstrap.Popover(a)}),a=document.getElementById('toastPlacement'),a&&document.getElementById('selectToastPlacement').addEventListener('change',function(){a.dataset.originalClass||(a.dataset.originalClass=a.className),a.className=a.dataset.originalClass+' '+this.value}),document.querySelectorAll('.bd-example .toast').forEach(function(a){var b=new bootstrap.Toast(a,{autohide:!1});b.show()}),c=document.getElementById('liveToastBtn'),h=document.getElementById('liveToast'),c&&c.addEventListener('click',function(){var a=new bootstrap.Toast(h);a.show()}),f=document.getElementById('liveAlertPlaceholder'),e=document.getElementById('liveAlertBtn');function i(b,c){var a=document.createElement('div');a.innerHTML='<div class="alert alert-'+c+' alert-dismissible" role="alert">'+b+'<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>',f.append(a)}e&&e.addEventListener('click',function(){i('Nice, you triggered this alert message!','success')}),document.querySelectorAll('.tooltip-test').forEach(function(a){new bootstrap.Tooltip(a)}),document.querySelectorAll('.popover-test').forEach(function(a){new bootstrap.Popover(a)}),document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]').forEach(function(a){a.indeterminate=!0}),document.querySelectorAll('.bd-content [href="#"]').forEach(function(a){a.addEventListener('click',function(a){a.preventDefault()})}),b=document.getElementById('exampleModal'),b&&b.addEventListener('show.bs.modal',function(c){var d=c.relatedTarget,a=d.getAttribute('data-bs-whatever'),e=b.querySelector('.modal-title'),f=b.querySelector('.modal-body input');e.textContent='New message to '+a,f.value=a}),g='<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>',document.querySelectorAll('div.highlight').forEach(function(a){a.insertAdjacentHTML('beforebegin',g)}),document.querySelectorAll('.btn-clipboard').forEach(function(a){var b=new bootstrap.Tooltip(a);a.addEventListener('mouseleave',function(){b.hide()})}),d=new ClipboardJS('.btn-clipboard',{target:function(a){return a.parentNode.nextElementSibling}}),d.on('success',function(a){var b=bootstrap.Tooltip.getInstance(a.trigger);a.trigger.setAttribute('data-bs-original-title','Copied!'),b.show(),a.trigger.setAttribute('data-bs-original-title','Copy to clipboard'),a.clearSelection()}),d.on('error',function(a){var b=/mac/i.test(navigator.userAgent)?'\u2318':'Ctrl-',c='Press '+b+'C to copy',d=bootstrap.Tooltip.getInstance(a.trigger);a.trigger.setAttribute('data-bs-original-title',c),d.show(),a.trigger.setAttribute('data-bs-original-title','Copy to clipboard')}),anchors.options={icon:'#'},anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')}(),function(){'use strict';var a=document.getElementById('search-input'),b;if(!window.docsearch||!a)return;b=a.getAttribute('data-bd-docs-version'),document.addEventListener('keydown',function(b){b.ctrlKey&&b.key==='/'&&(b.preventDefault(),a.focus())}),window.docsearch({apiKey:'5990ad008512000bba2cf951ccf0332f',indexName:'bootstrap',inputSelector:'#search-input',algoliaOptions:{facetFilters:['version:'+b]},transformData:function(a){return a.map(function(a){var b='https://getbootstrap.com/';return a.url=window.location.origin.startsWith(b)?a.url:a.url.replace(b,'/'),a.anchor==='content'&&(a.url=a.url.replace(/#content$/,''),a.anchor=null),a})},debug:!1})}()
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
|
|
3
|
+
* Copyright 2011-2024 The Bootstrap Authors
|
|
4
|
+
* Licensed under the Creative Commons Attribution 3.0 Unported License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(() => {
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
const getStoredTheme = () => localStorage.getItem('theme')
|
|
11
|
+
const setStoredTheme = theme => localStorage.setItem('theme', theme)
|
|
12
|
+
|
|
13
|
+
const getPreferredTheme = () => {
|
|
14
|
+
const storedTheme = getStoredTheme()
|
|
15
|
+
if (storedTheme) {
|
|
16
|
+
return storedTheme
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const setTheme = theme => {
|
|
23
|
+
if (theme === 'auto') {
|
|
24
|
+
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
|
25
|
+
} else {
|
|
26
|
+
document.documentElement.setAttribute('data-bs-theme', theme)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setTheme(getPreferredTheme())
|
|
31
|
+
|
|
32
|
+
const showActiveTheme = (theme, focus = false) => {
|
|
33
|
+
const themeSwitcher = document.querySelector('#bd-theme')
|
|
34
|
+
|
|
35
|
+
if (!themeSwitcher) {
|
|
36
|
+
return
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const themeSwitcherText = document.querySelector('#bd-theme-text')
|
|
40
|
+
const activeThemeIcon = document.querySelector('.theme-icon-active use')
|
|
41
|
+
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
|
|
42
|
+
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')
|
|
43
|
+
|
|
44
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
|
45
|
+
element.classList.remove('active')
|
|
46
|
+
element.setAttribute('aria-pressed', 'false')
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
btnToActive.classList.add('active')
|
|
50
|
+
btnToActive.setAttribute('aria-pressed', 'true')
|
|
51
|
+
activeThemeIcon.setAttribute('href', svgOfActiveBtn)
|
|
52
|
+
const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`
|
|
53
|
+
themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)
|
|
54
|
+
|
|
55
|
+
if (focus) {
|
|
56
|
+
themeSwitcher.focus()
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
61
|
+
const storedTheme = getStoredTheme()
|
|
62
|
+
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
|
63
|
+
setTheme(getPreferredTheme())
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
68
|
+
showActiveTheme(getPreferredTheme())
|
|
69
|
+
|
|
70
|
+
document.querySelectorAll('[data-bs-theme-value]')
|
|
71
|
+
.forEach(toggle => {
|
|
72
|
+
toggle.addEventListener('click', () => {
|
|
73
|
+
const theme = toggle.getAttribute('data-bs-theme-value')
|
|
74
|
+
setStoredTheme(theme)
|
|
75
|
+
setTheme(theme)
|
|
76
|
+
showActiveTheme(theme, true)
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
})()
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function myFunction() {
|
|
2
|
+
myVar = 1;
|
|
3
|
+
myVar = myVar + 1;
|
|
4
|
+
document.getElementById("demo").innerHTML = myVar;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Updates each img tag with the class img-fluid
|
|
8
|
+
|
|
9
|
+
var imgs = document.getElementsByTagName('img');
|
|
10
|
+
for (var i = 0; i < imgs.length; i++) {
|
|
11
|
+
imgs[i].classList.add('img-fluid');
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(root){"use strict";var css=".nanobar{width:100%;height:4px;z-index:9999;top:0}.bar{width:0;height:100%;transition:height .3s;background:#000}";function addCss(){var s=document.getElementById("nanobarcss");if(s===null){s=document.createElement("style");s.type="text/css";s.id="nanobarcss";document.head.insertBefore(s,document.head.firstChild);if(!s.styleSheet)return s.appendChild(document.createTextNode(css));s.styleSheet.cssText=css}}function addClass(el,cls){if(el.classList)el.classList.add(cls);else el.className+=" "+cls}function createBar(rm){var el=document.createElement("div"),width=0,here=0,on=0,bar={el:el,go:go};addClass(el,"bar");function move(){var dist=width-here;if(dist<.1&&dist>-.1){place(here);on=0;if(width>=100){el.style.height=0;setTimeout(function(){rm(el)},300)}}else{place(width-dist/4);setTimeout(go,16)}}function place(num){width=num;el.style.width=width+"%"}function go(num){if(num>=0){here=num;if(!on){on=1;move()}}else if(on){move()}}return bar}function Nanobar(opts){opts=opts||{};var el=document.createElement("div"),applyGo,nanobar={el:el,go:function(p){applyGo(p);if(p>=100){init()}}};function rm(child){el.removeChild(child)}function init(){var bar=createBar(rm);el.appendChild(bar.el);applyGo=bar.go}addCss();addClass(el,"nanobar");if(opts.id)el.id=opts.id;if(opts.classname)addClass(el,opts.classname);if(opts.target){el.style.position="relative";opts.target.insertBefore(el,opts.target.firstChild)}else{el.style.position="fixed";document.getElementsByTagName("body")[0].appendChild(el)}init();return nanobar}if(typeof exports==="object"){module.exports=Nanobar}else if(typeof define==="function"&&define.amd){define([],function(){return Nanobar})}else{root.Nanobar=Nanobar}})(this);
|