removal of files and things that aren't needed
changed the theme, so these files aren't needed anymoremain
parent
21e726dc8c
commit
bc86dbd05a
|
@ -1,366 +0,0 @@
|
|||
html {
|
||||
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||
main container. */
|
||||
scroll-padding-top: calc(3.5rem + 20px);
|
||||
}
|
||||
|
||||
/* Replacement for `body { background-attachment: fixed; }`, which has
|
||||
performance issues when scrolling on large displays. See #1394. */
|
||||
body::before {
|
||||
content: ' ';
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: var(--bs-body-bg);
|
||||
background: url(../img/grid.png) repeat-x;
|
||||
will-change: transform;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
body > .container {
|
||||
margin-top: 20px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.navbar.fixed-top {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.source-links {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.col-md-9 img {
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
line-height: 1.428571429;
|
||||
background-color: var(--bs-secondary-bg-subtle);
|
||||
border: 1px solid var(--bs-secondary-border-subtle);
|
||||
border-radius: 4px;
|
||||
margin: 20px auto 30px auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: inherit;
|
||||
font-weight: 400;
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
color: inherit;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #aaa;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
pre, .rst-content tt {
|
||||
max-width: 100%;
|
||||
background-color: var(--bs-body-bg);
|
||||
border: solid 1px var(--bs-border-color);
|
||||
color: var(--bs-body-color);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
code.code-large, .rst-content tt.code-large {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 2px 5px;
|
||||
background-color: rgba(var(--bs-body-bg-rgb), 0.75);
|
||||
border: solid 1px var(--bs-border-color);
|
||||
color: var(--bs-body-color);
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
pre code {
|
||||
display: block;
|
||||
border: none;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
color: var(--bs-secondary-text-emphasis);
|
||||
background-color: var(--bs-secondary-bg-subtle);
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||
}
|
||||
|
||||
a code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
a:hover code, a:focus code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Side navigation
|
||||
*
|
||||
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
|
||||
* sections of docs content.
|
||||
*/
|
||||
|
||||
.bs-sidebar.affix {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||
main container. */
|
||||
top: calc(3.5rem + 20px);
|
||||
}
|
||||
|
||||
.bs-sidebar.card {
|
||||
padding: 0;
|
||||
max-height: 90%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* Toggle (vertically flip) sidebar collapse icon */
|
||||
.bs-sidebar .navbar-toggler span {
|
||||
-moz-transform: scale(1, -1);
|
||||
-webkit-transform: scale(1, -1);
|
||||
-o-transform: scale(1, -1);
|
||||
-ms-transform: scale(1, -1);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
|
||||
.bs-sidebar .navbar-toggler.collapsed span {
|
||||
-moz-transform: scale(1, 1);
|
||||
-webkit-transform: scale(1, 1);
|
||||
-o-transform: scale(1, 1);
|
||||
-ms-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
/* First level of nav */
|
||||
.bs-sidebar > .navbar-collapse > .nav {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* All levels of nav */
|
||||
.bs-sidebar .nav > li > a {
|
||||
display: block;
|
||||
padding: 5px 20px;
|
||||
z-index: 1;
|
||||
}
|
||||
.bs-sidebar .nav > li > a:hover,
|
||||
.bs-sidebar .nav > li > a:focus {
|
||||
text-decoration: none;
|
||||
border-right: 1px solid;
|
||||
}
|
||||
.bs-sidebar .nav > li > a.active,
|
||||
.bs-sidebar .nav > li > a.active:hover,
|
||||
.bs-sidebar .nav > li > a.active:focus {
|
||||
font-weight: bold;
|
||||
background-color: transparent;
|
||||
border-right: 1px solid;
|
||||
}
|
||||
|
||||
.bs-sidebar .nav .nav .nav {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.bs-sidebar .nav > li > a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bs-sidebar .nav .nav > li > a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.headerlink {
|
||||
font-family: FontAwesome;
|
||||
font-size: 14px;
|
||||
display: none;
|
||||
padding-left: .5em;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding-left: 10px;
|
||||
border-left: 4px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.admonition, details {
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.admonition.note, details.note {
|
||||
color: var(--bs-primary-text-emphasis);
|
||||
background-color: var(--bs-primary-bg-subtle);
|
||||
border-color: var(--bs-primary-border-subtle);
|
||||
}
|
||||
|
||||
.admonition.note h1, .admonition.note h2, .admonition.note h3,
|
||||
.admonition.note h4, .admonition.note h5, .admonition.note h6,
|
||||
details.note h1, details.note h2, details.note h3,
|
||||
details.note h4, details.note h5, details.note h6 {
|
||||
color: var(--bs-primary-text-emphasis);
|
||||
}
|
||||
|
||||
.admonition.info, details.info {
|
||||
color: var(--bs-info-text-emphasis);
|
||||
background-color: var(--bs-info-bg-subtle);
|
||||
border-color: var(--bs-info-border-subtle);
|
||||
}
|
||||
|
||||
.admonition.info h1, .admonition.info h2, .admonition.info h3,
|
||||
.admonition.info h4, .admonition.info h5, .admonition.info h6,
|
||||
details.info h1, details.info h2, details.info h3,
|
||||
details.info h4, details.info h5, details.info h6 {
|
||||
color: var(--bs-info-text-emphasis);
|
||||
}
|
||||
|
||||
.admonition.warning, details.warning {
|
||||
color: var(--bs-warning-text-emphasis);
|
||||
background-color: var(--bs-warning-bg-subtle);
|
||||
border-color: var(--bs-warning-border-subtle);
|
||||
}
|
||||
|
||||
.admonition.warning h1, .admonition.warning h2, .admonition.warning h3,
|
||||
.admonition.warning h4, .admonition.warning h5, .admonition.warning h6,
|
||||
details.warning h1, details.warning h2, details.warning h3,
|
||||
details.warning h4, details.warning h5, details.warning h6 {
|
||||
color: var(--bs-warning-text-emphasis);
|
||||
}
|
||||
|
||||
.admonition.danger, details.danger {
|
||||
color: var(--bs-danger-text-emphasis);
|
||||
background-color: var(--bs-danger-bg-subtle);
|
||||
border-color: var(--bs-danger-border-subtle);
|
||||
}
|
||||
|
||||
.admonition.danger h1, .admonition.danger h2, .admonition.danger h3,
|
||||
.admonition.danger h4, .admonition.danger h5, .admonition.danger h6,
|
||||
details.danger h1, details.danger h2, details.danger h3,
|
||||
details.danger h4, details.danger h5, details.danger h6 {
|
||||
color: var(--bs-danger-text-emphasis);
|
||||
}
|
||||
|
||||
.admonition, details {
|
||||
color: var(--bs-light-text-emphasis);
|
||||
background-color: var(--bs-light-bg-subtle);
|
||||
border-color: var(--bs-light-border-subtle);
|
||||
}
|
||||
|
||||
.admonition h1, .admonition h2, .admonition h3,
|
||||
.admonition h4, .admonition h5, .admonition h6,
|
||||
details h1, details h2, details h3,
|
||||
details h4, details h5, details h6 {
|
||||
color: var(--bs-light-text-emphasis);
|
||||
}
|
||||
|
||||
.admonition-title, summary {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.admonition>p:last-child, details>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 991.98px) {
|
||||
.navbar-collapse.show {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 3.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.open {
|
||||
color: var(--bs-dropdown-link-active-color);
|
||||
background-color: var(--bs-dropdown-link-active-bg);
|
||||
}
|
||||
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
margin: 0 0 0 1.5rem;
|
||||
padding: 0;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.dropdown-submenu > a::after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: var(--bs-dropdown-link-active-color);
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
.dropdown-submenu:hover > a::after {
|
||||
border-left-color: var(--bs-dropdown-link-active-color);
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.dropdown-menu {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 3.5rem);
|
||||
}
|
||||
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
position: fixed !important;
|
||||
margin-top: -9px;
|
||||
margin-left: -2px;
|
||||
border-width: 1px;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.dropdown-submenu.pull-left > .dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
/* Remove sidebar when print */
|
||||
.col-md-3 { display: none; }
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
* Copyright 2023 Fonticons, Inc.
|
||||
*/
|
||||
:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}
|
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
* Copyright 2023 Fonticons, Inc.
|
||||
*/
|
||||
@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype");unicode-range:u+f003,u+f006,u+f014,u+f016-f017,u+f01a-f01b,u+f01d,u+f022,u+f03e,u+f044,u+f046,u+f05c-f05d,u+f06e,u+f070,u+f087-f088,u+f08a,u+f094,u+f096-f097,u+f09d,u+f0a0,u+f0a2,u+f0a4-f0a7,u+f0c5,u+f0c7,u+f0e5-f0e6,u+f0eb,u+f0f6-f0f8,u+f10c,u+f114-f115,u+f118-f11a,u+f11c-f11d,u+f133,u+f147,u+f14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2"),url(../webfonts/fa-v4compatibility.ttf) format("truetype");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f27a}
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
287
site/js/base.js
287
site/js/base.js
|
@ -1,287 +0,0 @@
|
|||
function getSearchTerm() {
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++) {
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == 'q') {
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyTopPadding() {
|
||||
// Update various absolute positions to match where the main container
|
||||
// starts. This is necessary for handling multi-line nav headers, since
|
||||
// that pushes the main container down.
|
||||
var container = document.querySelector('body > .container');
|
||||
var offset = container.offsetTop;
|
||||
|
||||
document.documentElement.style.scrollPaddingTop = offset + 'px';
|
||||
document.querySelectorAll('.bs-sidebar.affix').forEach(function(sidebar) {
|
||||
sidebar.style.top = offset + 'px';
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
var search_term = getSearchTerm();
|
||||
var search_modal = new bootstrap.Modal(document.getElementById('mkdocs_search_modal'));
|
||||
var keyboard_modal = new bootstrap.Modal(document.getElementById('mkdocs_keyboard_modal'));
|
||||
|
||||
if (search_term) {
|
||||
search_modal.show();
|
||||
}
|
||||
|
||||
// make sure search input gets autofocus every time modal opens.
|
||||
document.getElementById('mkdocs_search_modal').addEventListener('shown.bs.modal', function() {
|
||||
document.getElementById('mkdocs-search-query').focus();
|
||||
});
|
||||
|
||||
// Close search modal when result is selected
|
||||
// The links get added later so listen to parent
|
||||
document.getElementById('mkdocs-search-results').addEventListener('click', function(e) {
|
||||
if (e.target.tagName === 'A') {
|
||||
search_modal.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Populate keyboard modal with proper Keys
|
||||
document.querySelector('.help.shortcut kbd').innerHTML = keyCodes[shortcuts.help];
|
||||
document.querySelector('.prev.shortcut kbd').innerHTML = keyCodes[shortcuts.previous];
|
||||
document.querySelector('.next.shortcut kbd').innerHTML = keyCodes[shortcuts.next];
|
||||
document.querySelector('.search.shortcut kbd').innerHTML = keyCodes[shortcuts.search];
|
||||
|
||||
// Keyboard navigation
|
||||
document.addEventListener("keydown", function(e) {
|
||||
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return true;
|
||||
var key = e.which || e.keyCode || window.event && window.event.keyCode;
|
||||
var page;
|
||||
switch (key) {
|
||||
case shortcuts.next:
|
||||
page = document.querySelector('.navbar a[rel="next"]');
|
||||
break;
|
||||
case shortcuts.previous:
|
||||
page = document.querySelector('.navbar a[rel="prev"]');
|
||||
break;
|
||||
case shortcuts.search:
|
||||
e.preventDefault();
|
||||
keyboard_modal.hide();
|
||||
search_modal.show();
|
||||
document.getElementById('mkdocs-search-query').focus();
|
||||
break;
|
||||
case shortcuts.help:
|
||||
search_modal.hide();
|
||||
keyboard_modal.show();
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (page && page.hasAttribute('href')) {
|
||||
keyboard_modal.hide();
|
||||
window.location.href = page.getAttribute('href');
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('table').forEach(function(table) {
|
||||
table.classList.add('table', 'table-striped', 'table-hover');
|
||||
});
|
||||
|
||||
function showInnerDropdown(item) {
|
||||
var popup = item.nextElementSibling;
|
||||
popup.classList.add('show');
|
||||
item.classList.add('open');
|
||||
|
||||
// First, close any sibling dropdowns.
|
||||
var container = item.parentElement.parentElement;
|
||||
container.querySelectorAll(':scope > .dropdown-submenu > a').forEach(function(el) {
|
||||
if (el !== item) {
|
||||
hideInnerDropdown(el);
|
||||
}
|
||||
});
|
||||
|
||||
var popupMargin = 10;
|
||||
var maxBottom = window.innerHeight - popupMargin;
|
||||
var bounds = item.getBoundingClientRect();
|
||||
|
||||
popup.style.left = bounds.right + 'px';
|
||||
if (bounds.top + popup.clientHeight > maxBottom &&
|
||||
bounds.top > window.innerHeight / 2) {
|
||||
popup.style.top = (bounds.bottom - popup.clientHeight) + 'px';
|
||||
popup.style.maxHeight = (bounds.bottom - popupMargin) + 'px';
|
||||
} else {
|
||||
popup.style.top = bounds.top + 'px';
|
||||
popup.style.maxHeight = (maxBottom - bounds.top) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function hideInnerDropdown(item) {
|
||||
var popup = item.nextElementSibling;
|
||||
popup.classList.remove('show');
|
||||
item.classList.remove('open');
|
||||
|
||||
popup.scrollTop = 0;
|
||||
var menu = popup.querySelector('.dropdown-menu');
|
||||
if (menu) {
|
||||
menu.scrollTop = 0;
|
||||
}
|
||||
var dropdown = popup.querySelector('.dropdown-submenu > a');
|
||||
if (dropdown) {
|
||||
dropdown.classList.remove('open');
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll('.dropdown-submenu > a').forEach(function(item) {
|
||||
item.addEventListener('click', function(e) {
|
||||
if (item.nextElementSibling.classList.contains('show')) {
|
||||
hideInnerDropdown(item);
|
||||
} else {
|
||||
showInnerDropdown(item);
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.dropdown-menu').forEach(function(menu) {
|
||||
menu.parentElement.addEventListener('hide.bs.dropdown', function() {
|
||||
menu.scrollTop = 0;
|
||||
var dropdown = menu.querySelector('.dropdown-submenu > a');
|
||||
if (dropdown) {
|
||||
dropdown.classList.remove('open');
|
||||
}
|
||||
menu.querySelectorAll('.dropdown-menu .dropdown-menu').forEach(function(submenu) {
|
||||
submenu.classList.remove('show');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
applyTopPadding();
|
||||
});
|
||||
|
||||
window.addEventListener('resize', applyTopPadding);
|
||||
|
||||
var scrollSpy = new bootstrap.ScrollSpy(document.body, {
|
||||
target: '.bs-sidebar'
|
||||
});
|
||||
|
||||
/* Prevent disabled links from causing a page reload */
|
||||
document.querySelectorAll("li.disabled a").forEach(function(item) {
|
||||
item.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
// See https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
|
||||
// We only list common keys below. Obscure keys are omitted and their use is discouraged.
|
||||
var keyCodes = {
|
||||
8: 'backspace',
|
||||
9: 'tab',
|
||||
13: 'enter',
|
||||
16: 'shift',
|
||||
17: 'ctrl',
|
||||
18: 'alt',
|
||||
19: 'pause/break',
|
||||
20: 'caps lock',
|
||||
27: 'escape',
|
||||
32: 'spacebar',
|
||||
33: 'page up',
|
||||
34: 'page down',
|
||||
35: 'end',
|
||||
36: 'home',
|
||||
37: '←',
|
||||
38: '↑',
|
||||
39: '→',
|
||||
40: '↓',
|
||||
45: 'insert',
|
||||
46: 'delete',
|
||||
48: '0',
|
||||
49: '1',
|
||||
50: '2',
|
||||
51: '3',
|
||||
52: '4',
|
||||
53: '5',
|
||||
54: '6',
|
||||
55: '7',
|
||||
56: '8',
|
||||
57: '9',
|
||||
65: 'a',
|
||||
66: 'b',
|
||||
67: 'c',
|
||||
68: 'd',
|
||||
69: 'e',
|
||||
70: 'f',
|
||||
71: 'g',
|
||||
72: 'h',
|
||||
73: 'i',
|
||||
74: 'j',
|
||||
75: 'k',
|
||||
76: 'l',
|
||||
77: 'm',
|
||||
78: 'n',
|
||||
79: 'o',
|
||||
80: 'p',
|
||||
81: 'q',
|
||||
82: 'r',
|
||||
83: 's',
|
||||
84: 't',
|
||||
85: 'u',
|
||||
86: 'v',
|
||||
87: 'w',
|
||||
88: 'x',
|
||||
89: 'y',
|
||||
90: 'z',
|
||||
91: 'Left Windows Key / Left ⌘',
|
||||
92: 'Right Windows Key',
|
||||
93: 'Windows Menu / Right ⌘',
|
||||
96: 'numpad 0',
|
||||
97: 'numpad 1',
|
||||
98: 'numpad 2',
|
||||
99: 'numpad 3',
|
||||
100: 'numpad 4',
|
||||
101: 'numpad 5',
|
||||
102: 'numpad 6',
|
||||
103: 'numpad 7',
|
||||
104: 'numpad 8',
|
||||
105: 'numpad 9',
|
||||
106: 'multiply',
|
||||
107: 'add',
|
||||
109: 'subtract',
|
||||
110: 'decimal point',
|
||||
111: 'divide',
|
||||
112: 'f1',
|
||||
113: 'f2',
|
||||
114: 'f3',
|
||||
115: 'f4',
|
||||
116: 'f5',
|
||||
117: 'f6',
|
||||
118: 'f7',
|
||||
119: 'f8',
|
||||
120: 'f9',
|
||||
121: 'f10',
|
||||
122: 'f11',
|
||||
123: 'f12',
|
||||
124: 'f13',
|
||||
125: 'f14',
|
||||
126: 'f15',
|
||||
127: 'f16',
|
||||
128: 'f17',
|
||||
129: 'f18',
|
||||
130: 'f19',
|
||||
131: 'f20',
|
||||
132: 'f21',
|
||||
133: 'f22',
|
||||
134: 'f23',
|
||||
135: 'f24',
|
||||
144: 'num lock',
|
||||
145: 'scroll lock',
|
||||
186: ';',
|
||||
187: '=',
|
||||
188: ',',
|
||||
189: '‐',
|
||||
190: '.',
|
||||
191: '?',
|
||||
192: '`',
|
||||
219: '[',
|
||||
220: '\',
|
||||
221: ']',
|
||||
222: ''',
|
||||
};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,65 +0,0 @@
|
|||
function setColorMode(mode) {
|
||||
// Switch between light/dark theme. `mode` is a string value of either 'dark' or 'light'.
|
||||
var hljs_light = document.getElementById('hljs-light'),
|
||||
hljs_dark = document.getElementById('hljs-dark');
|
||||
document.documentElement.setAttribute('data-bs-theme', mode);
|
||||
if (mode == 'dark') {
|
||||
hljs_light.disabled = true;
|
||||
hljs_dark.disabled = false;
|
||||
} else {
|
||||
hljs_dark.disabled = true;
|
||||
hljs_light.disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function updateModeToggle(mode) {
|
||||
// Update icon and toggle checkmarks of color mode selector.
|
||||
var menu = document.getElementById('theme-menu');
|
||||
document.querySelectorAll('[data-bs-theme-value]')
|
||||
.forEach(function(toggle) {
|
||||
if (mode == toggle.getAttribute('data-bs-theme-value')) {
|
||||
toggle.setAttribute('aria-pressed', 'true');
|
||||
toggle.lastElementChild.classList.remove('d-none');
|
||||
menu.firstElementChild.setAttribute('class', toggle.firstElementChild.getAttribute('class'));
|
||||
} else {
|
||||
toggle.setAttribute('aria-pressed', 'false');
|
||||
toggle.lastElementChild.classList.add('d-none');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onSystemColorSchemeChange(event) {
|
||||
// Update site color mode to match system color mode.
|
||||
setColorMode(event.matches ? 'dark' : 'light');
|
||||
}
|
||||
|
||||
var mql = window.matchMedia('(prefers-color-scheme: dark)'),
|
||||
defaultMode = document.documentElement.getAttribute('data-bs-theme'),
|
||||
storedMode = localStorage.getItem('mkdocs-colormode');
|
||||
if (storedMode && storedMode != 'auto') {
|
||||
setColorMode(storedMode);
|
||||
updateModeToggle(storedMode);
|
||||
} else if (storedMode == 'auto' || defaultMode == 'auto') {
|
||||
setColorMode(mql.matches ? 'dark' : 'light');
|
||||
updateModeToggle('auto');
|
||||
mql.addEventListener('change', onSystemColorSchemeChange);
|
||||
} else {
|
||||
setColorMode(defaultMode);
|
||||
updateModeToggle(defaultMode);
|
||||
}
|
||||
|
||||
document.querySelectorAll('[data-bs-theme-value]')
|
||||
.forEach(function(toggle) {
|
||||
toggle.addEventListener('click', function (e) {
|
||||
var mode = e.currentTarget.getAttribute('data-bs-theme-value');
|
||||
localStorage.setItem('mkdocs-colormode', mode);
|
||||
if (mode == 'auto') {
|
||||
setColorMode(mql.matches ? 'dark' : 'light');
|
||||
mql.addEventListener('change', onSystemColorSchemeChange);
|
||||
} else {
|
||||
setColorMode(mode);
|
||||
mql.removeEventListener('change', onSystemColorSchemeChange);
|
||||
}
|
||||
updateModeToggle(mode);
|
||||
});
|
||||
});
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue