Skip to content

Commit f5ad3b1

Browse files
kickbelldevclaude
andauthored
feat: 블로그 UI 구조 전면 재설계 (#5)
* docs: CLAUDE.md 파일 추가 향후 Claude Code 인스턴스를 위한 개발 가이드 문서 추가 - 프로젝트 아키텍처 및 핵심 기술 스택 정보 - 개발 명령어 및 코드 품질 도구 설정 안내 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * chore: shadcn/ui 설정 및 의존성 업데이트 - components.json 설정 업데이트 - 필요한 패키지 의존성 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * refactor: utils 파일을 cn.ts로 리팩터링 - utils.ts 파일 제거 - cn.ts로 간소화된 유틸리티 함수 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: 기존 페이지를 placeholder 구조로 단순화 - 홈페이지, About 페이지, 블로그 상세 페이지 단순화 - 복잡한 UI 구조 제거하고 placeholder로 대체 - 추후 컨텐츠 작성을 위한 기본 구조 준비 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: Header 컴포넌트 구현 - sticky 헤더 네비게이션 구현 - stone 컬러 팔레트 적용 - 반응형 네비게이션 구조 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: Footer 컴포넌트 구현 - 3컬럼 반응형 푸터 레이아웃 - 연락처, 링크, 저작권 정보 섹션 - 모바일 대응 및 적절한 density 조정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: 레이아웃 구조 개선 - Header/Footer 컴포넌트 통합 - header-main-footer 레이아웃 구조 구현 - placeholder 메타데이터 적용 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: CSS 스타일 시스템 업데이트 - Tailwind CSS 및 shadcn/ui 스타일 설정 - stone 컬러 팔레트 CSS 변수 추가 - 다크/라이트 테마 지원 준비 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * docs: 커밋 가이드라인 및 개발 설정 업데이트 - CLAUDE.md에 논리적 커밋 분리 가이드라인 추가 - lefthook.yml에 pnpm 명령어 적용 - package.json scripts 정리 및 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent fcc6011 commit f5ad3b1

File tree

13 files changed

+355
-54
lines changed

13 files changed

+355
-54
lines changed

CLAUDE.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
- `pnpm dev` - Start development server on localhost:3000
88
- `pnpm build` - Build the application for production (configured for static export)
99
- `pnpm start` - Start production server
10-
- `pnpm biome:check` - Run Biome formatter and linter with auto-fix
10+
- `pnpm biome:check` - Run Biome formatter and linter
11+
- `pnpm biome:fix` - Run Biome formatter and linter with auto-fix
1112
- `pnpm biome:staged` - Run Biome on staged files only
1213

1314
## Code Quality
1415

1516
This project uses Biome for formatting and linting. Always run `pnpm biome:check` before committing changes. The project has a pre-commit hook (lefthook) that automatically runs Biome on staged files.
1617

18+
**IMPORTANT**:
19+
- Do NOT run `pnpm build` during development tasks unless specifically requested by the user. The build process is mainly for final deployment verification.
20+
- When implementing new pages or components, use placeholders instead of actual content. Show what type of content should go in each position rather than writing fake content.
21+
- Do NOT create UI structures arbitrarily. Always ask the user for specific requirements and approval before implementing any UI design or structure.
22+
1723
## Git Workflow
1824

1925
### Branch Strategy
@@ -48,19 +54,8 @@ Co-Authored-By: Claude <[email protected]>
4854
- `fix: 모바일에서 네비게이션 메뉴 깨짐 수정`
4955
- `docs: CLAUDE.md에 Git 워크플로우 가이드 추가`
5056

51-
### Pull Request Process
52-
1. Create feature branch from `main`
53-
2. Implement changes with descriptive commits
54-
3. Run `pnpm biome:check` and ensure build passes
55-
4. Create PR with clear title and description
56-
5. Link related issues if applicable
57-
6. Merge after review (if working in team) or directly (if solo)
58-
5957
### Pre-commit Hooks
60-
The project uses lefthook to automatically run quality checks:
61-
- Biome formatting and linting on staged files
62-
- Prevents commits with linting errors
63-
- Ensures consistent code style across the project
58+
The project uses lefthook to automatically run quality checks
6459

6560
## Claude Code Workflow Instructions
6661

@@ -77,18 +72,22 @@ git checkout -b <type>/<description>
7772
```
7873

7974
### 2. Branch Naming Convention
80-
- `feat/기능명` - New features (e.g., `feat/search-functionality`)
81-
- `fix/버그명` - Bug fixes (e.g., `fix/mobile-nav-issue`)
82-
- `docs/문서명` - Documentation updates (e.g., `docs/readme-update`)
83-
- `config/설정명` - Configuration changes (e.g., `config/eslint-setup`)
84-
- `refactor/리팩터명` - Code refactoring (e.g., `refactor/component-structure`)
85-
- `chore/작업명` - Maintenance tasks (e.g., `chore/dependency-update`)
75+
- `feat/` - New features (e.g., `feat/search-functionality`)
76+
- `fix/` - Bug fixes (e.g., `fix/mobile-nav-issue`)
77+
- `docs/` - Documentation updates (e.g., `docs/readme-update`)
78+
- `config/` - Configuration changes (e.g., `config/eslint-setup`)
79+
- `refactor/` - Code refactoring (e.g., `refactor/component-structure`)
80+
- `chore/` - Maintenance tasks (e.g., `chore/dependency-update`)
8681

8782
### 3. After Completing Work
8883
```bash
89-
# Stage and commit changes
90-
git add .
91-
git commit -m "conventional commit message"
84+
# Stage and commit changes LOGICALLY
85+
# DO NOT commit everything at once - break into logical commits
86+
git add [specific files for logical group 1]
87+
git commit -m "conventional commit message for group 1"
88+
89+
git add [specific files for logical group 2]
90+
git commit -m "conventional commit message for group 2"
9291

9392
# Push to remote
9493
git push -u origin <branch-name>
@@ -99,7 +98,7 @@ gh pr create --title "PR Title" --body "$(cat <<'EOF'
9998
- Brief description of changes
10099
- Key implementation details
101100
102-
## Test plan
101+
## Checklist
103102
- [ ] Checklist item 1
104103
- [ ] Checklist item 2
105104
@@ -108,18 +107,27 @@ EOF
108107
)"
109108
```
110109

110+
**IMPORTANT**: When the user asks to commit changes, NEVER create a single large commit. Always break changes into logical, separate commits such as:
111+
- Documentation changes
112+
- Configuration changes
113+
- New component implementations
114+
- Layout/styling updates
115+
- Bug fixes
116+
Each commit should represent one logical change or feature.
117+
111118
### 4. PR Requirements
112119
- **Always create PRs**: Never commit directly to main
113120
- **Clear titles**: Use conventional commit format in PR titles
114121
- **Detailed descriptions**: Include Summary and Test plan sections
115122
- **Link issues**: Reference related GitHub issues when applicable
116-
- **Quality checks**: Ensure CI passes before requesting review
117123

118124
### 5. Work Scope Guidelines
119125
- **One logical change per PR**: Keep PRs focused and reviewable
120126
- **Complete features**: Don't leave work in broken state
121-
- **Test your changes**: Run `pnpm biome:check` and `pnpm build` before committing
127+
- **Test your changes**: Run `pnpm biome:fix` before committing
122128
- **Document breaking changes**: Clearly explain any breaking changes
129+
- **Use placeholders**: When implementing new pages/components, use placeholders like "[Page Title]", "[Description]", "[Content]" instead of actual content
130+
- **No arbitrary UI**: Do NOT create UI structures without explicit user requirements and approval
123131

124132
### 6. After PR Creation
125133
- Wait for CI checks to pass
@@ -142,30 +150,20 @@ This is a Next.js 15 blog application configured for static export with MDX supp
142150
- TypeScript
143151
- Biome for code formatting/linting
144152

153+
145154
### Directory Structure
146155

147156
All client-side code is organized under `src/app/` following Next.js App Router conventions with a package-like structure:
148157

149158
- `src/app/` - Next.js App Router root directory
150-
- `_components/` - Global reusable React components (underscore prevents routing)
151-
- `_hooks/` - Global custom React hooks (underscore prevents routing)
152-
- `_fonts/` - Font configurations (underscore prevents routing)
153-
- `_lib/` - Global utility functions and libraries (underscore prevents routing)
154159
- `about/` - About page route
155-
- `_components/` - Components specific to about page only
156-
- `_hooks/` - Hooks specific to about page only
157-
- `page.tsx` - About page component
158160
- `blog/` - Blog routes
159-
- `_components/` - Components specific to blog functionality
160-
- `_hooks/` - Hooks specific to blog functionality
161161
- `[slug]/` - Dynamic blog post pages
162-
- `page.tsx` - Blog index page
163162
- `layout.tsx` - Root layout component
164163
- `page.tsx` - Home page
165164
- `not-found.tsx` - 404 error page
166165
- `globals.css` - Global styles
167166
- `src/api/` - Server-side utilities (outside app directory)
168-
- `posts.ts` - Blog post data fetching utilities
169167
- `src/contents/` - MDX blog posts (*.mdx files)
170168

171169
**Naming Convention:**
@@ -191,7 +189,7 @@ The app is configured for static export (`output: 'export'` in next.config.ts) a
191189
### Styling
192190

193191
- Uses Tailwind CSS with custom configuration
194-
- shadcn/ui components with "new-york" style and stone base color
192+
- shadcn/ui for UI components
195193
- CSS variables for theming (light/dark mode support)
196194
- Noto Sans KR font for Korean language support
197195
- Prose styling for blog content rendering
@@ -205,6 +203,7 @@ This project uses shadcn/ui for consistent, high-quality UI components:
205203
- **Theming**: Full CSS variables support for light/dark themes
206204
- **Icons**: Uses Lucide React for icons
207205
- **Utilities**: `cn()` function in `src/app/_lib/utils.ts` for conditional styling
206+
- **Color Palette**: Always use `stone` color palette for consistent design (e.g., `text-stone-900`, `border-stone-200`, `bg-stone-50`)
208207

209208
### Build Output
210209

components.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"tsx": true,
66
"tailwind": {
77
"config": "",
8-
"css": "src/app/_styles/globals.css",
8+
"css": "src/app/globals.css",
99
"baseColor": "stone",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
1313
"aliases": {
1414
"components": "@/app/_components",
15-
"utils": "@/app/_lib/utils",
15+
"utils": "@/app/_lib/cn",
1616
"ui": "@/app/_components/ui",
1717
"lib": "@/app/_lib",
1818
"hooks": "@/app/_hooks"

lefthook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ pre-commit:
22
commands:
33
check:
44
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
5-
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
5+
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
6+
stage_fixed: true

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"biome:check": "biome check --write --verbose",
10-
"biome:staged": "biome check --write --staged --verbose"
9+
"biome:check": "biome check --verbose",
10+
"biome:fix": "biome check --write --verbose",
11+
"biome:staged": "biome check --write --staged"
1112
},
1213
"dependencies": {
1314
"@mdx-js/loader": "^3.1.0",
1415
"@mdx-js/react": "^3.1.0",
1516
"@next/mdx": "^15.3.5",
17+
"@radix-ui/react-separator": "^1.1.7",
18+
"@radix-ui/react-slot": "^1.2.3",
1619
"@types/mdx": "^2.0.13",
1720
"class-variance-authority": "^0.7.1",
1821
"clsx": "^2.1.1",

pnpm-lock.yaml

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/_components/Footer.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import Link from 'next/link'
2+
3+
export default function Footer() {
4+
return (
5+
<footer className="border-t border-stone-200 bg-stone-50 mt-auto">
6+
<div className="container mx-auto px-5 py-6">
7+
{/* 3컬럼 구조 - 모바일에서는 1컬럼 */}
8+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6">
9+
<div>
10+
<h3 className="font-semibold text-stone-900 text-sm mb-2">
11+
[Site Name]
12+
</h3>
13+
<p className="text-sm text-stone-600">[Site Description]</p>
14+
</div>
15+
16+
<div>
17+
<h4 className="font-semibold text-stone-900 text-sm mb-2">
18+
Contact
19+
</h4>
20+
<p className="text-sm text-stone-600">
21+
<Link
22+
href="mailto:[email protected]"
23+
className="hover:text-stone-900 transition-colors"
24+
>
25+
Email
26+
</Link>
27+
</p>
28+
</div>
29+
30+
<div>
31+
<h4 className="font-semibold text-stone-900 text-sm mb-2">Links</h4>
32+
<div className="flex gap-4 md:flex-col md:gap-0 md:space-y-1">
33+
{/* TODO: RSS 추가 */}
34+
<Link
35+
href="https://github.com/kickbelldev"
36+
target="_blank"
37+
rel="noopener noreferrer"
38+
className="text-sm text-stone-600 hover:text-stone-900 transition-colors"
39+
>
40+
GitHub
41+
</Link>
42+
</div>
43+
</div>
44+
</div>
45+
46+
<div className="border-t border-stone-200 mt-4 pt-3">
47+
<div className="text-center">
48+
<p className="text-sm text-stone-500">
49+
© {new Date().getFullYear()} [Site Name]. All rights reserved.
50+
</p>
51+
</div>
52+
</div>
53+
</div>
54+
</footer>
55+
)
56+
}

src/app/_components/Header.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import Link from 'next/link'
2+
3+
export default function Header() {
4+
return (
5+
<header className="sticky top-0 z-50 border-b border-stone-200 bg-white">
6+
<nav className="container mx-auto px-5 h-14 flex items-center gap-x-6">
7+
<Link
8+
href="/"
9+
className="text-xl font-bold text-stone-900"
10+
>
11+
[Site Brand]
12+
</Link>
13+
14+
<div className="flex items-center space-x-6">
15+
<Link
16+
href="/tags"
17+
className="text-stone-500 hover:text-stone-900 transition-colors"
18+
>
19+
Tags
20+
</Link>
21+
<Link
22+
href="/about"
23+
className="text-stone-500 hover:text-stone-900 transition-colors"
24+
>
25+
About
26+
</Link>
27+
</div>
28+
</nav>
29+
</header>
30+
)
31+
}

0 commit comments

Comments
 (0)