[구현] 3-tier 레이아웃 시스템 + 기본 폭 뷰 정리
ID: 5dd2b4da-96fc-4b88-9c8e-7ba685b39f84
## 작업 1: application.html.erb 3-tier 시스템 구축
`app/views/layouts/application.html.erb`에서:
- 기존 `content_for?(:wide_layout) ? 'max-w-4xl' : 'max-w-2xl'` 를 3-tier로 교체:
```erb
<%
width_map = { 'narrow' => 'max-w-2xl', 'wide' => 'max-w-6xl' }
container_width = width_map[content_for(:layout_width).presence] || 'max-w-4xl'
%>
```
- div에 `<%= container_width %>` 적용
## 작업 2: 기본 폭 뷰 정리 (중복 max-w-2xl 제거)
아래 11개 뷰에서 자체 `max-w-2xl mx-auto` 와 중복 `px-4 py-6` 제거 (레이아웃 기본 max-w-4xl 사용):
- qt/sessions/show.html.erb
- qt/sessions/edit.html.erb
- qt/sessions/members.html.erb
- qt/sessions/rankings.html.erb
- qt/sessions/shared_meditations.html.erb
- qt/themes/show.html.erb
- prayer_partners/search.html.erb
- prayer_partners/index.html.erb
- bible_highlights/index.html.erb
- group_qt_sessions/new.html.erb
- pages/home.html.erb (내부 max-w-2xl 섹션)
주의: 내부 spacing (space-y-6 등)은 유지, max-w와 mx-auto와 중복 px/py만 제거
첨부 이미지
이미지 추가 (Ctrl+V로 붙여넣기 또는 클릭)
JPEG, PNG, GIF, WebP / 최대 10MB
활동 로그
-
Llayout-dev 3-tier 시스템 + 기본 폭 정리 완료
2026년 03월 04일 03:55:30
상세 보기
## 변경 파일 (12개)
### 1단계: 3-tier 레이아웃 시스템
- `app/views/layouts/application.html.erb` — `content_for?(:wide_layout)` 이진 분기 → `content_for(:layout_width)` 3-tier 시스템 (narrow=max-w-2xl, default=max-w-4xl, wide=max-w-6xl)### 2단계: 기본 폭 뷰 정리 (10개)
- `app/views/qt/sessions/show.html.erb` — `max-w-2xl mx-auto px-4 py-6` 제거
- `app/views/qt/sessions/edit.html.erb` — 동일
- `app/views/qt/sessions/members.html.erb` — 동일
- `app/views/qt/sessions/rankings.html.erb` — 동일
- `app/views/qt/sessions/shared_meditations.html.erb` — 동일
- `app/views/qt/themes/show.html.erb` — 동일
- `app/views/prayer_partners/search.html.erb` — `max-w-2xl mx-auto` 제거
- `app/views/prayer_partners/index.html.erb` — `max-w-2xl mx-auto` 제거
- `app/views/bible_highlights/index.html.erb` — `max-w-2xl mx-auto px-4 py-6` 제거
- `app/views/group_qt_sessions/new.html.erb` — `max-w-2xl mx-auto px-4 py-6` 제거### 추가: 기존 wide_layout 호환
- `app/views/tongtok/index.html.erb` — `content_for(:wide_layout, true)` → `content_for(:layout_width, 'wide')` 교체### 미변경
- `app/views/pages/home.html.erb` — `layout "auth"` 사용하여 application 레이아웃과 무관## 테스트
- 679 runs, 1697 assertions, 0 failures, 0 errors -
Llayout-dev 상태 변경: 할 일 → 리뷰
2026년 03월 04일 03:55:20
-
Rrails-dev 3-tier 시스템 구축 시작
2026년 03월 04일 03:52:38