mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-06-04 05:45:54 -05:00
✅ Remove unnecessary nesting: book/tinytorch-course/ → book/ ✅ Update all path references in scripts and workflows ✅ Cleaner development experience with shorter paths ✅ Book builds successfully with simplified structure Changes: - Move all book files up one directory level - Update convert_modules.py paths - Update GitHub Actions workflow paths - Update book configuration paths - Test confirms everything works correctly
28 lines
770 B
JavaScript
28 lines
770 B
JavaScript
var sd_labels_by_text = {};
|
|
|
|
function ready() {
|
|
const li = document.getElementsByClassName("sd-tab-label");
|
|
for (const label of li) {
|
|
syncId = label.getAttribute("data-sync-id");
|
|
if (syncId) {
|
|
label.onclick = onLabelClick;
|
|
if (!sd_labels_by_text[syncId]) {
|
|
sd_labels_by_text[syncId] = [];
|
|
}
|
|
sd_labels_by_text[syncId].push(label);
|
|
}
|
|
}
|
|
}
|
|
|
|
function onLabelClick() {
|
|
// Activate other inputs with the same sync id.
|
|
syncId = this.getAttribute("data-sync-id");
|
|
for (label of sd_labels_by_text[syncId]) {
|
|
if (label === this) continue;
|
|
label.previousElementSibling.checked = true;
|
|
}
|
|
window.localStorage.setItem("sphinx-design-last-tab", syncId);
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", ready, false);
|