@su-record/vibe 2.8.45 → 2.8.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -68,9 +68,14 @@ component-index (/tmp/{feature}/component-index.json) 에서 매칭되는 컴포
|
|
|
68
68
|
children 없음 → 빈 div 또는 스킵
|
|
69
69
|
|
|
70
70
|
2. 배경 레이어 판별:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
BG 프레임 (name에 "BG"/"bg" 또는 부모와 동일 크기)
|
|
72
|
+
❌ <img> 태그로 배경 처리 금지
|
|
73
|
+
❌ position:absolute + inset:0 으로 이미지 배치 금지
|
|
74
|
+
✅ 부모 요소에 CSS background-image로 처리:
|
|
75
|
+
background-image: url('/images/{feature}/{section}-bg.png');
|
|
76
|
+
background-size: cover;
|
|
77
|
+
background-position: center top;
|
|
78
|
+
✅ BG 프레임은 HTML에 아무것도 렌더링하지 않음 (CSS만)
|
|
74
79
|
|
|
75
80
|
3. 반복 패턴 감지:
|
|
76
81
|
같은 부모 아래 동일 타입 + 유사 구조(children 수 동일) 노드 3개 이상
|
|
@@ -192,6 +197,27 @@ tree.json의 css 객체를 SCSS로 직접 변환한다. 추정하지 않는다.
|
|
|
192
197
|
|
|
193
198
|
## 2. 외부 SCSS 파일 구조
|
|
194
199
|
|
|
200
|
+
### _base.scss (필수 — 래퍼 컨테이너)
|
|
201
|
+
|
|
202
|
+
```scss
|
|
203
|
+
// 모바일 퍼스트: vw 단위가 PC에서 거대해지는 것을 방지
|
|
204
|
+
// designWidth(720px)를 max-width로 제한
|
|
205
|
+
|
|
206
|
+
.{feature} {
|
|
207
|
+
width: 100%;
|
|
208
|
+
max-width: 720px; // designWidth — PC에서 모바일 레이아웃 유지
|
|
209
|
+
margin: 0 auto; // 중앙 정렬
|
|
210
|
+
overflow-x: hidden;
|
|
211
|
+
|
|
212
|
+
// PC 브레이크포인트에서 max-width 확장 (PC 디자인이 있을 때)
|
|
213
|
+
@media (min-width: 1025px) {
|
|
214
|
+
max-width: 100%; // PC 디자인이 있으면 전체 너비
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
이 파일이 없으면 vw 단위가 PC 뷰포트에서 비례 확대되어 레이아웃이 깨진다.
|
|
220
|
+
|
|
195
221
|
### layout vs components 구분
|
|
196
222
|
|
|
197
223
|
```
|
|
@@ -319,10 +345,8 @@ $bp-desktop: 1024px;
|
|
|
319
345
|
-->
|
|
320
346
|
<template>
|
|
321
347
|
<section class="heroSection">
|
|
322
|
-
<!-- BG:
|
|
323
|
-
|
|
324
|
-
<img src="/images/{feature}/hero-bg.png" alt="" aria-hidden="true" />
|
|
325
|
-
</div>
|
|
348
|
+
<!-- BG: CSS background-image로 처리 (img 태그 아님!) -->
|
|
349
|
+
<!-- .heroSection { background-image: url('/images/{feature}/hero-bg.png'); background-size: cover; } -->
|
|
326
350
|
|
|
327
351
|
<!-- Title: flex-column, gap:24px → 직접 매핑 -->
|
|
328
352
|
<div class="heroTitle">
|
|
@@ -407,9 +431,10 @@ function handleShare(): void {
|
|
|
407
431
|
트리 노드의 속성으로 이미지 유형을 판별한다:
|
|
408
432
|
|
|
409
433
|
배경 이미지:
|
|
410
|
-
조건:
|
|
411
|
-
|
|
412
|
-
|
|
434
|
+
조건: BG 프레임 (name에 BG/bg 또는 부모와 크기 동일)
|
|
435
|
+
❌ <img> 태그 금지
|
|
436
|
+
✅ CSS background-image로만 처리:
|
|
437
|
+
부모 { background-image: url('...'); background-size: cover; }
|
|
413
438
|
|
|
414
439
|
콘텐츠 이미지:
|
|
415
440
|
조건: imageRef 있음 + 독립적 크기 + TEXT 형제 없음
|
|
@@ -20,10 +20,8 @@ tree.json 노드를 기반으로 컴포넌트를 생성할 때 이 템플릿을
|
|
|
20
20
|
-->
|
|
21
21
|
<template>
|
|
22
22
|
<section class="{{sectionName}}">
|
|
23
|
-
<!-- BG:
|
|
24
|
-
|
|
25
|
-
<img src="/images/{{FEATURE_KEY}}/{{bg-file}}.png" alt="" aria-hidden="true" />
|
|
26
|
-
</div>
|
|
23
|
+
<!-- BG: CSS background-image로 처리. img 태그 사용 금지! -->
|
|
24
|
+
<!-- SCSS: .{{sectionName}} { background-image: url('/images/{{FEATURE_KEY}}/{{bg-file}}.png'); background-size: cover; } -->
|
|
27
25
|
|
|
28
26
|
<!-- {{CHILD_1}}: tree flex-column, gap:{{GAP}}px → 직접 매핑 -->
|
|
29
27
|
<div class="{{sectionName}}__{{child1Name}}">
|
|
@@ -99,6 +99,11 @@ Bash:
|
|
|
99
99
|
```
|
|
100
100
|
각 섹션의 BG 프레임을 식별 → 합성된 배경 1장으로 렌더링:
|
|
101
101
|
|
|
102
|
+
⚠️ 주의: BG 프레임만 렌더링한다 (텍스트 포함된 상위 프레임 렌더링 금지)
|
|
103
|
+
❌ 섹션 전체를 렌더링 → 텍스트가 이미지에 포함 → HTML 텍스트와 중복
|
|
104
|
+
✅ BG 하위 프레임만 렌더링 → 텍스트 없는 배경만 → CSS background-image
|
|
105
|
+
✅ 텍스트는 tree.json에서 추출하여 HTML로 작성
|
|
106
|
+
|
|
102
107
|
BG 프레임 판별 기준:
|
|
103
108
|
- name에 "BG", "bg" 포함
|
|
104
109
|
- 또는 부모와 크기 동일(±10%) + 자식 이미지 3개 이상
|