Skip to content

Commit cfa5614

Browse files
claudejsshin2022
authored andcommitted
Point the logos at the hub, add a hub strip to every page, and trim the README
- The Pseudo Lab and Causal-Lab logos in the sidebar and on the landing page now open the Causal Inference Hub. - Every page starts with a slim strip naming the hub, with links to its curriculum, posts and how to join. - Call chapter 24 the Diff-in-Diff series in Korean. - Move the build and upstream-sync notes from the README to a new CONTRIBUTING.md so the README speaks to readers.
1 parent 732bdfc commit cfa5614

8 files changed

Lines changed: 164 additions & 60 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 기여 안내
2+
3+
번역을 고치거나 웹북을 손보려는 분을 위한 안내입니다. 읽기만 하신다면 [웹북](https://causalinferencelab.github.io/Causal-Inference-with-Python/)으로 가시면 됩니다.
4+
5+
## 번역 고치기
6+
7+
1. [번역 가이드](TRANSLATION_GUIDE.md)의 원칙과 용어표를 먼저 읽습니다.
8+
2. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다. 마크다운 셀만 고치고, 코드 셀·출력·수식·링크 주소는 그대로 둡니다.
9+
3. PR을 올리면 GitHub Actions가 웹북을 빌드해 확인합니다. 메인테이너 검토 뒤 머지되면 웹북에 반영됩니다.
10+
11+
용어를 바꾸거나 더하고 싶다면 [용어 제안 이슈](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues/new?template=term-proposal.yml)로 먼저 의견을 나눠 주세요.
12+
13+
## 웹북 빌드와 미리 보기
14+
15+
웹북은 [Quarto](https://quarto.org/) Book으로 만듭니다. `main`에 머지되면 GitHub Actions(`.github/workflows/book.yml`)가 빌드해 GitHub Pages에 배포합니다. PR에서는 빌드만 확인하며, 결과물은 Actions의 `book-preview` 아티팩트로 내려받아 볼 수 있습니다.
16+
17+
로컬에서 미리 보려면 Quarto를 설치한 뒤 다음을 실행하세요. 노트북은 다시 실행하지 않고 저장된 출력을 그대로 씁니다.
18+
19+
```bash
20+
pip install jupyter
21+
python book/prepare.py
22+
cd book && quarto preview
23+
```
24+
25+
`book/prepare.py`는 빌드할 때 [번역 가이드](TRANSLATION_GUIDE.md)의 용어표로 웹북의 '용어집' 페이지를 만들고, `book/postrender.py`는 렌더링이 끝난 뒤 웹북 검색 색인(`search-index.json`)을 만듭니다. `book/prepare.py`는 빌드할 때만 장 제목, 수식 표기, 접힌 코드, 옮긴이 주 상자를 책 형식으로 바꿉니다. 그래서 노트북은 원서와 같은 구조로 두면 됩니다.
26+
27+
읽기 기능(읽은 장 기록, 이어 읽기, 장 끝 평가, 허브로 가는 링크)은 `book/reader.html`, GA4 설정은 `book/analytics.html`에 있습니다. 읽은 장 기록은 독자의 브라우저(`localStorage`의 `cil-book-*`)에만 남고, 같은 도메인의 [Causal Inference Hub](https://causalinferencelab.github.io/)가 이 기록으로 진도와 활동 여권 스탬프를 보여 줍니다.
28+
29+
## 원서 변경 반영 (메인테이너)
30+
31+
원서가 바뀌면 GitHub Actions(`Upstream watch`)가 매월 1일 확인해 바뀐 장과 본문 변경을 정리한 이슈를 메인테이너에게 배정합니다. 번역을 고친 PR이 메인테이너 검토를 거쳐 머지되면 웹북에 반영되고 이슈는 자동으로 닫힙니다. 자세한 절차는 [번역 가이드](TRANSLATION_GUIDE.md#5-원서-변경-반영)에 있습니다.

‎README.md‎

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
1919
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/pulls"><img src="https://img.shields.io/github/issues-pr/CausalInferenceLab/Causal-Inference-with-Python?color=a996d6" alt="Pull Requests"></a>
2020
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues"><img src="https://img.shields.io/github/issues/CausalInferenceLab/Causal-Inference-with-Python?color=a996d6" alt="Issues"></a>
2121
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/graphs/contributors"><img src="https://img.shields.io/github/contributors/CausalInferenceLab/Causal-Inference-with-Python?color=2b9348" alt="Contributors"></a>
22-
<a href="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/actions/workflows/book.yml"><img src="https://github.com/CausalInferenceLab/Causal-Inference-with-Python/actions/workflows/book.yml/badge.svg" alt="웹북 빌드"></a>
2322
<a href="https://doi.org/10.5281/zenodo.4445778"><img src="https://img.shields.io/badge/%EC%9B%90%EC%84%9C%20DOI-10.5281%2Fzenodo.4445778-blue" alt="원서 DOI"></a>
2423
</p>
2524

@@ -75,7 +74,7 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
7574
| 21 | [메타러너](https://causalinferencelab.github.io/Causal-Inference-with-Python/21-Meta-Learners.html) | 2023-12-31 | [박병수](https://github.com/Hinterhalter) |
7675
| 22 | [편향 제거/직교화 머신러닝](https://causalinferencelab.github.io/Causal-Inference-with-Python/22-Debiased-Orthogonal-Machine-Learning.html) | 2023-11-03 | [홍성철](https://github.com/chulhongsung) |
7776
| 23 | [효과 이질성과 비선형성](https://causalinferencelab.github.io/Causal-Inference-with-Python/23-Challenges-with-Effect-Heterogeneity-and-Nonlinearity.html) | 2024-01-10 | [임종언](https://github.com/limjongun95) |
78-
| 24 | [이중차분법 사가](https://causalinferencelab.github.io/Causal-Inference-with-Python/24-The-Diff-in-Diff-Saga.html) | 2023-06-26 | [박시온](https://github.com/rockgoat95) |
77+
| 24 | [이중차분법 시리즈](https://causalinferencelab.github.io/Causal-Inference-with-Python/24-The-Diff-in-Diff-Saga.html) | 2023-06-26 | [박시온](https://github.com/rockgoat95) |
7978
| 25 | [합성 이중차분법](https://causalinferencelab.github.io/Causal-Inference-with-Python/25-Synthetic-Diff-in-Diff.html) | 2026-10-18 | [신진수](https://github.com/jsshin2022) |
8079

8180
### 부록
@@ -100,43 +99,20 @@ Matheus Facure의 [Causal Inference for The Brave and True](https://matheusfacur
10099
- 용어와 문체를 『실무로 통하는 인과추론 with 파이썬』 기준으로 통일했습니다.
101100
- 원문의 오류는 본문과 수식을 고치지 않고 옮긴이 주로 짚었습니다. 뜻이 분명한 오타만 바로잡고 그 사실을 주에 밝혔습니다.
102101

103-
자세한 원칙과 용어표는 [번역 가이드](TRANSLATION_GUIDE.md)에 있습니다.
102+
원서가 바뀌면 매달 확인해 한국어판에 반영합니다. 자세한 원칙과 용어표는 [번역 가이드](TRANSLATION_GUIDE.md)에 있습니다.
104103

105104
<br>
106105

107106
## 함께 만들기
108107

109108
- 웹북의 각 장 끝 '의견 나누기'에서 GitHub 계정으로 로그인해 댓글을 남길 수 있습니다. 댓글은 장별로 [GitHub Discussions](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/discussions)에 모입니다.
110109
- 오역, 오탈자, 깨진 수식이나 그림은 [이슈](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues)로 알려 주세요.
111-
- 직접 고치고 싶다면 [번역 가이드](TRANSLATION_GUIDE.md)를 읽고 PR을 보내 주세요. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다.
110+
- 직접 고치고 싶다면 [번역 가이드](TRANSLATION_GUIDE.md)와 [기여 안내](CONTRIBUTING.md)를 읽고 PR을 보내 주세요. 원고는 `causal-inference-for-the-brave-and-true/` 폴더의 노트북입니다.
111+
- 더 나은 번역어가 있다면 [용어 제안](https://github.com/CausalInferenceLab/Causal-Inference-with-Python/issues/new?template=term-proposal.yml)으로 알려 주세요.
112112
- 그 밖의 문의는 메인테이너 [신진수](https://github.com/jsshin2022)에게 부탁드립니다.
113113

114114
<br>
115115

116-
## 웹북 빌드
117-
118-
웹북은 [Quarto](https://quarto.org/) Book으로 만듭니다. `main`에 머지되면 GitHub Actions(`.github/workflows/book.yml`)가 빌드해 GitHub Pages에 배포합니다. PR에서는 빌드만 확인하며, 결과물은 Actions의 `book-preview` 아티팩트로 내려받아 볼 수 있습니다.
119-
120-
로컬에서 미리 보려면 Quarto를 설치한 뒤 다음을 실행하세요. 노트북은 다시 실행하지 않고 저장된 출력을 그대로 씁니다.
121-
122-
```bash
123-
pip install jupyter
124-
python book/prepare.py
125-
cd book && quarto preview
126-
```
127-
128-
`book/prepare.py`는 빌드할 때 [번역 가이드](TRANSLATION_GUIDE.md)의 용어표로 웹북의 '용어집' 페이지를 만들고, `book/postrender.py`는 렌더링이 끝난 뒤 웹북 검색 색인(`search-index.json`)을 만듭니다. `book/prepare.py`는 빌드할 때만 장 제목, 수식 표기, 접힌 코드, 옮긴이 주 상자를 책 형식으로 바꿉니다. 그래서 노트북은 원서와 같은 구조로 두면 됩니다.
129-
130-
읽기 기능(읽은 장 기록, 이어 읽기, 장 끝 평가, 허브로 가는 링크)은 `book/reader.html`, GA4 설정은 `book/analytics.html`에 있습니다. 읽은 장 기록은 독자의 브라우저(`localStorage`의 `cil-book-*`)에만 남고, 같은 도메인의 [Causal Inference Hub](https://causalinferencelab.github.io/)가 이 기록으로 진도와 활동 여권 스탬프를 보여 줍니다.
131-
132-
<br>
133-
134-
## 원서 변경 반영
135-
136-
원서가 바뀌면 GitHub Actions(`Upstream watch`)가 매월 1일 확인해 바뀐 장과 본문 변경을 정리한 이슈를 메인테이너에게 배정합니다. 번역을 고친 PR이 메인테이너 검토를 거쳐 머지되면 웹북에 반영되고 이슈는 자동으로 닫힙니다. 자세한 절차는 [번역 가이드](TRANSLATION_GUIDE.md#5-원서-변경-반영)에 있습니다.
137-
138-
<br>
139-
140116
## 감사의 말
141117

142118
한국어 번역을 흔쾌히 허락해 준 Matheus Facure에게 감사드립니다. 번역과 실습 자료를 함께 만든 인과추론팀 멤버들에게도 고마운 마음을 전합니다.

‎book/_quarto.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ book:
3737
collapse-level: 3
3838
header: |
3939
<a class="hub-card" href="https://causalinferencelab.github.io/"><span class="hub-card-arrow" aria-hidden="true">←</span><span class="hub-card-text"><b>Causal Inference Hub</b><small>인과추론팀 커리큘럼과 오픈소스</small></span></a>
40-
<a class="brand-lockup" href="https://pseudo-lab.com/" target="_blank" rel="noopener" aria-label="가짜연구소">
40+
<a class="brand-lockup" href="https://causalinferencelab.github.io/" title="Causal Inference Hub로 가기" aria-label="가짜연구소 인과추론팀 Causal Inference Hub로 가기">
4141
<img class="brand-pseudolab only-light" src="assets/pseudolab-dark.png" alt="가짜연구소 Pseudo Lab">
4242
<img class="brand-pseudolab only-dark" src="assets/pseudolab-light.png" alt="가짜연구소 Pseudo Lab">
4343
<span class="brand-divider"></span>

‎book/index.qmd‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@ aliases:
77
```{=html}
88
<div class="hero">
99
<div class="hero-main">
10-
<nav class="hero-crumb" aria-label="위치">
11-
<a href="https://causalinferencelab.github.io/">인과추론 허브</a>
12-
<span aria-hidden="true">›</span>
13-
<a href="https://causalinferencelab.github.io/#station=Causal-Inference-with-Python">커리큘럼 L1</a>
14-
</nav>
15-
<div class="hero-brand">
10+
<a class="hero-brand" href="https://causalinferencelab.github.io/" title="Causal Inference Hub로 가기">
1611
<img class="hero-pseudolab" src="assets/pseudolab-light.png" alt="가짜연구소 Pseudo Lab">
1712
<span class="hero-brand-divider"></span>
1813
<span class="hero-brand-team">인과추론팀 <b>Causal-Lab</b></span>
19-
</div>
14+
</a>
2015
<p class="hero-title">Python으로 하는<br>인과추론</p>
2116
<p class="hero-sub"><a href="https://matheusfacure.github.io/python-causality-handbook/landing-page.html">Causal Inference for The Brave and True</a> 한국어판. 인과추론의 기초부터 실무 응용까지, 모든 실습을 파이썬으로.</p>
2217
<div class="hero-actions">

‎book/prepare.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"21-Meta-Learners": "메타러너",
4949
"22-Debiased-Orthogonal-Machine-Learning": "편향 제거/직교화 머신러닝",
5050
"23-Challenges-with-Effect-Heterogeneity-and-Nonlinearity": "효과 이질성과 비선형성",
51-
"24-The-Diff-in-Diff-Saga": "이중차분법 사가",
51+
"24-The-Diff-in-Diff-Saga": "이중차분법 시리즈",
5252
"25-Synthetic-Diff-in-Diff": "합성 이중차분법",
5353
"Debiasing-with-Orthogonalization": "직교화로 편향 제거하기",
5454
"Debiasing-with-Propensity-Score": "성향점수로 편향 제거하기",

‎book/reader.html‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// ---------- 허브(같은 도메인의 팀 사이트)로 가는 링크: 같은 탭, utm_*, 클릭 이벤트 ----------
2020
function placement(a) {
21-
var spots = [["#quarto-sidebar", "sidebar"], [".quarto-secondary-nav", "topbar"], [".nav-footer", "footer"],
21+
var spots = [[".cil-hubbar", "hubbar"], ["#quarto-sidebar", "sidebar"], [".quarto-secondary-nav", "topbar"], [".nav-footer", "footer"],
2222
[".hero", "hero"], [".hub-banner", "intro_banner"], [".cil-end", "chapter_end"], ["main", "content"]];
2323
for (var i = 0; i < spots.length; i++) if (a.closest(spots[i][0])) return spots[i][1];
2424
return "other";
@@ -73,6 +73,20 @@
7373
}
7474
paintSidebar();
7575

76+
// 모든 페이지 맨 위: 이 책이 Causal Inference Hub의 자료라는 띠
77+
if (main) {
78+
var bar0 = document.createElement("div");
79+
bar0.className = "cil-hubbar";
80+
bar0.innerHTML =
81+
'<a class="cil-hubbar-home" href="' + HUB + '"><img src="assets/causal-lab-mark.png" alt="" width="22" height="25">' +
82+
'<span><b>Causal Inference Hub</b><small>가짜연구소 인과추론팀</small></span></a>' +
83+
'<span class="cil-hubbar-where">이 책은 허브 커리큘럼의 <b>L1</b> 자료입니다</span>' +
84+
'<nav class="cil-hubbar-nav" aria-label="Causal Inference Hub">' +
85+
'<a href="' + HUB + '#curriculum">커리큘럼</a><a href="' + HUB + '#posts">연재</a><a href="' + HUB + '#join">참여하기</a>' +
86+
"</nav>";
87+
main.insertBefore(bar0, main.firstChild);
88+
}
89+
7690
// 좁은 화면 상단 막대: 허브 바로가기
7791
var nav = document.querySelector(".quarto-secondary-nav .container-fluid");
7892
if (nav) {

‎book/styles-dark.scss‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,18 @@ body {
234234
background: rgba(111, 207, 151, 0.1);
235235
border-color: rgba(111, 207, 151, 0.3);
236236
}
237+
238+
.cil-hubbar {
239+
border-color: #2b2e40;
240+
background: linear-gradient(90deg, rgba(180, 165, 234, 0.12) 0%, rgba(180, 165, 234, 0.04) 100%);
241+
}
242+
243+
.cil-hubbar-home,
244+
.cil-hubbar-where b,
245+
.cil-hubbar-nav a {
246+
color: #eceaff;
247+
}
248+
249+
.cil-hubbar-where {
250+
color: #9a9db0;
251+
}

‎book/styles.scss‎

Lines changed: 95 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,101 @@ main:has(.hero) #title-block-header {
428428
text-align: center;
429429
}
430430

431+
// 모든 페이지 맨 위: Causal Inference Hub 띠
432+
.cil-hubbar {
433+
display: flex;
434+
flex-wrap: wrap;
435+
align-items: center;
436+
gap: 0.4rem 1rem;
437+
margin: 0 0 1.4rem;
438+
padding: 0.55rem 0.9rem;
439+
border-radius: 12px;
440+
border: 1px solid rgba($indigo, 0.14);
441+
background: linear-gradient(90deg, $lavender-soft 0%, rgba($lavender-soft, 0.35) 100%);
442+
font-size: 0.84rem;
443+
}
444+
445+
.cil-hubbar a {
446+
text-decoration: none;
447+
}
448+
449+
.cil-hubbar-home {
450+
display: inline-flex;
451+
align-items: center;
452+
gap: 0.5rem;
453+
color: $navy;
454+
}
455+
456+
.cil-hubbar-home img {
457+
width: 22px;
458+
height: auto;
459+
margin: 0;
460+
}
461+
462+
.cil-hubbar-home span {
463+
display: flex;
464+
flex-direction: column;
465+
line-height: 1.25;
466+
}
467+
468+
.cil-hubbar-home b {
469+
font-weight: 800;
470+
}
471+
472+
.cil-hubbar-home small {
473+
font-size: 0.72rem;
474+
color: $sidebar-fg;
475+
}
476+
477+
.cil-hubbar-where {
478+
color: lighten($body-color, 25%);
479+
}
480+
481+
.cil-hubbar-where b {
482+
color: $indigo;
483+
}
484+
485+
.cil-hubbar-nav {
486+
display: flex;
487+
gap: 0.3rem;
488+
margin-left: auto;
489+
}
490+
491+
.cil-hubbar-nav a {
492+
padding: 0.25rem 0.65rem;
493+
border-radius: 999px;
494+
color: $indigo;
495+
font-weight: 650;
496+
}
497+
498+
.cil-hubbar-nav a:hover {
499+
background: rgba($indigo, 0.1);
500+
}
501+
502+
@media (max-width: 767.98px) {
503+
.cil-hubbar-where {
504+
display: none;
505+
}
506+
.cil-hubbar-nav {
507+
margin-left: 0;
508+
width: 100%;
509+
}
510+
.cil-hubbar-nav a {
511+
padding-left: 0;
512+
padding-right: 0.8rem;
513+
}
514+
}
515+
516+
a.hero-brand {
517+
color: inherit;
518+
text-decoration: none;
519+
}
520+
521+
a.hero-brand:hover .hero-brand-team {
522+
text-decoration: underline;
523+
text-underline-offset: 3px;
524+
}
525+
431526
// 사이드바 맨 위: Causal Inference Hub로 가는 카드
432527
.hub-card {
433528
display: flex;
@@ -514,28 +609,6 @@ main:has(.hero) #title-block-header {
514609
}
515610
}
516611

517-
// 첫 화면 위치 표시: 인과추론 허브 › 서가
518-
.hero .hero-crumb {
519-
display: flex;
520-
align-items: center;
521-
gap: 0.45rem;
522-
margin-bottom: 1.1rem;
523-
font-size: 0.82rem;
524-
color: rgba(255, 255, 255, 0.6);
525-
}
526-
527-
.hero .hero-crumb a {
528-
color: rgba(255, 255, 255, 0.88);
529-
font-weight: 600;
530-
text-decoration: none;
531-
border-bottom: 1px solid rgba(255, 255, 255, 0.35);
532-
}
533-
534-
.hero .hero-crumb a:hover {
535-
color: #fff;
536-
border-bottom-color: #fff;
537-
}
538-
539612
// 장 첫머리: 분량, 위치, 노트북
540613
.cil-chapter-meta {
541614
display: flex;

0 commit comments

Comments
 (0)