Skip to content

Commit

Permalink
Read through and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed Aug 19, 2024
1 parent 656aed0 commit e1b5e0d
Show file tree
Hide file tree
Showing 32 changed files with 2,880 additions and 1,889 deletions.
5 changes: 4 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ book:
repo-url: https://github.com/DukeStatSci/ta-manual
repo-branch: main
repo-actions: [edit, issue]
downloads: [pdf]
chapters:
- index.qmd
- useful-links.qmd
- covid19.qmd
- responsibilities.qmd
- best-practices.qmd
- policies.qmd
Expand All @@ -26,5 +26,8 @@ format:
html:
mainfont: "Atkinson Hyperlegible"
toc: true
theme:
light: [cosmo, style/style.scss]
dark: [solar, style/style.scss, style/style-dark.scss]

editor: visual
242 changes: 69 additions & 173 deletions best-practices.qmd

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions covid19.qmd

This file was deleted.

Binary file modified docs/Duke-Statistical-Science-TA-Manual.pdf
Binary file not shown.
371 changes: 280 additions & 91 deletions docs/best-practices.html

Large diffs are not rendered by default.

637 changes: 0 additions & 637 deletions docs/covid19.html

This file was deleted.

269 changes: 222 additions & 47 deletions docs/evaluation-recognition.html

Large diffs are not rendered by default.

394 changes: 284 additions & 110 deletions docs/head-ta.html

Large diffs are not rendered by default.

271 changes: 227 additions & 44 deletions docs/index.html

Large diffs are not rendered by default.

334 changes: 255 additions & 79 deletions docs/policies.html

Large diffs are not rendered by default.

285 changes: 228 additions & 57 deletions docs/resources.html

Large diffs are not rendered by default.

344 changes: 269 additions & 75 deletions docs/responsibilities.html

Large diffs are not rendered by default.

240 changes: 110 additions & 130 deletions docs/search.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/site_libs/bootstrap/bootstrap-dark.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

189 changes: 189 additions & 0 deletions docs/site_libs/quarto-html/quarto-syntax-highlighting-dark.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/site_libs/quarto-html/quarto-syntax-highlighting.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions docs/site_libs/quarto-html/quarto.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
if (link.href.indexOf("#") !== -1) {
const anchor = link.href.split("#")[1];
const heading = window.document.querySelector(
`[data-anchor-id=${anchor}]`
`[data-anchor-id="${anchor}"]`
);
if (heading) {
// Add the class
Expand Down Expand Up @@ -134,8 +134,10 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
window.innerHeight + window.pageYOffset >=
window.document.body.offsetHeight
) {
// This is the no-scroll case where last section should be the active one
sectionIndex = 0;
} else {
// This finds the last section visible on screen that should be made active
sectionIndex = [...sections].reverse().findIndex((section) => {
if (section) {
return window.pageYOffset >= section.offsetTop - sectionMargin;
Expand Down Expand Up @@ -317,6 +319,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
for (const child of el.children) {
child.style.opacity = 0;
child.style.overflow = "hidden";
child.style.pointerEvents = "none";
}

nexttick(() => {
Expand Down Expand Up @@ -358,6 +361,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {

const clone = child.cloneNode(true);
clone.style.opacity = 1;
clone.style.pointerEvents = null;
clone.style.display = null;
toggleContents.append(clone);
}
Expand Down Expand Up @@ -432,6 +436,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
for (const child of el.children) {
child.style.opacity = 1;
child.style.overflow = null;
child.style.pointerEvents = null;
}

const placeholderEl = window.document.getElementById(
Expand Down Expand Up @@ -739,6 +744,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
// Process the collapse state if this is an UL
if (el.tagName === "UL") {
if (tocOpenDepth === -1 && depth > 1) {
// toc-expand: false
el.classList.add("collapse");
} else if (
depth <= tocOpenDepth ||
Expand All @@ -757,10 +763,9 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
};

// walk the TOC and expand / collapse any items that should be shown

if (tocEl) {
walk(tocEl, 0);
updateActiveLink();
walk(tocEl, 0);
}

// Throttle the scroll event and walk peridiocally
Expand All @@ -779,6 +784,10 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
window.addEventListener(
"resize",
throttle(() => {
if (tocEl) {
updateActiveLink();
walk(tocEl, 0);
}
if (!isReaderMode()) {
hideOverlappedSidebars();
}
Expand Down
37 changes: 37 additions & 0 deletions docs/site_libs/quarto-nav/quarto-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,45 @@ const headroomChanged = new CustomEvent("quarto-hrChanged", {
composed: false,
});

const announceDismiss = () => {
const annEl = window.document.getElementById("quarto-announcement");
if (annEl) {
annEl.remove();

const annId = annEl.getAttribute("data-announcement-id");
window.localStorage.setItem(`quarto-announce-${annId}`, "true");
}
};

const announceRegister = () => {
const annEl = window.document.getElementById("quarto-announcement");
if (annEl) {
const annId = annEl.getAttribute("data-announcement-id");
const isDismissed =
window.localStorage.getItem(`quarto-announce-${annId}`) || false;
if (isDismissed) {
announceDismiss();
return;
} else {
annEl.classList.remove("hidden");
}

const actionEl = annEl.querySelector(".quarto-announcement-action");
if (actionEl) {
actionEl.addEventListener("click", function (e) {
e.preventDefault();
// Hide the bar immediately
announceDismiss();
});
}
}
};

window.document.addEventListener("DOMContentLoaded", function () {
let init = false;

announceRegister();

// Manage the back to top button, if one is present.
let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
const scrollDownBuffer = 5;
Expand Down Expand Up @@ -237,6 +273,7 @@ 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
Loading

0 comments on commit e1b5e0d

Please sign in to comment.