Skip to content

Commit 11ec7e6

Browse files
committed
Turn the library glossary into dictionary entries linked to team materials
Each term now shows a one-line meaning in the list and opens to the full meaning, the web book chapters, the team's other materials that use the term most, and the library topics it belongs to. A search that narrows to one or two terms opens them. scripts/build_term_links.py scans the team repositories (study slides, Causal Studio notebooks, book code, study notes, case decks) and writes data/term_links.json; 99 of the 183 terms get up to four documents each, linked to the team site page when one exists. data/pseudo.json gets meanings for the 67 terms that had none, so every term has one.
1 parent 53dd3af commit 11ec7e6

8 files changed

Lines changed: 2431 additions & 35 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ PR을 올리기 전에 `python3 scripts/check_data.py`를 실행해 주세요.
2727
| `assets/js/header.js` | 허브가 아닌 페이지(자료실, 게임, 실험실, 글, Builder, 404)의 상단. 메뉴는 허브와 같은 여섯 곳이고, 다음 Data Forum 배지를 `events.json`에서 그립니다. 메뉴를 바꿀 때는 `index.html`, 각 페이지, `scripts/build_builders.py`의 `site-nav`를 함께 고칩니다. |
2828
| `assets/js/suggest.js` | 검색창 아래 관련 검색어. `data-suggest`가 붙은 입력창에서 `topics.json`의 주제(이름·영문·`keys`)와 `glossary.json`의 용어(번역어·다른 표기·원어)를 찾고, 한글 초성(ㅇㅈㅊㅂ)과 영문 약어(DID)도 받습니다. 주제가 숨은 키워드로만 걸리면 어떤 키워드인지 함께 보여 줍니다. 팀 프로젝트(`repos.json`)도 함께 제안하고, 전체 문구로 없으면 가장 긴 낱말로 다시 찾습니다. 잘 안 걸리는 말이 있으면 해당 주제의 `keys`를 늘리세요. |
2929
| `data/glossary.json` | 직접 고치지 않습니다. 배포할 때 `scripts/build_glossary.py`가 웹북 용어집 페이지를 읽어 새로 만듭니다. 용어를 고치려면 Causal-Inference-with-Python의 `TRANSLATION_GUIDE.md` 용어표를 고치세요. 웹북이 다시 배포된 다음 허브 배포 때 반영됩니다. |
30+
| `data/term_links.json` | 자료실 용어집의 ‘팀 자료에서’ 목록. 손으로 고치지 않고, 팀 저장소를 한 폴더에 clone한 뒤 `python3 scripts/build_term_links.py <폴더> --check-urls`로 다시 만듭니다. 발표 자료(PDF, `pdftotext` 필요), 노트북과 마크다운에서 용어의 번역어·다른 표기·원어를 찾아, 용어마다 많이 다룬 문서를 4개까지(저장소당 2개) 고릅니다. 팀 저장소에 자료가 늘면 다시 돌려 커밋하세요. 용어의 한 줄 풀이는 `data/pseudo.json`에 있고 Pseudo와 용어집이 함께 씁니다. |
3031
| `data/repos.json` | 레포를 추가하거나 설명·단계·트랙·상태를 바꿀 때. 자료실 검색은 레포 이름·`title`·`tags`·`builders`와 검색어 `keys`로 팀 프로젝트를 찾아 주제 위에 보여 줍니다(예: `CausalML`, `LLM`). 주제에 넣기 어려운 프로젝트가 검색에 안 걸리면 `keys`를 늘리세요. |
3132
| `data/map.json` | 트랙 지도에서 레포의 위치를 정할 때. 책과 강의(`paid`)의 표지와 소개도 여기서 고칩니다. |
3233
| `data/levels.json` | 레벨의 설명과 볼 순서를 바꿀 때. `learn`(배우는 것), `outcome`(끝나면), `steps`(순서대로 볼 레포와 한 줄 `note`), `more`(웹북 장이나 허브 페이지 같은 더 해 보기 링크)를 적습니다. `steps`에 없는 같은 레벨의 레포는 ‘골라 보기’로 나옵니다. |

