[chore] site/mockup: 번들 갱신·문서 정리 · 2안(사진) 빌더 스크립트 추가
- vendor/ 옛 해시 번들을 retired/ 로 옮기고 새 해시로 교체 - build_photo6.py 신설 — /s/stay6 "2안(사진)" 판, 슬러그별로 다시 구울 수 있다 (python3 build_photo6.py <slug>) - build_pension.py·build_reading.py·build_stay6.py·patch_stay.py 정리 - AUTOPLAY.md·README.md·audit-all.mjs 갱신
This commit is contained in:
1 parent
a74f7918c6
commit
5e2def200b
68 files changed
+12247
-79
No files matched your search
@@ -39,9 +39,9 @@ PAGES = [
|
||||
# 군산 페이지에는 필요 없어서 주입 css 로 감춘다.
|
||||
("gunsan", "군산", {"hero", "festival", "local", "itinerary", "story",
|
||||
"songs", "people", "chronicle", "reading"},
|
||||
{"reviews", "postcard-maker", "location"}),
|
||||
{"reviews", "postcard-maker", "location", "hero"}),
|
||||
("booking", "예약·후기", {"hero", "info", "booking", "faq", "rules", "map"},
|
||||
{"postcard-maker"}),
|
||||
{"postcard-maker", "hero"}),
|
||||
]
|
||||
|
||||
# 화면 앵커 id → 그 섹션이 사는 페이지.
|
||||
@@ -55,8 +55,20 @@ ANCHOR_PAGE = {
|
||||
"info": "booking", "booking": "booking", "faq": "booking", "reviews": "booking",
|
||||
}
|
||||
|
||||
# 하위 페이지의 머리.
|
||||
# ★ 실물 대조(2026-09-18, 星のや京都 /dining/ · 모바일 390×844): 하위 페이지에는 히어로가
|
||||
# 없다. 얇은 헤더 → 여백 → **페이지 이름 한 줄(가운데·명조)** → 바로 내용이다.
|
||||
# 사진도 캐치프레이즈도 CTA 도 없다. 홈 히어로를 하위 페이지가 되풀이하는 판은 없었다.
|
||||
NAV_CSS = """
|
||||
[data-w4d-here] { font-weight: 800; text-decoration: underline; text-underline-offset: 5px; }
|
||||
.w4d-pagehead {
|
||||
padding: clamp(2.5rem, 9vw, 4.5rem) 1.25rem clamp(1.75rem, 6vw, 3rem);
|
||||
text-align: center;
|
||||
}
|
||||
.w4d-pagehead h1 {
|
||||
margin: 0; font-family: var(--font-serif, serif); font-weight: 400;
|
||||
font-size: clamp(1.75rem, 7vw, 2.4rem); letter-spacing: .04em; line-height: 1.3;
|
||||
}
|
||||
"""
|
||||
|
||||
# ★ HTML 을 고쳐도 소용없다 — 리액트가 하이드레이션하면서 헤더를 다시 그려 덮는다(실측).
|
||||
@@ -88,13 +100,31 @@ NAV_JS = """
|
||||
event.preventDefault();
|
||||
location.href = to;
|
||||
}, true);
|
||||
[0, 400, 1200, 3000].forEach(function (ms) { setTimeout(fix, ms); });
|
||||
window.addEventListener('pageshow', fix);
|
||||
var TITLE = %(title)s;
|
||||
function head() {
|
||||
if (!TITLE) return;
|
||||
var header = document.querySelector('#root header');
|
||||
if (!header || document.querySelector('.w4d-pagehead')) return;
|
||||
var band = document.createElement('div');
|
||||
band.className = 'w4d-pagehead';
|
||||
var h1 = document.createElement('h1');
|
||||
h1.textContent = TITLE;
|
||||
band.appendChild(h1);
|
||||
header.parentNode.insertBefore(band, header.nextSibling);
|
||||
}
|
||||
function tick() { fix(); head(); }
|
||||
[0, 400, 1200, 3000].forEach(function (ms) { setTimeout(tick, ms); });
|
||||
window.addEventListener('pageshow', tick);
|
||||
if (window.MutationObserver) {
|
||||
new MutationObserver(tick).observe(document.getElementById('root'), {childList: true, subtree: false});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
"""
|
||||
|
||||
# 하위 페이지는 히어로를 쓰지 않는다(위 실물 대조). 렌더러가 무조건 그리므로 여기서 감춘다.
|
||||
HIDE_CSS = {
|
||||
"hero": "#top { display: none !important; }",
|
||||
"reviews": "#reviews { display: none !important; }",
|
||||
"postcard-maker": "#postcard-maker { display: none !important; }",
|
||||
"location": "#location { display: none !important; }",
|
||||
@@ -129,11 +159,15 @@ def variant(payload, keep):
|
||||
return out
|
||||
|
||||
|
||||
PAGE_TITLE = {"": None, "gunsan": "군산", "booking": "이용안내 및 예약"}
|
||||
|
||||
|
||||
def nav_js(current):
|
||||
return NAV_JS % {
|
||||
"base": json.dumps(BASE),
|
||||
"here": json.dumps(current),
|
||||
"page": json.dumps(ANCHOR_PAGE, ensure_ascii=False),
|
||||
"title": json.dumps(PAGE_TITLE[current], ensure_ascii=False),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user