diff --git a/apps/site/design.md b/apps/site/design.md index fe35366..7ed32df 100644 --- a/apps/site/design.md +++ b/apps/site/design.md @@ -222,6 +222,34 @@ WebGL 게이트: `prefers-reduced-motion` 이면 **아예 시작하지 않는다 **실측 3층** (스크롤 1000 → 1600): 격자 **+14.9px** · 산출물 **-14px** · 단계명 **0**. 한 층은 반드시 고정이다. 전부 움직이면 기준이 없어 그냥 흔들리는 페이지가 된다. +### 배경 사진 (gpt-image-2 로 생성) + +CSS 그라디언트 광원만으로는 기준면이 약해서, 굴절과 그레인이 실제로 들어 있는 이미지를 넣었다. +Codex CLI 의 내장 `image_gen`(gpt-image-2)을 ChatGPT 구독 인증으로 호출해 만들었다 — 스톡 이미지가 아니다. + +프롬프트는 **이 페이지의 토큰 값을 그대로** 넣었다: + +- 바탕 `#0B0E12` — 순흑도 네이비도 아니게 +- 광원 **둘만**: 좌상단 딥 틸 `#4FD6C4`, 우하단 채도 낮은 파랑 `#3D7BD6`. + 보라·마젠타·바이올렛·무지개·따뜻한 색 **금지** (슬롭 지문) +- 프로스티드 글래스 판이 거의 옆에서 보이게 겹쳐, 가장자리만 얇게 빛나고 가운데는 거의 안 보이게 +- **대비를 아주 낮고 고르게** — "이 이미지는 흰 본문 텍스트 뒤에 깔린다. 활자와 경쟁할 만큼 + 밝은 곳이 있으면 안 된다. 중앙 띠는 조용하고 어둡게, 밝기는 모서리 쪽에" +- 미세 필름 그레인, 밴딩 없이 +- 금지: 사물·로고·글자·숫자·사람·렌즈 플레어·보케·딱딱한 도형·비네트 + +`components/BgPhoto.astro` 로 감쌌다. CSS `background-image` 가 아니라 `` 를 +절대배치한다 — background-image 로 깔면 **항상 받고 최적화도 안 된다.** +같은 이미지를 설치 섹션에서는 `flip` 으로 좌우 반전해 같은 그림으로 읽히지 않게 했다. + +| 크기 | 빌드 결과 (WebP) | +|---|---| +| 1920px | **26KB** | +| 1400px | 14KB | +| 860px | 7KB | + +추상 그라디언트라 압축이 잘 붙는다. 소스도 PNG 2MB 대신 **WebP 37KB** 로 두었다. + ## 그리드의 `wide` 트랙을 좁은 화면에서 닫는다 `--wide-pad: clamp(0rem, -3.7rem + 15.2vw, 10rem)` diff --git a/apps/site/src/assets/bg/bg-refraction.webp b/apps/site/src/assets/bg/bg-refraction.webp new file mode 100644 index 0000000..b48ccaa Binary files /dev/null and b/apps/site/src/assets/bg/bg-refraction.webp differ diff --git a/apps/site/src/components/BgPhoto.astro b/apps/site/src/components/BgPhoto.astro new file mode 100644 index 0000000..dfbad4a --- /dev/null +++ b/apps/site/src/components/BgPhoto.astro @@ -0,0 +1,74 @@ +--- +import { Image } from "astro:assets"; +import bgRefraction from "../assets/bg/bg-refraction.webp"; + +interface Props { + /** 0~1. 이 레이어는 본문 뒤에 깔리므로 기본값을 낮게 둔다 */ + opacity?: number; + /** 좌우 반전. 같은 이미지를 두 섹션에 쓸 때 같은 그림으로 안 읽히게 한다 */ + flip?: boolean; +} +const { opacity = 0.45, flip = false } = Astro.props; +--- + +{/* + 배경 사진 레이어. + + CSS 그라디언트로 만든 광원과 달리 굴절·그레인·빛의 감쇠가 실제로 들어 있어 + 패럴랙스의 기준면으로 훨씬 잘 읽힌다. 대신 무게가 있으므로 규칙이 붙는다. + + - `loading="lazy"` — 초기 번들에 들어가지 않는다. CSS background-image 로 깔면 + 이 통제권을 잃는다(항상 받고, 최적화도 안 된다). 그래서 를 절대배치한다 + - `aria-hidden` + 빈 alt — 장식이다. 보조기술이 읽을 것이 없다 + - opacity 기본 0.45 — 본문 대비를 지키는 선. 올리려면 그 위 글자를 다시 재라 +*/} + + + diff --git a/apps/site/src/components/Install.astro b/apps/site/src/components/Install.astro index 5568e42..49f943d 100644 --- a/apps/site/src/components/Install.astro +++ b/apps/site/src/components/Install.astro @@ -1,5 +1,6 @@ --- import CopyCommand from "./CopyCommand.astro"; +import BgPhoto from "./BgPhoto.astro"; import type { Content } from "../i18n/content"; interface Props { c: Content["install"]; ui: Content["ui"]; } @@ -7,7 +8,8 @@ const { c, ui } = Astro.props; --- -
+
+

{c.h2}

diff --git a/apps/site/src/components/Materials.astro b/apps/site/src/components/Materials.astro index e4d902d..9294d40 100644 --- a/apps/site/src/components/Materials.astro +++ b/apps/site/src/components/Materials.astro @@ -1,4 +1,5 @@ --- +import BgPhoto from "./BgPhoto.astro"; import type { Content } from "../i18n/content"; interface Props { c: Content["materials"]; } @@ -10,7 +11,8 @@ const { c } = Astro.props; 배경은 three.js 셰이더 플레인, 전경은 SVG 필터를 실제로 먹인 타일 3장. 둘 다 설명이 아니라 지금 이 화면에서 돌고 있는 것이다. */} -
+
+

{c.h2}

{c.lead}

diff --git a/apps/site/src/styles/base.css b/apps/site/src/styles/base.css index af00702..87b8326 100644 --- a/apps/site/src/styles/base.css +++ b/apps/site/src/styles/base.css @@ -422,7 +422,8 @@ a:hover { color: var(--accent); } 그래서 배경을 깐다. 다만 사 온 이미지가 아니라 이 페이지가 주장하는 것, 곧 간격 눈금 자체를 격자로 그린다. --grid-cell 은 --space-5 다. */ .bg-grid, -.bg-glow { +.bg-glow, +.has-bg { position: relative; isolation: isolate; }