‎assets/css/hub.css‎

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,38 +2493,77 @@ dialog.sheet .toast:not(.show) { transition: opacity .25s ease, visibility 0s li
24932493
.lib-clear { font: inherit; font-size: 13px; font-weight: 700; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; margin-left: 6px; }
24942494
.lib-terms { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
24952495
.lib-terms > span { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
2496-
/* glossary rows: term, English, then the chapters and topics it leads to */
2497-
.gl-body { display: grid; gap: 22px; min-width: 0; }
2496+
/* glossary: dictionary entries. Closed, a row reads name · English · one-line meaning; open, it shows the
2497+
full meaning and where to read on (web book chapters, the team's other materials, library topics) */
2498+
.gl-body { display: grid; gap: 26px; min-width: 0; }
24982499
.gl-sec .lib-shelf { margin-top: 0; scroll-margin-top: 90px; }
24992500
.gl-sec .lib-shelf:focus { outline: none; }
2500-
.gl-list { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 14px 14px; }
2501-
.gl-row { display: grid; gap: 4px 18px; padding: 12px 18px; border-bottom: 1px solid var(--rule); scroll-margin-top: 100px; }
2501+
.gl-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 14px 14px; }
2502+
.gl-row { border-bottom: 1px solid var(--rule); scroll-margin-top: 100px; position: relative; }
25022503
.gl-row:last-child { border-bottom: 0; }
2503-
@media (min-width: 760px) { .gl-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; } }
25042504
.gl-row:focus { outline: none; }
2505-
.gl-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
25062505
.gl-row.hit { animation: lib-hit 1.6s ease-out; }
25072506
@media (prefers-reduced-motion: reduce) { .gl-row.hit { animation: none; } }
2508-
.gl-row dt { display: grid; gap: 2px; }
2509-
.gl-ko { font-size: 15.5px; font-weight: 750; color: var(--ink); text-decoration: none; }
2510-
.gl-ko:hover { color: var(--shelf); text-decoration: underline; text-underline-offset: 3px; }
2511-
.gl-alias { font-size: 12.5px; color: var(--muted); }
2512-
.gl-row dd { margin: 0; }
2513-
.gl-en { font-size: 14px; color: var(--muted); padding-top: 1px; }
2514-
.gl-links { display: flex; flex-wrap: wrap; gap: 6px; }
2515-
.gl-ch, .gl-tp { font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 3px 9px; border-radius: 999px; line-height: 1.5; }
2516-
.gl-ch { color: var(--ink); background: var(--surface-2); }
2517-
.gl-ch b { font-weight: 800; }
2518-
.gl-ch:hover { background: var(--accent-soft); color: var(--accent); }
2519-
.gl-tp { color: var(--shelf); border: 1.5px solid color-mix(in srgb, var(--shelf) 45%, var(--rule)); }
2507+
.gl-h { margin: 0; font: inherit; }
2508+
.gl-btn { font: inherit; color: inherit; text-align: left; width: 100%; background: none; border: 0; cursor: pointer; display: grid; grid-template-columns: minmax(150px, 15em) minmax(0, 1fr) auto 18px; align-items: baseline; gap: 4px 18px; padding: 13px 18px; }
2509+
.gl-btn:hover { background: color-mix(in srgb, var(--shelf) 5%, var(--surface)); }
2510+
.gl-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
2511+
.gl-name { display: grid; gap: 1px; min-width: 0; grid-column: 1; }
2512+
.gl-sum { grid-column: 2; }
2513+
.gl-meta { grid-column: 3; }
2514+
.gl-chev { grid-column: 4; }
2515+
.gl-ko { font-size: 16px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); }
2516+
.gl-en { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
2517+
.gl-sum { font-size: 14px; line-height: 1.55; color: var(--ink); opacity: .82; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
2518+
.gl-meta { display: flex; gap: 6px; white-space: nowrap; }
2519+
.gl-meta span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
2520+
.gl-chev { align-self: center; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; }
2521+
.gl-row.open { background: color-mix(in srgb, var(--shelf) 4%, var(--surface)); }
2522+
.gl-row.open::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--shelf); }
2523+
.gl-row.open .gl-ko { color: var(--shelf); }
2524+
.gl-row.open .gl-sum { display: none; }
2525+
.gl-row.open .gl-chev { transform: rotate(-135deg) translate(-2px, -2px); }
2526+
@media (prefers-reduced-motion: reduce) { .gl-chev { transition: none; } }
2527+
.gl-detail { padding: 0 18px 18px; display: grid; gap: 14px; }
2528+
.gl-def { font-size: 16px; line-height: 1.7; color: var(--ink); max-width: 62ch; margin: 0; }
2529+
.gl-alias { font-size: 13px; color: var(--muted); margin: -6px 0 0; }
2530+
.gl-alias span { color: var(--ink); font-weight: 600; margin-left: 6px; }
2531+
.gl-where { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
2532+
.gl-col { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; min-width: 0; }
2533+
.gl-col h4 { font-size: 13px; font-weight: 800; color: var(--muted); margin: 0 0 6px; }
2534+
.gl-chs, .gl-team { list-style: none; margin: 0; padding: 0; display: grid; }
2535+
.gl-chs a { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 14.5px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--rule); }
2536+
.gl-chs li:first-child a, .gl-team li:first-child a { border-top: 0; }
2537+
.gl-chs a b { flex: none; min-width: 3.4em; font-size: 12.5px; font-weight: 800; color: var(--shelf); }
2538+
.gl-chs a:hover, .gl-team a:hover .gl-tt { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
2539+
.gl-team a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 1px; padding: 7px 0; text-decoration: none; color: var(--ink); border-top: 1px solid var(--rule); }
2540+
.gl-tk { grid-row: 1 / 3; align-self: start; margin-top: 2px; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
2541+
.gl-tk.k-slides { background: color-mix(in srgb, var(--l-exp) 12%, var(--surface)); color: color-mix(in srgb, var(--l-exp) 80%, var(--ink)); }
2542+
.gl-tk.k-code { background: color-mix(in srgb, var(--l-main) 12%, var(--surface)); color: var(--l-main); }
2543+
.gl-tt { font-size: 14.5px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
2544+
.gl-ts { font-size: 12.5px; color: var(--muted); }
2545+
.gl-none { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.6; }
2546+
.gl-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; }
2547+
.gl-tps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
2548+
.gl-tps > span { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
2549+
.gl-btns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
2550+
.gl-btns .lib-link { font-size: 13px; margin-left: 0; display: inline-flex; align-items: center; }
2551+
.gl-tp { font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 3px 9px; border-radius: 999px; line-height: 1.5; color: var(--shelf); border: 1.5px solid color-mix(in srgb, var(--shelf) 45%, var(--rule)); }
25202552
.gl-tp:hover { border-color: var(--shelf); }
2521-
.gl-none { font-size: 12.5px; color: var(--muted); }
2553+
@media (max-width: 860px) {
2554+
.gl-btn { grid-template-columns: minmax(0, 1fr) auto 14px; padding: 12px 14px; }
2555+
.gl-sum { grid-column: 1 / -1; grid-row: 2; -webkit-line-clamp: 2; }
2556+
.gl-meta { grid-column: 2; }
2557+
.gl-chev { grid-column: 3; }
2558+
.gl-where { grid-template-columns: minmax(0, 1fr); }
2559+
.gl-detail { padding: 0 14px 16px; }
2560+
}
2561+
@media (max-width: 520px) { .gl-meta { display: none; } .gl-btn { grid-template-columns: minmax(0, 1fr) 14px; } .gl-chev { grid-column: 2; } }
25222562
.gl-foot { margin-top: 16px; font-size: 13.5px; color: var(--muted); max-width: 80ch; line-height: 1.7; }
25232563
.gl-foot a { color: var(--accent); font-weight: 650; }
25242564
@media (max-width: 560px) {
25252565
.lib-stats { gap: 10px 22px; }
25262566
.lib-stats b { font-size: 26px; }
2527-
.gl-row { padding: 12px 14px; }
25282567
}
25292568
.tp-all { display: flex; flex-wrap: wrap; gap: 6px 22px; }
25302569
@media (max-width: 560px) {

0 commit comments

Comments
 (0)