Skip to content

Commit 35119fd

Browse files
claudejsshin2022
authored andcommitted
Move the glossary to the bottom of the sidebar and widen chapter spacing
1 parent 1e67d79 commit 35119fd

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎book/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ _book/
1111
/.quarto/
1212
**/*.quarto_ipynb
1313
glossary.qmd
14+
comments.html

‎book/_quarto.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ book:
8787
- 23-Challenges-with-Effect-Heterogeneity-and-Nonlinearity.ipynb
8888
- 24-The-Diff-in-Diff-Saga.ipynb
8989
- 25-Synthetic-Diff-in-Diff.ipynb
90-
- glossary.qmd
9190
appendices:
9291
- Debiasing-with-Orthogonalization.ipynb
9392
- Debiasing-with-Propensity-Score.ipynb
9493
- When-Prediction-Fails.ipynb
9594
- Prediction-Metrics-For-Causal-Models.ipynb
9695
- Conformal-Inference-for-Synthetic-Control.ipynb
96+
- glossary.qmd
9797

9898
crossref:
9999
chapters: true
@@ -120,6 +120,7 @@ format:
120120
- sidebar-resize.html
121121
- chapter-toc.html
122122
- site-search.html
123+
- comments.html
123124
include-in-header:
124125
- text: |
125126
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css">

‎book/sidebar-resize.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
if (get(KEY_R) === "1") root.classList.add("toc-collapsed");
1313

1414
document.addEventListener("DOMContentLoaded", function () {
15+
// 용어집은 부록 묶음 밖, 목차 맨 아래에 둔다
16+
var gl = document.querySelector('#quarto-sidebar a.sidebar-link[href$="glossary.html"]');
17+
var top = document.querySelector("#quarto-sidebar .sidebar-menu-container > ul");
18+
if (gl && top) {
19+
var li = gl.closest("li.sidebar-item");
20+
if (li && li.parentElement !== top) { li.classList.add("sidebar-glossary"); top.appendChild(li); }
21+
}
1522
var sidebar = document.getElementById("quarto-sidebar");
1623
if (!document.body.classList.contains("docked") || !sidebar) return;
1724

0 commit comments

Comments
 (0)