diff --git a/.nojekyll b/.nojekyll
index e69de29..e7ffbcc 100644
--- a/.nojekyll
+++ b/.nojekyll
@@ -0,0 +1 @@
+22bb4d61
\ No newline at end of file
diff --git a/_static/app-ui.png b/_static/app-ui.png
index 4ec08c4..408855d 100644
Binary files a/_static/app-ui.png and b/_static/app-ui.png differ
diff --git a/index.html b/index.html
index 2ed2699..ce6951b 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
@@ -47,7 +47,13 @@
"collapse-after": 3,
"panel-placement": "end",
"type": "overlay",
- "limit": 20,
+ "limit": 50,
+ "keyboard-shortcut": [
+ "f",
+ "/",
+ "s"
+ ],
+ "show-item-context": false,
"language": {
"search-no-results-text": "No results",
"search-matching-documents-text": "matching documents",
@@ -56,6 +62,7 @@
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
+ "search-text-placeholder": "",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
@@ -69,47 +76,47 @@
@@ -121,23 +128,11 @@
-
+
+SIC-SOC-LLM
@@ -195,7 +190,7 @@ Usage
Configuration
The sic-soc-llm
package uses a configuration file in TOML format to specify the paths to the data files and the names of the models to use. An example configuration file is provided in sic_soc_llm_config.toml
and is read by the get_config
function. The following fields are required:
-
+
@@ -308,6 +303,7 @@ Data Science Campus
+
@@ -354,6 +350,33 @@ Data Science Campus {
+ const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
+ const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
+ let newTheme = '';
+ if(darkModeDefault) {
+ newTheme = isAlternate ? baseTheme : alternateTheme;
+ } else {
+ newTheme = isAlternate ? alternateTheme : baseTheme;
+ }
+ const changeGiscusTheme = () => {
+ // From: https://github.com/giscus/giscus/issues/336
+ const sendMessage = (message) => {
+ const iframe = document.querySelector('iframe.giscus-frame');
+ if (!iframe) return;
+ iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
+ }
+ sendMessage({
+ setConfig: {
+ theme: newTheme
+ }
+ });
+ }
+ const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null;
+ if (isGiscussLoaded) {
+ changeGiscusTheme();
+ }
+ }
const toggleColorMode = (alternate) => {
// Switch the stylesheets
const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
@@ -420,13 +443,15 @@ Data Science Campus {
// Read the current dark / light value
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
+ toggleGiscusIfUsed(toAlternate, darkModeDefault);
};
// Ensure there is a toggle, if there isn't float one in the top right
if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
@@ -461,18 +486,7 @@ Data Science CampusData Science Campus {
+ return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+ }
+ // Inspect non-navigation links and adorn them if external
+ var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
+ for (var i=0; iData Science CampusData Science Campus {
+ // Strip column container classes
+ const stripColumnClz = (el) => {
+ el.classList.remove("page-full", "page-columns");
+ if (el.children) {
+ for (const child of el.children) {
+ stripColumnClz(child);
+ }
+ }
+ }
+ stripColumnClz(note)
+ if (id === null || id.startsWith('sec-')) {
+ // Special case sections, only their first couple elements
+ const container = document.createElement("div");
+ if (note.children && note.children.length > 2) {
+ container.appendChild(note.children[0].cloneNode(true));
+ for (let i = 1; i < note.children.length; i++) {
+ const child = note.children[i];
+ if (child.tagName === "P" && child.innerText === "") {
+ continue;
+ } else {
+ container.appendChild(child.cloneNode(true));
+ break;
+ }
+ }
+ if (window.Quarto?.typesetMath) {
+ window.Quarto.typesetMath(container);
+ }
+ return container.innerHTML
+ } else {
+ if (window.Quarto?.typesetMath) {
+ window.Quarto.typesetMath(note);
+ }
+ return note.innerHTML;
+ }
+ } else {
+ // Remove any anchor links if they are present
+ const anchorLink = note.querySelector('a.anchorjs-link');
+ if (anchorLink) {
+ anchorLink.remove();
+ }
+ if (window.Quarto?.typesetMath) {
+ window.Quarto.typesetMath(note);
+ }
+ // TODO in 1.5, we should make sure this works without a callout special case
+ if (note.classList.contains("callout")) {
+ return note.outerHTML;
+ } else {
+ return note.innerHTML;
+ }
+ }
+ }
+ for (var i=0; i res.text())
+ .then(html => {
+ const parser = new DOMParser();
+ const htmlDoc = parser.parseFromString(html, "text/html");
+ const note = htmlDoc.getElementById(id);
+ if (note !== null) {
+ const html = processXRef(id, note);
+ instance.setContent(html);
+ }
+ }).finally(() => {
+ instance.enable();
+ instance.show();
+ });
+ }
+ } else {
+ // See if we can fetch a full url (with no hash to target)
+ // This is a special case and we should probably do some content thinning / targeting
+ fetch(url)
+ .then(res => res.text())
+ .then(html => {
+ const parser = new DOMParser();
+ const htmlDoc = parser.parseFromString(html, "text/html");
+ const note = htmlDoc.querySelector('main.content');
+ if (note !== null) {
+ // This should only happen for chapter cross references
+ // (since there is no id in the URL)
+ // remove the first header
+ if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
+ note.children[0].remove();
+ }
+ const html = processXRef(null, note);
+ instance.setContent(html);
+ }
+ }).finally(() => {
+ instance.enable();
+ instance.show();
+ });
+ }
+ }, function(instance) {
});
}
let selectedAnnoteEl;
@@ -575,6 +760,7 @@ Data Science CampusData Science Campus {
+ elRect = undefined;
+ if (selectedAnnoteEl) {
+ selectCodeLines(selectedAnnoteEl);
+ }
+ }, 10)
+ );
+ function throttle(fn, ms) {
+ let throttle = false;
+ let timer;
+ return (...args) => {
+ if(!throttle) { // first call gets through
+ fn.apply(this, args);
+ throttle = true;
+ } else { // all the others get throttled
+ if(timer) clearTimeout(timer); // cancel #2
+ timer = setTimeout(() => {
+ fn.apply(this, args);
+ timer = throttle = false;
+ }, ms);
+ }
+ };
+ }
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
@@ -662,8 +874,12 @@ Data Science Campus