Updating from WIkiJS

This commit is contained in:
Simeon "Waldo" Wallrath 2025-04-07 20:33:27 +02:00
parent e90e9bce56
commit 7846130a4a
70 changed files with 18448 additions and 930 deletions

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

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

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

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

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

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

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

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

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

View file

@ -202,4 +202,4 @@ code span.kw {
content: "</";
}
/*# sourceMappingURL=bd9315517b35d1ca99281302af408dd3.css.map */
/*# sourceMappingURL=c9c5d451c23b744f9cb2c98992a0aef2.css.map */

View file

@ -0,0 +1,189 @@
/* quarto syntax highlight colors */
:root {
--quarto-hl-al-color: #f07178;
--quarto-hl-an-color: #d4d0ab;
--quarto-hl-at-color: #00e0e0;
--quarto-hl-bn-color: #d4d0ab;
--quarto-hl-bu-color: #abe338;
--quarto-hl-ch-color: #abe338;
--quarto-hl-co-color: #f8f8f2;
--quarto-hl-cv-color: #ffd700;
--quarto-hl-cn-color: #ffd700;
--quarto-hl-cf-color: #ffa07a;
--quarto-hl-dt-color: #ffa07a;
--quarto-hl-dv-color: #d4d0ab;
--quarto-hl-do-color: #f8f8f2;
--quarto-hl-er-color: #f07178;
--quarto-hl-ex-color: #00e0e0;
--quarto-hl-fl-color: #d4d0ab;
--quarto-hl-fu-color: #ffa07a;
--quarto-hl-im-color: #abe338;
--quarto-hl-in-color: #d4d0ab;
--quarto-hl-kw-color: #ffa07a;
--quarto-hl-op-color: #ffa07a;
--quarto-hl-ot-color: #00e0e0;
--quarto-hl-pp-color: #dcc6e0;
--quarto-hl-re-color: #00e0e0;
--quarto-hl-sc-color: #abe338;
--quarto-hl-ss-color: #abe338;
--quarto-hl-st-color: #abe338;
--quarto-hl-va-color: #00e0e0;
--quarto-hl-vs-color: #abe338;
--quarto-hl-wa-color: #dcc6e0;
}
/* other quarto variables */
:root {
--quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
code span.al {
background-color: #2a0f15;
font-weight: bold;
color: #f07178;
}
code span.an {
color: #d4d0ab;
}
code span.at {
color: #00e0e0;
}
code span.bn {
color: #d4d0ab;
}
code span.bu {
color: #abe338;
}
code span.ch {
color: #abe338;
}
code span.co {
font-style: italic;
color: #f8f8f2;
}
code span.cv {
color: #ffd700;
}
code span.cn {
color: #ffd700;
}
code span.cf {
font-weight: bold;
color: #ffa07a;
}
code span.dt {
color: #ffa07a;
}
code span.dv {
color: #d4d0ab;
}
code span.do {
color: #f8f8f2;
}
code span.er {
color: #f07178;
text-decoration: underline;
}
code span.ex {
font-weight: bold;
color: #00e0e0;
}
code span.fl {
color: #d4d0ab;
}
code span.fu {
color: #ffa07a;
}
code span.im {
color: #abe338;
}
code span.in {
color: #d4d0ab;
}
code span.kw {
font-weight: bold;
color: #ffa07a;
}
pre > code.sourceCode > span {
color: #f8f8f2;
}
code span {
color: #f8f8f2;
}
code.sourceCode > span {
color: #f8f8f2;
}
div.sourceCode,
div.sourceCode pre.sourceCode {
color: #f8f8f2;
}
code span.op {
color: #ffa07a;
}
code span.ot {
color: #00e0e0;
}
code span.pp {
color: #dcc6e0;
}
code span.re {
background-color: #f8f8f2;
color: #00e0e0;
}
code span.sc {
color: #abe338;
}
code span.ss {
color: #abe338;
}
code span.st {
color: #abe338;
}
code span.va {
color: #00e0e0;
}
code span.vs {
color: #abe338;
}
code span.wa {
color: #dcc6e0;
}
.prevent-inlining {
content: "</";
}
/*# sourceMappingURL=358cf41e74b1efa21c8e6dcd38cd2fd6.css.map */

View file

@ -1,5 +1,3 @@
import * as tabsets from "./tabsets/tabsets.js";
const sectionChanged = new CustomEvent("quarto-sectionChanged", {
detail: {},
bubbles: true,
@ -66,41 +64,19 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
}
};
// dispatch for htmlwidgets
// they use slideenter event to trigger resize
function fireSlideEnter() {
// fire slideEnter for bootstrap tab activations (for htmlwidget resize behavior)
function fireSlideEnter(e) {
const event = window.document.createEvent("Event");
event.initEvent("slideenter", true, true);
window.document.dispatchEvent(event);
}
const tabs = window.document.querySelectorAll('a[data-bs-toggle="tab"]');
tabs.forEach((tab) => {
tab.addEventListener("shown.bs.tab", fireSlideEnter);
});
// dispatch for shiny
// they use BS shown and hidden events to trigger rendering
function distpatchShinyEvents(previous, current) {
if (window.jQuery) {
if (previous) {
window.jQuery(previous).trigger("hidden");
}
if (current) {
window.jQuery(current).trigger("shown");
}
}
}
// tabby.js listener: Trigger event for htmlwidget and shiny
document.addEventListener(
"tabby",
function (event) {
fireSlideEnter();
distpatchShinyEvents(event.detail.previousTab, event.detail.tab);
},
false
);
// fire slideEnter for tabby tab activations (for htmlwidget resize behavior)
document.addEventListener("tabby", fireSlideEnter, false);
// Track scrolling and mark TOC links as active
// get table of contents and sidebar (bail if we don't have at least one)
@ -260,10 +236,9 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
for (const listingPath of listingPaths) {
const pathWithoutLeadingSlash = listingPath.listing.substring(1);
for (const item of listingPath.items) {
const encodedItem = encodeURI(item);
if (
encodedItem === currentPagePath ||
encodedItem === currentPagePath + "index.html"
item === currentPagePath ||
item === currentPagePath + "index.html"
) {
// Resolve this path against the offset to be sure
// we already are using the correct path to the listing
@ -765,7 +740,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
// See if there is an active child to this element
let hasActiveChild = false;
for (const child of el.children) {
for (child of el.children) {
hasActiveChild = walk(child, depth) || hasActiveChild;
}
@ -825,7 +800,98 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
highlightReaderToggle(isReaderMode());
});
tabsets.init();
// grouped tabsets
window.addEventListener("pageshow", (_event) => {
function getTabSettings() {
const data = localStorage.getItem("quarto-persistent-tabsets-data");
if (!data) {
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
return {};
}
if (data) {
return JSON.parse(data);
}
}
function setTabSettings(data) {
localStorage.setItem(
"quarto-persistent-tabsets-data",
JSON.stringify(data)
);
}
function setTabState(groupName, groupValue) {
const data = getTabSettings();
data[groupName] = groupValue;
setTabSettings(data);
}
function toggleTab(tab, active) {
const tabPanelId = tab.getAttribute("aria-controls");
const tabPanel = document.getElementById(tabPanelId);
if (active) {
tab.classList.add("active");
tabPanel.classList.add("active");
} else {
tab.classList.remove("active");
tabPanel.classList.remove("active");
}
}
function toggleAll(selectedGroup, selectorsToSync) {
for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
const active = selectedGroup === thisGroup;
for (const tab of tabs) {
toggleTab(tab, active);
}
}
}
function findSelectorsToSyncByLanguage() {
const result = {};
const tabs = Array.from(
document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
);
for (const item of tabs) {
const div = item.parentElement.parentElement.parentElement;
const group = div.getAttribute("data-group");
if (!result[group]) {
result[group] = {};
}
const selectorsToSync = result[group];
const value = item.innerHTML;
if (!selectorsToSync[value]) {
selectorsToSync[value] = [];
}
selectorsToSync[value].push(item);
}
return result;
}
function setupSelectorSync() {
const selectorsToSync = findSelectorsToSyncByLanguage();
Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
Object.entries(tabSetsByValue).forEach(([value, items]) => {
items.forEach((item) => {
item.addEventListener("click", (_event) => {
setTabState(group, value);
toggleAll(value, selectorsToSync[group]);
});
});
});
});
return selectorsToSync;
}
const selectorsToSync = setupSelectorSync();
for (const [group, selectedName] of Object.entries(getTabSettings())) {
const selectors = selectorsToSync[group];
// it's possible that stale state gives us empty selections, so we explicitly check here.
if (selectors) {
toggleAll(selectedName, selectors);
}
}
});
function throttle(func, wait) {
let waiting = false;

View file

@ -1,95 +0,0 @@
// grouped tabsets
export function init() {
window.addEventListener("pageshow", (_event) => {
function getTabSettings() {
const data = localStorage.getItem("quarto-persistent-tabsets-data");
if (!data) {
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
return {};
}
if (data) {
return JSON.parse(data);
}
}
function setTabSettings(data) {
localStorage.setItem(
"quarto-persistent-tabsets-data",
JSON.stringify(data)
);
}
function setTabState(groupName, groupValue) {
const data = getTabSettings();
data[groupName] = groupValue;
setTabSettings(data);
}
function toggleTab(tab, active) {
const tabPanelId = tab.getAttribute("aria-controls");
const tabPanel = document.getElementById(tabPanelId);
if (active) {
tab.classList.add("active");
tabPanel.classList.add("active");
} else {
tab.classList.remove("active");
tabPanel.classList.remove("active");
}
}
function toggleAll(selectedGroup, selectorsToSync) {
for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
const active = selectedGroup === thisGroup;
for (const tab of tabs) {
toggleTab(tab, active);
}
}
}
function findSelectorsToSyncByLanguage() {
const result = {};
const tabs = Array.from(
document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
);
for (const item of tabs) {
const div = item.parentElement.parentElement.parentElement;
const group = div.getAttribute("data-group");
if (!result[group]) {
result[group] = {};
}
const selectorsToSync = result[group];
const value = item.innerHTML;
if (!selectorsToSync[value]) {
selectorsToSync[value] = [];
}
selectorsToSync[value].push(item);
}
return result;
}
function setupSelectorSync() {
const selectorsToSync = findSelectorsToSyncByLanguage();
Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
Object.entries(tabSetsByValue).forEach(([value, items]) => {
items.forEach((item) => {
item.addEventListener("click", (_event) => {
setTabState(group, value);
toggleAll(value, selectorsToSync[group]);
});
});
});
});
return selectorsToSync;
}
const selectorsToSync = setupSelectorSync();
for (const [group, selectedName] of Object.entries(getTabSettings())) {
const selectors = selectorsToSync[group];
// it's possible that stale state gives us empty selections, so we explicitly check here.
if (selectors) {
toggleAll(selectedName, selectors);
}
}
});
}