Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
emitanaka committed Apr 9, 2024
1 parent 9b03765 commit e10c6be
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
41bd3824
d3fc7186
26 changes: 2 additions & 24 deletions help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.545">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -275,24 +275,6 @@ <h2 class="anchored" data-anchor-id="providing-feedback">Providing feedback</h2>
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp("https:\/\/anu-bdsi\.github\.io\/workshop-data-vis-R1\/");
var isInternal = (href) => {
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)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -327,11 +309,7 @@ <h2 class="anchored" data-anchor-id="providing-feedback">Providing feedback</h2>
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
return note.innerHTML;
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
26 changes: 2 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.545">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -468,24 +468,6 @@ <h2 class="anchored" data-anchor-id="materials">Materials</h2>
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp("https:\/\/anu-bdsi\.github\.io\/workshop-data-vis-R1\/");
var isInternal = (href) => {
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)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -520,11 +502,7 @@ <h2 class="anchored" data-anchor-id="materials">Materials</h2>
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
return note.innerHTML;
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
36 changes: 7 additions & 29 deletions materials.html

Large diffs are not rendered by default.

26 changes: 2 additions & 24 deletions next-time.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.551">
<meta name="generator" content="quarto-1.4.545">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -214,24 +214,6 @@ <h2 class="anchored" data-anchor-id="next-time">Next time</h2>
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp("https:\/\/anu-bdsi\.github\.io\/workshop-data-vis-R1\/");
var isInternal = (href) => {
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)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -266,11 +248,7 @@ <h2 class="anchored" data-anchor-id="next-time">Next time</h2>
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
return note.innerHTML;
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
4 changes: 2 additions & 2 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"href": "materials.html#schedule",
"title": "Materials",
"section": "🕙 Schedule",
"text": "🕙 Schedule\n\n\n\n\n\nTime\nContent\n\n\n\n\n10:00–10:30\nDrawing plots with ggplot2\n\n\n10:30–11:00\nExercise 1\n\n\n11:00–11:30\nThe Grammar of Graphics\n\n\n11:30–12:00\nExercise 2\n\n\n12:00–12:10\nBreak\n\n\n12:10–12:30\nDrawing multiple layers with ggplot2\n\n\n12:30–12:50\nExercise 3\n\n\n12:50–13:00\nWrap up"
"text": "🕙 Schedule\n\n\n\n\n\nTime\nContent\n\n\n\n\n10:00–10:30\nDrawing plots with ggplot2\n\n\n10:30–11:00\nExercise 1\n\n\n11:00–11:30\nThe Grammar of Graphics\n\n\n11:30–11:40\nBreak\n\n\n11:40–12:10\nExercise 2\n\n\n12:10–12:30\nDrawing multiple layers with ggplot2\n\n\n12:30–12:50\nExercise 3\n\n\n12:50–13:00\nWrap up"
},
{
"objectID": "materials.html#resources",
Expand Down Expand Up @@ -137,7 +137,7 @@
"href": "slides/slide1.html#schedule",
"title": "Drawing plots with ggplot2",
"section": "🕙 Schedule",
"text": "🕙 Schedule\n\n\n\n\n\n\n\n\n\nTime\nContent\n\n\n\n\n10:00–10:30\nDrawing plots with ggplot2\n\n\n10:30–11:00\nExercise 1\n\n\n11:00–11:30\nThe Grammar of Graphics\n\n\n11:30–12:00\nExercise 2\n\n\n12:00–12:10\nBreak\n\n\n12:10–12:30\nDrawing multiple layers with ggplot2\n\n\n12:30–12:50\nExercise 3\n\n\n12:50–13:00\nWrap up"
"text": "🕙 Schedule\n\n\n\n\n\n\n\n\n\nTime\nContent\n\n\n\n\n10:00–10:30\nDrawing plots with ggplot2\n\n\n10:30–11:00\nExercise 1\n\n\n11:00–11:30\nThe Grammar of Graphics\n\n\n11:30–11:40\nBreak\n\n\n11:40–12:10\nExercise 2\n\n\n12:10–12:30\nDrawing multiple layers with ggplot2\n\n\n12:30–12:50\nExercise 3\n\n\n12:50–13:00\nWrap up"
},
{
"objectID": "slides/slide1.html#todays-learning-objectives",
Expand Down
2 changes: 1 addition & 1 deletion site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions site_libs/htmltools-fill-0.5.8/fill.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@layer htmltools {
.html-fill-container {
display: flex;
flex-direction: column;
/* Prevent the container from expanding vertically or horizontally beyond its
parent's constraints. */
min-height: 0;
min-width: 0;
}
.html-fill-container > .html-fill-item {
/* Fill items can grow and shrink freely within
available vertical space in fillable container */
flex: 1 1 auto;
min-height: 0;
min-width: 0;
}
.html-fill-container > :not(.html-fill-item) {
/* Prevent shrinking or growing of non-fill items */
flex: 0 0 auto;
}
}
1 change: 0 additions & 1 deletion site_libs/quarto-nav/quarto-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ window.document.addEventListener("DOMContentLoaded", function () {
const links = window.document.querySelectorAll("a");
for (let i = 0; i < links.length; i++) {
if (links[i].href) {
links[i].dataset.originalHref = links[i].href;
links[i].href = links[i].href.replace(/\/index\.html/, "/");
}
}
Expand Down
65 changes: 13 additions & 52 deletions site_libs/quarto-search/quarto-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,18 +675,6 @@ function showCopyLink(query, options) {
// create the index
var fuseIndex = undefined;
var shownWarning = false;

// fuse index options
const kFuseIndexOptions = {
keys: [
{ name: "title", weight: 20 },
{ name: "section", weight: 20 },
{ name: "text", weight: 10 },
],
ignoreLocation: true,
threshold: 0.1,
};

async function readSearchData() {
// Initialize the search index on demand
if (fuseIndex === undefined) {
Expand All @@ -697,7 +685,17 @@ async function readSearchData() {
shownWarning = true;
return;
}
const fuse = new window.Fuse([], kFuseIndexOptions);
// create fuse index
const options = {
keys: [
{ name: "title", weight: 20 },
{ name: "section", weight: 20 },
{ name: "text", weight: 10 },
],
ignoreLocation: true,
threshold: 0.1,
};
const fuse = new window.Fuse([], options);

// fetch the main search.json
const response = await fetch(offsetURL("search.json"));
Expand Down Expand Up @@ -1228,34 +1226,8 @@ function algoliaSearch(query, limit, algoliaOptions) {
});
}

let subSearchTerm = undefined;
let subSearchFuse = undefined;
const kFuseMaxWait = 125;

async function fuseSearch(query, fuse, fuseOptions) {
let index = fuse;
// Fuse.js using the Bitap algorithm for text matching which runs in
// O(nm) time (no matter the structure of the text). In our case this
// means that long search terms mixed with large index gets very slow
//
// This injects a subIndex that will be used once the terms get long enough
// Usually making this subindex is cheap since there will typically be
// a subset of results matching the existing query
if (subSearchFuse !== undefined && query.startsWith(subSearchTerm)) {
// Use the existing subSearchFuse
index = subSearchFuse;
} else if (subSearchFuse !== undefined) {
// The term changed, discard the existing fuse
subSearchFuse = undefined;
subSearchTerm = undefined;
}

// Search using the active fuse
const then = performance.now();
const resultsRaw = await index.search(query, fuseOptions);
const now = performance.now();

const results = resultsRaw.map((result) => {
function fuseSearch(query, fuse, fuseOptions) {
return fuse.search(query, fuseOptions).map((result) => {
const addParam = (url, name, value) => {
const anchorParts = url.split("#");
const baseUrl = anchorParts[0];
Expand All @@ -1272,15 +1244,4 @@ async function fuseSearch(query, fuse, fuseOptions) {
crumbs: result.item.crumbs,
};
});

// If we don't have a subfuse and the query is long enough, go ahead
// and create a subfuse to use for subsequent queries
if (now - then > kFuseMaxWait && subSearchFuse === undefined) {
subSearchTerm = query;
subSearchFuse = new window.Fuse([], kFuseIndexOptions);
resultsRaw.forEach((rr) => {
subSearchFuse.add(rr.item);
});
}
return results;
}
Loading

0 comments on commit e10c6be

Please sign in to comment.