Skip to content

Commit baca878

Browse files
authored
Migrate to astro (#61)
* migrate to astro * no html excerpt * merge i18n pages * fix ci * improve permalink
1 parent 7427b9c commit baca878

File tree

199 files changed

+6424
-19346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+6424
-19346
lines changed

.editorconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ end_of_line = lf
55
insert_final_newline = true
66
charset = utf-8
77
indent_style = space
8-
9-
[*.js]
10-
indent_size = 4
11-
12-
[*.json]
138
indent_size = 2
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18-
- run: npm i -D
18+
- run: npm ci
1919
- name: Diff
2020
run: |
2121
npm run format

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: "20"
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./dist
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 22 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,31 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
1+
# Dependencies
362
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
443

45-
# Optional eslint cache
46-
.eslintcache
4+
# Build output
5+
dist/
476

48-
# Optional REPL history
49-
.node_repl_history
7+
# Astro
8+
.astro/
509

51-
# Output of 'npm pack'
52-
*.tgz
10+
# Environment
11+
.env
12+
.env.*
13+
!.env.example
5314

54-
# dotenv environment variable files
55-
.env*
15+
# Logs
16+
*.log
17+
npm-debug.log*
5618

57-
# gatsby files
58-
.cache/
59-
public
19+
# Editor
20+
.vscode/
21+
.idea/
22+
*.swp
23+
*.swo
6024

61-
# Mac files
25+
# OS
6226
.DS_Store
27+
Thumbs.db
6328

64-
# Yarn
65-
yarn-error.log
66-
.pnp/
67-
.pnp.js
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
.vercel
29+
# Debug
30+
*.pid
31+
*.seed

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

FRONT_DESIGN.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
2+
## 프론트엔드 디자인 원칙
3+
4+
### 철학: 콘텐츠 우선, 최소 기능
5+
6+
> "단순함을 유지하기가 얼마나 어려운지" - 58 Bytes of CSS
7+
8+
**핵심 가치:**
9+
- 콘텐츠가 주인공, 디자인은 조연
10+
- 추가하기 전에 제거할 것을 먼저 고려
11+
- 브라우저 기본 동작을 존중
12+
- 접근성은 타협 불가
13+
14+
### 참고 사이트 (미니멀 디자인의 모범)
15+
16+
| 사이트 | 특징 |
17+
|--------|------|
18+
| [danluu.com](https://danluu.com) | 극단적 미니멀, 장식 제로, 텍스트만 |
19+
| [bellard.org](https://bellard.org) | 90년대 웹 미학, 링크 목록만 |
20+
| [brandur.org](https://brandur.org) | 깔끔한 타이포그래피, 다크모드 |
21+
| [herman.bearblog.dev](https://herman.bearblog.dev) | 720px 폭, 시스템 폰트 |
22+
23+
### 핵심 CSS 규칙 (100바이트 철학)
24+
25+
```css
26+
/* 이것만으로도 충분히 좋아 보인다 */
27+
html {
28+
max-width: 70ch; /* 가독성 최적 폭 (60-80자) */
29+
padding: 3em 1em; /* 상하 여백, 모바일 가장자리 방지 */
30+
margin: auto; /* 중앙 정렬 */
31+
line-height: 1.75; /* 행간 */
32+
font-size: 1.25em; /* 기본보다 약간 큰 폰트 */
33+
}
34+
```
35+
36+
### 타이포그래피 원칙
37+
38+
**폰트 선택:**
39+
```css
40+
font-family: 'Pretendard', system-ui, -apple-system, sans-serif;
41+
```
42+
- 시스템 폰트 폴백으로 빠른 로딩
43+
- 한글/영문 모두 Pretendard로 통일
44+
45+
**반응형 폰트 사이즈:**
46+
```css
47+
:root {
48+
font-size: calc(1rem + 0.25vw); /* 화면 크기에 따라 부드럽게 확장 */
49+
}
50+
```
51+
- 미디어 쿼리 없이 자연스러운 스케일링
52+
- 모바일 16px → 데스크톱 ~18px
53+
54+
**행간과 폭:**
55+
- `line-height: 1.75` (기본 1.2보다 넓게)
56+
- `max-width: 70ch` (한 줄 45-90자 유지)
57+
58+
### 색상 원칙
59+
60+
**제한된 팔레트:**
61+
```css
62+
:root {
63+
--color-text: #24292f; /* 검정이 아닌 부드러운 다크 그레이 */
64+
--color-bg: #ffffff;
65+
--color-link: #0969da; /* GitHub 블루 */
66+
--color-border: #d0d7de;
67+
--color-code-bg: #f6f8fa; /* 약간의 회색 배경 */
68+
}
69+
```
70+
71+
**다크모드:**
72+
```css
73+
[data-theme="dark"] {
74+
--color-text: #e6edf3;
75+
--color-bg: #0d1117; /* GitHub Dark */
76+
--color-link: #58a6ff;
77+
}
78+
79+
/* 시스템 설정 자동 감지 */
80+
@media (prefers-color-scheme: dark) { ... }
81+
```
82+
83+
### 레이아웃 원칙
84+
85+
**하지 말 것:**
86+
- 그리드/플렉스 남용
87+
- 고정 픽셀 값
88+
- 복잡한 네스팅
89+
- 과도한 애니메이션
90+
- 그림자, 그라데이션
91+
- 불필요한 카드 UI
92+
93+
**할 것:**
94+
- 자연스러운 문서 흐름 존중
95+
- `margin: auto`로 중앙 정렬
96+
- `max-width`로 읽기 폭 제한
97+
- `padding`으로 여백 확보
98+
99+
### 이미지/미디어 원칙
100+
101+
```css
102+
img, svg, video {
103+
max-width: 100%; /* 컨테이너 초과 방지 */
104+
height: auto; /* 비율 유지 */
105+
display: block; /* 인라인 간격 제거 */
106+
}
107+
```
108+
109+
### 링크 스타일
110+
111+
```css
112+
a {
113+
color: var(--color-link);
114+
text-decoration: none; /* 기본 밑줄 제거 */
115+
}
116+
117+
a:hover {
118+
text-decoration: underline;
119+
text-underline-offset: 2px; /* 밑줄 간격 */
120+
}
121+
```
122+
123+
### 코드 블록
124+
125+
```css
126+
pre, code {
127+
font-family: 'Fira Code', ui-monospace, monospace;
128+
background-color: var(--color-code-bg);
129+
}
130+
131+
pre {
132+
padding: 1rem;
133+
border-radius: 6px;
134+
overflow-x: auto; /* 가로 스크롤 */
135+
}
136+
```
137+
138+
### 모던 CSS 한 줄 업그레이드
139+
140+
```css
141+
/* 논리적 속성 사용 */
142+
margin-inline: auto; /* margin-left + margin-right */
143+
144+
/* 콘텐츠에 맞는 크기 */
145+
width: fit-content;
146+
147+
/* 스크롤 동작 */
148+
scroll-behavior: smooth;
149+
150+
/* 다크모드 브라우저 UI */
151+
color-scheme: light dark;
152+
153+
/* 폼 요소 색상 */
154+
accent-color: var(--color-link);
155+
```
156+
157+
### 금지 목록
158+
159+
| 하지 말 것 | 이유 |
160+
|-----------|------|
161+
| `!important` | 유지보수 불가 |
162+
| 인라인 스타일 | 재사용 불가 |
163+
| ID 셀렉터 (#id) | 특이성 과다 |
164+
| 깊은 네스팅 (3단계+) | 복잡성 증가 |
165+
| 픽셀 단위 폰트 | 접근성 저해 |
166+
| 커스텀 스크롤바 | 일관성 파괴 |
167+
| 자동 재생 미디어 | 사용자 경험 저해 |
168+
| 무한 스크롤 | 탐색 불편 |
169+
170+
### 성능 원칙
171+
172+
**CSS 크기 목표:**
173+
- 전체 CSS < 10KB (압축 전)
174+
- 크리티컬 CSS 인라인 가능한 수준
175+
176+
**로딩 최적화:**
177+
```html
178+
<!-- 폰트 프리로드 -->
179+
<link rel="preconnect" href="https://cdn.jsdelivr.net">
180+
<link rel="preload" href="...pretendard.min.css" as="style">
181+
```
182+
183+
### 체크리스트: 새 스타일 추가 전
184+
185+
1. [ ] 브라우저 기본 스타일로 충분한가?
186+
2. [ ] 기존 CSS 변수로 해결 가능한가?
187+
3. [ ] 모바일에서 테스트했는가?
188+
4. [ ] 다크모드에서 테스트했는가?
189+
5. [ ] 접근성 (대비, 폰트 크기)을 고려했는가?
190+
6. [ ] 이 스타일 없이도 콘텐츠가 읽히는가?

0 commit comments

Comments
 (0)