すき間なく並ぶ 5:4 の事例写真の壁と、乗ると降りる黒い幕・種類で絞る文字のタブ
ar-works-tiles ・ v1.0.0 ・ 写真 ・ 2 節 ・ 吸収元:青景建築設計室(7202f23)
建築事例の一覧。5:4 の写真のタイルを、幅 90.5%・3 列・すき間なしの壁に並べる(境目の髪の毛ほどの線を消すため、右と下へ 1px ずつ重ねる)。768〜1023px は 2 列、767px 以下は「幅いっぱいの 1 枚 → 2 枚並び」のくり返し。マウスが乗ると(またはフォーカスで)黒 40% の幕が 0.28 秒で降り、名前と種類が 6px 下から 0.4/0.45 秒で上がり、写真は 0.6 秒で 1.03 倍。ホバーのない端末と 767px 以下は幕を出さず、写真の下端に名前の札を常に出す。上の種類のテキストのタブ(下線が左から引かれる)で絞り込むと、壁が 0.18 秒で消え、0.18 秒後に並べ直して 0.3 秒で戻る。絞った後も写真はすき間なく並び、余った写真は中央へ寄せる(6 つ割り)。見出し・導入・タブ・写真は画面に入ると下から 0.55/0.75 秒で現れ、行の中は 80ms ずつずれる。
ライブデモは APPROVED の版から写したコード(library/images/ar-works-tiles/src)をこの場で動かしている。動き:オフは見本の決まり(html.reduced)で止めた形。
記録
吸収元との比較
一致 (止めた状態 1% 以下・動きの各コマ 3% 以下・誤りなし)
| 幅 | 止めた状態の差 | 動きのコマ(時刻:差) | やり直し |
|---|---|---|---|
| 390px | 0.00% | 0ms 0.00% / 200ms 0.00% / 450ms 0.00% / 700ms 0.00% / 1000ms 0.00% / 1080ms 0.00% / 1150ms 0.00% / 1250ms 0.00% / 1400ms 0.00% / 1700ms 0.00% / 2200ms 0.00% / 2280ms 0.00% / 2400ms 0.00% / 2600ms 0.00% / 3000ms 0.00% | 0 |
| 1440px | 0.00% | 0ms 0.00% / 200ms 0.00% / 450ms 0.00% / 700ms 0.00% / 1000ms 0.00% / 1080ms 0.00% / 1150ms 0.00% / 1250ms 0.00% / 1400ms 1.33% / 1700ms 0.00% / 2200ms 0.00% / 2280ms 0.00% / 2400ms 0.00% / 2600ms 0.00% / 3000ms 0.00% | 0 |
比べた日時 2026-12-05 08:33(UTC)。吸収元 /shindan/mihon/arch/projects と LAB のデモを、節を同じ高さに置き、時計を止めて同じ時刻に撮った。文字は両方ともグレーの描き方。
出所
- 見本
- 青景建築設計室 APPROVED
- 版
- 7202f2341d9d908e05296dff438a653d0cb4111c
- ページ
- /shindan/mihon/arch/projects
- 写した要素
- .ar-pj-top || .ar-pj-wall
- 元のファイル
- src/scripts/shindan/mihon/arch-projects.ts(一覧の絞り込みと並べ直しの節。詳細のギャラリーの節は要素がないので何もしない)
- src/scripts/shindan/mihon/arch.ts・arch-pages.ts(arch-projects.ts を読む入口。ヘッダー・パネル・スライダーなどは要素がないので何もしない)
- src/scripts/shindan/mihon-runtime.ts・src/data/shindan/mihon.ts(見本の共通の器。[data-in] の現れる動き。吸収元の版の書き出しから写した共有のモジュール)
- src/styles/mihon/arch.css
- src/styles/mihon/arch-pages.css
- src/styles/mihon/arch-projects.css
- src/styles/mihon/_base.css
- src/pages/shindan/mihon/arch/projects/index.astro(マークアップはサーバーの HTML から)
- src/layouts/Arch.astro・Mihon.astro(字体とスクリプトの読み込みの順)
- 指示書
- prompts/arch.md
- 写したモジュール
- 吸収元と同じ中身(blob で照合)
権利と書き出し
- コード
- 便利DEネットの自社制作(見本サイトのために書いたコード。ライブラリは使わない)
- 字体
- OFL(fontsource のパッケージから読む。字体ファイルは持ち込まない)
- 素材
- 架空の設計事務所の見本のために、ローカルの ComfyUI(Z-Image Turbo)で生成した建築写真 12 枚(各 640・1280・1872w の webp)。実在の建物・実績ではない
- 参考
- 参考サイト (参考サイト))。この版は指示書「高精度再現マスタープロンプト」で、参考サイトの構成を高い精度で再現したもの(事業者が「(公開版では省略)」と言った版)。参考の写真・文章・字体・コードは持ち込んでいない
- 書き出し
- code-restyle(コード 可・素材 不可・文 不可)
- 写真・事例の名前と種類・題名と導入文・タブの種類と件数は案件のものに差し替える(見本の写真は架空の事務所のための生成画像、事例はすべて架空)
- この版は参考サイトの構成をそのまま再現した版なので、壁の幅と列・5:4・幕の濃さ・タブの形は案件のアートディレクションで決め直す(すき間なく並べ直す仕組み・絞り込みの手順・ホバーとタッチの出し分け・現れる動きの扱いだけを使う)
- mihon-runtime.ts は見本の共通の器(雰囲気の切り替え・デモの安全も含む)。案件では [data-in] の現れる動きだけを持ち出し、残りは使わない
変えてよいところ
- 事例の写真と名前:markup の li.ar-pj-grid__it ごとに data-kind(絞り込みの種類)・写真・.ar-tile__ov の名前と種類・.ar-pj-tile__lb の名前・a の aria-label。li の data-m(f=スマホで幅いっぱい/h=半分)と --i(行の中の順番)は最初の並びの値で、絞り込みのたびに arch-projects.ts が付け直す
- 種類のタブ:.ar-pj-filter の a[data-ar-pj-kind](空=すべて)と data-label・件数。href は ?kind= の道(JS がないときもその道で開ける)
- 写真の形:.ar-pj-tile .ar-tile__ph の aspect-ratio: 5 / 4
- 列の数と幅:.ar-pj-grid の repeat(3, …)(絞り込みは 6 つ割り)、768〜1023px の 2 列(4 つ割り)、.ar-wide の 90.5%(767px 以下は 100% − 24px)
- 幕と札:.ar-pj-tile .ar-tile__ov の rgba(0,0,0,.4)・名前 17px、.ar-pj-tile__lb の rgba(24,24,22,.58)
- 色・字体:html[data-mihon='arch'] の --ar-*(--ar-font・--ar-head-font・--ar-ease・--ar-muted・--ar-text)
変えてはいけないところ
- 写真どうしはすき間なく並べる(gap 0、右と下へ 1px ずつ重ねて境目の線を消す)。角丸・影は付けない
- 絞り込んでもすき間を出さない:見えている写真だけで並べ直し、3 列で余った 1・2 枚は中央へ(6 つ割りの grid-column)。768〜1023px は 2 列で余り 1 枚を中央へ。767px 以下は「1 枚 → 2 枚並び」をくり返し、最後に半分が 1 枚だけ余るときは幅いっぱい
- 絞り込みは、壁を 0.18 秒で消してから並べ直し、0.3 秒で戻す(並びが飛ぶところを見せない)。URL の ?kind= を書き換え(履歴は増やさない)、読み込み時はそれに合わせる
- マウスが乗る・フォーカスで、黒 40% の幕が 0.28 秒で降り、名前と種類が 6px 下から 0.4/0.45 秒(cubic-bezier(.22,1,.36,1))、写真は 0.6 秒で 1.03 倍
- ホバーのない端末と 767px 以下は幕を出さず、写真の下端の名前の札を常に出す(ホバーだけに頼らない)
- 現れる動きは画面の下 8% の線を越えたら 1 度だけ:見出し・文は 10px 下から 0.55 秒、写真は 8px 下から 0.75 秒、行の中で 80ms ずつずらす
組み合わせ・品質
- 業種
- 建築・設計・建設・住宅・リフォーム・企業・ホテル
- AD
- ad-arch
- 合う
- 写真が主役の実績・事例・作品の一覧ページ/詳細のページへつなぐ入口の一覧
- 避ける
- 写真の中に文字が入った素材(幕の名前と重なる)/縦横の比がばらばらの写真(5:4 に切り抜くので主題が切れる)/種類が 8 つを超えるタブ(スマホで 3 つずつの段が増える)
- 注意
- html・body・* に効く初期化の規則(_base.css)と、html[data-mihon='arch'] に置いた変数を含む。mihon-runtime.ts は document 全体の [data-in]・[data-sec]・外へのリンクを扱うので、ほかの技術と 1 枚のページに組むときは iframe で分けるか、現れる動きだけを持ち出す
- 依存
- @fontsource-variable/noto-sans-jp 5.3.1
- 速さ
- 写真 12 枚 × 640・1280・1872w の webp(srcset。sizes は PC 31vw、768〜1023px 46vw、スマホは 1 枚目の型が 100vw − 24px・半分の型が 50vw)。最初の 3 枚だけ eager・fetchpriority high・decoding sync、ほかは lazy/CSS の opacity・transform の transition だけ。JS は class と data-* を付け替えるだけで、毎コマの計算はしない/素材のファイルの合計はレジストリの files を参照
- レスポンシブ
- 1023px(768〜1023px は 2 列)/767px(1 枚 → 2 枚並びのくり返し・名前の札を常に・幕なし・タブを 3 つずつ 2 段)/(hover: none)(幕なし・名前の札を常に)
- アクセシビリティ
- 一覧は ul(aria-label=建築事例の一覧)。タイルは a で、aria-label に「名前(種類)」。幕と札は aria-hidden。タブは role=group(aria-label=事例の種類で絞り込む)のリンクで、選んだものに aria-current/利用者が絞り込んだときだけ、aria-live=polite で「住宅の事例を 8 件表示しています」/タイルは :focus-visible で白い 2px の線(内側 8px)と幕を出す。タブは .ar :focus-visible(2px・--ar-accent)/タブはリンクなので Tab と Enter で選べる(JS がないときは ?kind= の道へ移る)
- 動きを減らす
- この版(7202f23)では、器 mihon-runtime.ts が localStorage の bdn-motion=off、または OS の「動きを減らす」で html.reduced を付ける(ソースで確かめた。のちの版の「動き:オフのときだけ止める」の決まり(2026-11-30)より前の版)。LAB のデモは ?motion=off で html.reduced を付ける/現れる動きはなし(はじめから見せる)。絞り込みは消さずにその場で並べ直す。幕・写真の拡大・タブの下線は移り変わりなし(html.reduced .ar * の transition 0.01ms・animation なし)
- 素材
- 36 ファイル(案件には書き出さない)
ソース
/**
* 技術 ar-works-tiles の入口(ライブデモ・案件の組み立てから mount を呼ぶ)
* 吸収元:青景建築設計室(APPROVED 7202f23)の /shindan/mihon/arch/projects。器 layouts/Arch.astro と Mihon.astro が読むスクリプトを、
* 吸収元のページと同じ順で読む(吸収元の HTML では Arch.astro の script → Mihon.astro の script の順)。
* 1. js/mihon/arch.ts(arch-pages.ts・arch-projects.ts を読む)… 種類のタブでの絞り込みと、すき間なく並べ直す(arch-projects.ts の一覧の節)
* ヘッダー・メニュー・お問い合わせのパネル・スライダー・動画・詳細のギャラリーは、該当の要素がないので何もしない
* 2. js/mihon-runtime.ts(見本の共通の器。data/shindan/mihon.ts を読む)… [data-in] が画面に入ると .is-in(写真のタイルと見出しの現れる動き)
* 雰囲気・節の切り替え(この部品に [data-sec] はない)、題名、デモの安全(外へのリンク・送信を止めて知らせる)も同じく動く
* 写したモジュール(js/・../data/)は書き換えていない。
*/
// 器(Arch.astro)は Zen Old Mincho も読むが、それは別の雰囲気(data-taste=luxe)の見出しの字体で、
// この版の既定の雰囲気(modern)の見出しは Noto Sans JP。LAB にも入っていないので読まない(ar-hero-crossfade と同じ)
import '@fontsource-variable/noto-sans-jp';
import './style.css';
import './js/mihon/arch';
import './js/mihon-runtime';
export const id = 'ar-works-tiles';
/**
* 吸収元は、ページの読み込み直しで片付ける作りで、arch.ts・mihon-runtime.ts は読み込んだ時点で動き出し、後片付けの手段(関数・止める口)を持たない。
* タブのクリック・IntersectionObserver・document の受け口・通知の要素(p.mh-toast)は、ページを移るまで残る。
* ここで返す関数は何もしない(写したモジュールに手を入れずに止める方法がないため。README に書いた)。
*/
export function mount(): () => void {
return () => {};
}
<main id="ar-main" class="ar-main">
<section class="ar-pj-top" aria-labelledby="ar-pj-t"><div class="ar-c"><div class="ar-head ar-head--h1" data-in=""><h1 class="ar-head__t" id="ar-pj-t">建築事例</h1><svg class="ar-head__line" viewBox="0 0 112 6" aria-hidden="true" focusable="false"><path d="M1 4.6 Q56 0.4 111 4.6"></path></svg></div><div class="ar-pj-top__txt" data-in=""><p>住まい、店舗やオフィス、古い家の改修まで。敷地の条件とご要望から、どのように考えて設計したのかを、写真と文章でご紹介します。</p><p class="ar-pj-top__note">掲載している事例は、すべて架空の制作サンプルです。</p></div><div class="ar-pj-filter" role="group" aria-label="事例の種類で絞り込む" data-in="" style="--i:1"><a href="/shindan/mihon/arch/projects" data-ar-pj-kind="" aria-current="true">すべて<span class="ar-pj-filter__n">12</span></a><a href="/shindan/mihon/arch/projects?kind=house" data-ar-pj-kind="house" data-label="住宅">住宅<span class="ar-pj-filter__n">8</span></a><a href="/shindan/mihon/arch/projects?kind=renovation" data-ar-pj-kind="renovation" data-label="改修">改修<span class="ar-pj-filter__n">1</span></a><a href="/shindan/mihon/arch/projects?kind=commercial" data-ar-pj-kind="commercial" data-label="商業施設">商業施設<span class="ar-pj-filter__n">1</span></a><a href="/shindan/mihon/arch/projects?kind=villa" data-ar-pj-kind="villa" data-label="別荘">別荘<span class="ar-pj-filter__n">1</span></a><a href="/shindan/mihon/arch/projects?kind=office" data-ar-pj-kind="office" data-label="オフィス">オフィス<span class="ar-pj-filter__n">1</span></a></div></div></section>
<div class="ar-pj-wall"><ul class="ar-pj-grid ar-wide" data-ar-pj-grid="" aria-label="建築事例の一覧"><li class="ar-pj-grid__it" data-kind="house" data-m="f" data-in="photo" style="--i:0"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/forest-house" style="--r: 5 / 4" aria-label="森にひらく平屋(住宅・新築/木造平屋)"><div class="ar-tile__ph"><img src="{{asset:forest-a-1280.webp}}" srcset="{{asset:forest-a-640.webp}} 640w, {{asset:forest-a-1280.webp}} 1280w, {{asset:forest-a-1872.webp}} 1872w" sizes="(max-width: 767px) calc(100vw - 24px), (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="eager" decoding="sync" fetchpriority="high"></div><span class="ar-tile__ov" aria-hidden="true"><b>森にひらく平屋</b><span>住宅・新築/木造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">森にひらく平屋</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="h" data-in="photo" style="--i:1"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/stone-house" style="--r: 5 / 4" aria-label="石とガラスの住まい(住宅・新築/鉄筋コンクリート造)"><div class="ar-tile__ph"><img src="{{asset:stone-a-1280.webp}}" srcset="{{asset:stone-a-640.webp}} 640w, {{asset:stone-a-1280.webp}} 1280w, {{asset:stone-a-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="eager" decoding="sync" fetchpriority="high"></div><span class="ar-tile__ov" aria-hidden="true"><b>石とガラスの住まい</b><span>住宅・新築/鉄筋コンクリート造</span></span><span class="ar-pj-tile__lb" aria-hidden="true">石とガラスの住まい</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="h" data-in="photo" style="--i:2"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/courtyard-house" style="--r: 5 / 4" aria-label="光を取り込む中庭住宅(住宅・新築/木造 2 階建て)"><div class="ar-tile__ph"><img src="{{asset:courtyard-a-1280.webp}}" srcset="{{asset:courtyard-a-640.webp}} 640w, {{asset:courtyard-a-1280.webp}} 1280w, {{asset:courtyard-a-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="eager" decoding="sync" fetchpriority="high"></div><span class="ar-tile__ov" aria-hidden="true"><b>光を取り込む中庭住宅</b><span>住宅・新築/木造 2 階建て</span></span><span class="ar-pj-tile__lb" aria-hidden="true">光を取り込む中庭住宅</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="f" data-in="photo" style="--i:0"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/beach-house" style="--r: 5 / 4" aria-label="海辺の家(住宅・新築/木造平屋)"><div class="ar-tile__ph"><img src="{{asset:beach-a-1280.webp}}" srcset="{{asset:beach-a-640.webp}} 640w, {{asset:beach-a-1280.webp}} 1280w, {{asset:beach-a-1872.webp}} 1872w" sizes="(max-width: 767px) calc(100vw - 24px), (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>海辺の家</b><span>住宅・新築/木造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">海辺の家</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="h" data-in="photo" style="--i:1"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/mountain-house" style="--r: 5 / 4" aria-label="山並みを望む住宅(住宅・新築/木造平屋)"><div class="ar-tile__ph"><img src="{{asset:mountain-a-1280.webp}}" srcset="{{asset:mountain-a-640.webp}} 640w, {{asset:mountain-a-1280.webp}} 1280w, {{asset:mountain-a-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>山並みを望む住宅</b><span>住宅・新築/木造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">山並みを望む住宅</span></a></li><li class="ar-pj-grid__it" data-kind="renovation" data-m="h" data-in="photo" style="--i:2"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/wood-renovation" style="--r: 5 / 4" aria-label="木の温もりを感じる改修住宅(改修/築 80 年ほどの木造住宅)"><div class="ar-tile__ph"><img src="{{asset:reno-b-1280.webp}}" srcset="{{asset:reno-b-640.webp}} 640w, {{asset:reno-b-1280.webp}} 1280w, {{asset:reno-b-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>木の温もりを感じる改修住宅</b><span>改修/築 80 年ほどの木造住宅</span></span><span class="ar-pj-tile__lb" aria-hidden="true">木の温もりを感じる改修住宅</span></a></li><li class="ar-pj-grid__it" data-kind="commercial" data-m="f" data-in="photo" style="--i:0"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/corner-building" style="--r: 5 / 4" aria-label="街角の商業施設(商業施設/鉄骨造 3 階建て)"><div class="ar-tile__ph"><img src="{{asset:corner-a-1280.webp}}" srcset="{{asset:corner-a-640.webp}} 640w, {{asset:corner-a-1280.webp}} 1280w, {{asset:corner-a-1872.webp}} 1872w" sizes="(max-width: 767px) calc(100vw - 24px), (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>街角の商業施設</b><span>商業施設/鉄骨造 3 階建て</span></span><span class="ar-pj-tile__lb" aria-hidden="true">街角の商業施設</span></a></li><li class="ar-pj-grid__it" data-kind="villa" data-m="h" data-in="photo" style="--i:1"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/lakeside-villa" style="--r: 5 / 4" aria-label="風景とつながる別荘(別荘/木造平屋)"><div class="ar-tile__ph"><img src="{{asset:villa-c-1280.webp}}" srcset="{{asset:villa-c-640.webp}} 640w, {{asset:villa-c-1280.webp}} 1280w, {{asset:villa-c-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>風景とつながる別荘</b><span>別荘/木造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">風景とつながる別荘</span></a></li><li class="ar-pj-grid__it" data-kind="office" data-m="h" data-in="photo" style="--i:2"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/green-office" style="--r: 5 / 4" aria-label="緑に囲まれたオフィス(オフィス/木造 4 階建て)"><div class="ar-tile__ph"><img src="{{asset:office-a-1280.webp}}" srcset="{{asset:office-a-640.webp}} 640w, {{asset:office-a-1280.webp}} 1280w, {{asset:office-a-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>緑に囲まれたオフィス</b><span>オフィス/木造 4 階建て</span></span><span class="ar-pj-tile__lb" aria-hidden="true">緑に囲まれたオフィス</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="f" data-in="photo" style="--i:0"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/slope-house" style="--r: 5 / 4" aria-label="傾斜地の住まい(住宅・新築/混構造 2 階建て)"><div class="ar-tile__ph"><img src="{{asset:slope-a-1280.webp}}" srcset="{{asset:slope-a-640.webp}} 640w, {{asset:slope-a-1280.webp}} 1280w, {{asset:slope-a-1872.webp}} 1872w" sizes="(max-width: 767px) calc(100vw - 24px), (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>傾斜地の住まい</b><span>住宅・新築/混構造 2 階建て</span></span><span class="ar-pj-tile__lb" aria-hidden="true">傾斜地の住まい</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="h" data-in="photo" style="--i:1"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/engawa-house" style="--r: 5 / 4" aria-label="伝統と現代が調和する住宅(住宅・新築/木造平屋)"><div class="ar-tile__ph"><img src="{{asset:tradition-a-1280.webp}}" srcset="{{asset:tradition-a-640.webp}} 640w, {{asset:tradition-a-1280.webp}} 1280w, {{asset:tradition-a-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>伝統と現代が調和する住宅</b><span>住宅・新築/木造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">伝統と現代が調和する住宅</span></a></li><li class="ar-pj-grid__it" data-kind="house" data-m="h" data-in="photo" style="--i:2"><a class="ar-tile ar-pj-tile" href="/shindan/mihon/arch/projects/quiet-house" style="--r: 5 / 4" aria-label="静かな時間を過ごす住まい(住宅・新築/鉄筋コンクリート造平屋)"><div class="ar-tile__ph"><img src="{{asset:quiet-b-1280.webp}}" srcset="{{asset:quiet-b-640.webp}} 640w, {{asset:quiet-b-1280.webp}} 1280w, {{asset:quiet-b-1872.webp}} 1872w" sizes="(max-width: 767px) 50vw, (max-width: 1023px) 46vw, 31vw" width="1872" height="1248" alt="" loading="lazy" decoding="async"></div><span class="ar-tile__ov" aria-hidden="true"><b>静かな時間を過ごす住まい</b><span>住宅・新築/鉄筋コンクリート造平屋</span></span><span class="ar-pj-tile__lb" aria-hidden="true">静かな時間を過ごす住まい</span></a></li></ul><p class="ar-vh" aria-live="polite" data-ar-pj-live=""></p></div>
</main>
/* 青景建築設計室(7202f23)/shindan/mihon/arch/projects の .ar-pj-top || .ar-pj-wall に当たる規則を、吸収元のページの CSSOM で選び、元のスタイルの原文のまま写したもの。書き換えない。 */
/* --- src/styles/mihon/arch.css */
html[data-mihon='arch'] {
--ar-bg: #fdfdfb;
--ar-surface: #f0f1ed;
--ar-text: #353732;
--ar-body: #555850;
--ar-muted: #73776f;
--ar-border: #dedfd9;
--ar-line: #b5b5b0;
--ar-accent: #b51d31;
--ar-accent-h: #c8283d;
--ar-dark: #303034;
--ar-footer: #1e1e1e;
--ar-content: 940px;
--ar-wide: 90.5%;
--ar-sec: 100px;
--ar-sec-l: 140px;
--ar-hh: 84px;
--ar-strip: 29px;
--ar-ease: cubic-bezier(0.22, 1, 0.36, 1);
--ar-font: 'Noto Sans JP Variable', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', 'Yu Gothic', sans-serif;
--ar-head-font: var(--ar-font);
--ar-head-w: 500;
background: var(--ar-bg);
scrollbar-gutter: stable;
}
html[data-mihon='arch'][data-taste='luxe'] {
--ar-bg: #fbfaf7;
--ar-surface: #efede8;
--ar-text: #34312c;
--ar-body: #57534c;
--ar-border: #e2dfd8;
--ar-accent: #7a3b2a;
--ar-accent-h: #8e4a37;
--ar-dark: #2f2c29;
--ar-footer: #1d1b19;
--ar-head-font: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}
html[data-mihon='arch'][data-taste='trust'] {
--ar-bg: #fcfcfc;
--ar-surface: #eef0f2;
--ar-text: #2f343a;
--ar-body: #50565d;
--ar-muted: #6c737b;
--ar-border: #dde1e5;
--ar-accent: #1d3e66;
--ar-accent-h: #285184;
--ar-dark: #2b3036;
--ar-footer: #1b1e22;
}
@media (max-width: 767px) {
html[data-mihon='arch'] { --ar-hh: 64px; --ar-sec: 72px; --ar-sec-l: 96px; --ar-strip: 48px; }
}
@media (max-width: 420px) {
html[data-mihon='arch'] { --ar-strip: 48px; }
}
body.ar {
background: var(--ar-bg);
color: var(--ar-text);
font-family: var(--ar-font);
font-size: 15px;
line-height: 1.95;
letter-spacing: 0.02em;
font-weight: 400;
word-break: normal;
line-break: strict;
}
:where(.ar) p { color: var(--ar-body); }
:where(.ar) a { text-decoration: none; }
.ar ::selection { background: color-mix(in srgb, var(--ar-accent) 22%, transparent); }
.ar :focus-visible { outline: 2px solid var(--ar-accent); outline-offset: 3px; }
.ar-main { display: block; outline: none; }
.ar-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ar-c { width: min(var(--ar-content), calc(100% - 48px)); margin-inline: auto; }
.ar-wide { width: var(--ar-wide); margin-inline: auto; }
@media (max-width: 767px) {
.ar-c { width: calc(100% - 40px); }
.ar-wide { width: calc(100% - 24px); }
}
.ar-head { text-align: center; margin-bottom: 44px; }
.ar-head__t { margin: 0; font-family: var(--ar-head-font); font-weight: var(--ar-head-w); color: var(--ar-text); letter-spacing: 0.06em; line-height: 1.5; font-feature-settings: 'palt' 1; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.ar-head--h1 .ar-head__t { font-size: clamp(25px, 1.5vw + 13px, 31px); }
.ar-head__line { display: block; width: 112px; height: 6px; margin: 20px auto 0; overflow: visible; }
.ar-head__line path { fill: none; stroke: var(--ar-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ar img { border-radius: 0; }
.ar-tile { position: relative; display: block; overflow: hidden; color: #fff; }
.ar-tile__ph { aspect-ratio: var(--r, 1 / 1); background: var(--ar-surface); }
.ar-tile__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ar-ease); }
.ar-tile__ov { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; background: rgba(0, 0, 0, 0.4); text-align: center; opacity: 0; transition: opacity 0.28s ease; }
.ar-tile__ov b { font-size: 16px; font-weight: 500; letter-spacing: 0.08em; line-height: 1.5; transform: translateY(6px); transition: transform 0.4s var(--ar-ease); }
.ar-tile__ov span { font-size: 12.5px; letter-spacing: 0.06em; opacity: 0.85; transform: translateY(6px); transition: transform 0.45s var(--ar-ease); }
@media (hover: hover) {
.ar-tile:hover .ar-tile__ov, .ar-tile:focus-visible .ar-tile__ov { opacity: 1; }
.ar-tile:hover .ar-tile__ov b, .ar-tile:hover .ar-tile__ov span, .ar-tile:focus-visible .ar-tile__ov b, .ar-tile:focus-visible .ar-tile__ov span { transform: none; }
.ar-tile:hover .ar-tile__ph img { transform: scale(1.03); }
}
@media (hover: none), (max-width: 767px) {
.ar-tile__ov { display: none; }
}
html.ar-drawer-open { overflow: hidden; }
html.js:not(.reduced) .ar [data-in] { opacity: 0; transform: translateY(10px); transition: opacity 0.55s var(--ar-ease), transform 0.55s var(--ar-ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js:not(.reduced) .ar [data-in='photo'] { transform: translateY(8px); transition-duration: 0.75s; }
html.js:not(.reduced) .ar [data-in].is-in { opacity: 1; transform: none; }
html.reduced .ar *, html.reduced .ar *::before, html.reduced .ar *::after { animation: none !important; transition-duration: 0.01ms !important; }
/* --- src/styles/mihon/arch-pages.css */
.ar-main [id] { scroll-margin-top: calc(var(--ar-hh) + 24px); }
/* --- src/styles/mihon/arch-projects.css */
.ar-pj-top { padding-block: clamp(64px, 6vw, 96px) 44px; }
.ar-pj-top .ar-head { margin-bottom: 30px; }
.ar-pj-top__txt { max-width: 640px; margin: 0 auto; text-align: center; }
.ar-pj-top__txt p { font-size: 15px; line-height: 1.95; word-break: auto-phrase; text-wrap: balance; }
p.ar-pj-top__note { margin-top: 10px; font-size: 13px; line-height: 1.8; color: var(--ar-muted); letter-spacing: 0.04em; }
.ar-pj-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; margin-top: 36px; }
.ar-pj-filter a { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 10px 0 12px; color: var(--ar-muted); font-size: 14px; letter-spacing: 0.06em; line-height: 1.6; min-height: 44px; transition: color 0.25s ease; }
.ar-pj-filter__n { font-size: 11.5px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; opacity: 0.8; }
.ar-pj-filter a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ar-ease); }
.ar-pj-filter a[aria-current] { color: var(--ar-text); }
.ar-pj-filter a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) {
.ar-pj-filter a:hover { color: var(--ar-text); }
.ar-pj-filter a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.ar-pj-wall { padding-bottom: var(--ar-sec-l); }
.ar-pj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; transition: opacity 0.3s ease; }
.ar-pj-grid.is-out { opacity: 0; transition-duration: 0.18s; }
.ar-pj-grid__it { min-width: 0; margin: 0 -1px -1px 0; }
.ar-pj-tile { height: 100%; }
.ar-pj-tile .ar-tile__ph { aspect-ratio: 5 / 4; }
.ar-pj-tile .ar-tile__ov { background: rgba(0, 0, 0, 0.4); transition: opacity 0.28s ease; }
.ar-pj-tile .ar-tile__ov b { font-size: 17px; }
.ar-pj-grid .ar-pj-tile:focus-visible { outline: 2px solid #fff; outline-offset: -8px; }
.ar-pj-grid .ar-pj-tile:focus-visible .ar-tile__ov { opacity: 1; }
.ar-pj-tile__lb { display: none; position: absolute; left: 0; bottom: 0; z-index: 1; max-width: 100%; padding: 5px 10px 6px; background: rgba(24, 24, 22, 0.58); color: #fff; font-size: 12.5px; font-weight: 500; letter-spacing: 0.05em; line-height: 1.5; }
@media (hover: none), (max-width: 767px) {
.ar-pj-tile__lb { display: block; }
}
.ar-pj-grid[data-filtered] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ar-pj-grid[data-filtered] > .ar-pj-grid__it { grid-column: span 2; }
.ar-pj-grid[data-filtered] > [data-c3='1'] { grid-column: 3 / span 2; }
.ar-pj-grid[data-filtered] > [data-c3='2'] { grid-column: 2 / span 2; }
@media (min-width: 768px) and (max-width: 1023px) {
.ar-pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ar-pj-grid[data-filtered] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ar-pj-grid[data-filtered] > .ar-pj-grid__it, .ar-pj-grid[data-filtered] > [data-c3] { grid-column: span 2; }
.ar-pj-grid[data-filtered] > [data-c2] { grid-column: 2 / span 2; }
}
@media (max-width: 767px) {
.ar-pj-top { padding-block: 56px 28px; }
.ar-pj-filter { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; justify-items: start; gap: 0 30px; margin-top: 24px; }
.ar-pj-grid, .ar-pj-grid[data-filtered] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ar-pj-grid > .ar-pj-grid__it, .ar-pj-grid[data-filtered] > .ar-pj-grid__it, .ar-pj-grid[data-filtered] > [data-c3], .ar-pj-grid[data-filtered] > [data-c2] { grid-column: auto; }
.ar-pj-grid > [data-m='f'], .ar-pj-grid[data-filtered] > [data-m='f'] { grid-column: 1 / -1; }
.ar-pj-grid > [data-m='h'] .ar-pj-tile__lb { padding: 4px 8px 5px; font-size: 11.5px; letter-spacing: 0.03em; }
}
p.ar-pj-art__note, p.ar-pj-gal__cap, .ar-pj-fig__cap, p.ar-pj-outline__note, p.ar-pj-top__note { word-break: auto-phrase; text-wrap: pretty; }
/* --- src/styles/mihon/_base.css */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.js:not(.reduced) { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
html.mh-switching body, html.mh-switching body *, html.mh-switching body *::before, html.mh-switching body *::after {
transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease, stroke 0.45s ease, box-shadow 0.45s ease !important;
}
.mh-toast {
position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2147483000; width: min(92vw, 460px); margin: 0;
padding: 12px 16px; border-radius: 10px; background: #1a1a1d; color: #fff; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
font: 500 13px/1.7 system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.mh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
import { SAMPLE_BY_ID, normalizeCfg, type MihonCfg, type SampleId } from '../../data/shindan/mihon';
/**
* サンプルサイト(/shindan/mihon/<id>)の中で動く切り替え
* ・設定は URL の # (t=雰囲気&s=節&v=規模)と、同じサイトの親の画面からの postMessage({ type:'bdn-mihon', cfg })で受け取る。
* 会社名は postMessage でだけ受け取る(URL・サーバーには出さない)
* ・雰囲気 → html[data-taste]、規模 → html[data-scale]、節 → [data-sec] と [data-nav-sec] の hidden、会社名 → [data-co] の文字
* ・現れる動き:[data-in] が画面に入ると .is-in(html.reduced のときは最初から付ける)
* ・デモの安全:フォームの送信、tel:・mailto:・外部リンク、[data-demo] は止めて「デモのため送信されません」と知らせる
* ・切り替えのたびに document へ 'mihon:apply'(detail = 設定)を出す。各サンプルの動きはこれを聞いて描き直せる
*/
const root = document.documentElement;
const id = root.dataset.mihon as SampleId;
const sample = SAMPLE_BY_ID[id];
/** # の中の設定(t・s・v)。書いてあるキーだけを返す(ページ内リンクの #price などでは何も返さない=いまの設定を保つ) */
const fromHash = (): Partial<MihonCfg> => {
const p = new URLSearchParams(location.hash.slice(1));
const c: Partial<MihonCfg> = {};
if (p.has('t')) c.taste = p.get('t') as MihonCfg['taste'];
if (p.has('s')) c.sections = (p.get('s') ?? '').split(',').filter(Boolean) as MihonCfg['sections'];
if (p.has('v')) c.scale = p.get('v') as MihonCfg['scale'];
return c;
};
// 複数ページのサンプル(sample.pages):ページを移っても設定を保つ(このタブの sessionStorage に。会社名は入れない)。
// iframe の中では、親の画面が同じタブに置いた会社名(store.ts の bdn-shindan-co)を先に使う(ページを移るたびに既定の名前が一瞬出ないように)
const KEY = `bdn-mihon-cfg:${id}`;
const multi = !!sample.pages?.length;
const stored = (): Partial<MihonCfg> => {
const c: Partial<MihonCfg> = {};
try {
if (multi) Object.assign(c, JSON.parse(sessionStorage.getItem(KEY) ?? '{}'));
if (window.parent !== window) c.name = sessionStorage.getItem('bdn-shindan-co') ?? '';
} catch { /* noop */ }
return c;
};
let cfg: MihonCfg = normalizeCfg(id, { ...stored(), ...fromHash() });
// 動き:便利DEネットの「動き:オフ」、または OS の「動きを減らす」(診断コーナーは OS の設定にも従う)
const reduced = (() => {
try { if (localStorage.getItem('bdn-motion') === 'off') return true; } catch { /* noop */ }
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
})();
if (reduced) root.classList.add('reduced');
const coEls = [...document.querySelectorAll<HTMLElement>('[data-co]')];
coEls.forEach((e) => { if (e.dataset.coDefault === undefined) e.dataset.coDefault = e.textContent ?? ''; });
let applied = false;
let switchT = 0;
function apply(c: MihonCfg) {
// 雰囲気を切り替えたときは、色をふっと移す(ぱっと替わってちらつかないように。最初の 1 回と動きオフでは移さない)
if (applied && root.dataset.taste !== c.taste && !reduced) {
root.classList.add('mh-switching');
clearTimeout(switchT);
switchT = window.setTimeout(() => root.classList.remove('mh-switching'), 520);
}
applied = true;
root.dataset.taste = c.taste;
root.dataset.scale = c.scale;
document.querySelectorAll<HTMLElement>('[data-sec]').forEach((el) => { el.hidden = !c.sections.includes(el.dataset.sec as MihonCfg['sections'][number]); });
document.querySelectorAll<HTMLElement>('[data-nav-sec]').forEach((el) => {
const item = el.closest<HTMLElement>('li') ?? el;
item.hidden = !c.sections.includes(el.dataset.navSec as MihonCfg['sections'][number]);
});
const name = c.name.trim();
coEls.forEach((e) => { e.textContent = name || e.dataset.coDefault || sample.name; });
root.style.setProperty('--co-len', String([...(name || sample.name)].length));
const pt = root.dataset.pageTitle;
document.title = `${pt ? `${pt}|` : ''}${name || sample.name}(参考イメージ)`;
if (multi) { try { sessionStorage.setItem(KEY, JSON.stringify({ taste: c.taste, sections: c.sections, scale: c.scale })); } catch { /* noop */ } }
document.dispatchEvent(new CustomEvent('mihon:apply', { detail: c }));
}
apply(cfg);
window.addEventListener('message', (e) => {
if (e.origin !== location.origin) return;
const d = e.data as { type?: string; cfg?: Partial<MihonCfg> } | null;
if (!d || d.type !== 'bdn-mihon' || !d.cfg) return;
cfg = normalizeCfg(id, { ...cfg, ...d.cfg });
apply(cfg);
});
window.addEventListener('hashchange', () => {
const h = fromHash();
if (!Object.keys(h).length) return; // ページ内リンク:設定は変えない
cfg = normalizeCfg(id, { ...cfg, ...h });
apply(cfg);
});
if (window.parent !== window) window.parent.postMessage({ type: 'bdn-mihon-ready', id }, location.origin);
// ---------------------------------------------------------------- 現れる動き
const ins = [...document.querySelectorAll<HTMLElement>('[data-in]')];
if (reduced || !('IntersectionObserver' in window)) ins.forEach((el) => el.classList.add('is-in'));
else {
const io = new IntersectionObserver((es) => es.forEach((x) => { if (x.isIntersecting) { x.target.classList.add('is-in'); io.unobserve(x.target); } }), { rootMargin: '0px 0px -8% 0px' });
ins.forEach((el) => io.observe(el));
}
// ---------------------------------------------------------------- デモの安全(送信・電話・外部へ出ない)
const toastEl = document.createElement('p');
toastEl.className = 'mh-toast';
toastEl.setAttribute('role', 'status');
document.body.appendChild(toastEl);
let tt = 0;
const toast = (msg: string) => {
toastEl.textContent = msg;
toastEl.classList.add('is-on');
clearTimeout(tt);
tt = window.setTimeout(() => toastEl.classList.remove('is-on'), 3200);
};
document.addEventListener('submit', (e) => { e.preventDefault(); toast('デモのため、送信されません。実際のホームページでは、ここからお問い合わせが届きます。'); }, true);
document.addEventListener('click', (e) => {
const a = (e.target as Element | null)?.closest<HTMLElement>('a, button');
if (!a) return;
const href = a.getAttribute('href') ?? '';
const external = /^https?:/i.test(href) && !href.startsWith(location.origin);
if (a.dataset.demo !== undefined || /^(tel|mailto|sms):/i.test(href) || external) {
e.preventDefault();
toast(a.dataset.demo || (/^tel:/i.test(href) ? 'デモのため、電話はかかりません。実際のホームページでは、押すと電話がかけられます。' : 'デモのため、この操作は動きません。'));
}
}, true);
/**
* 建築サンプル:下層ページの動き(arch.ts から読み込む。どのページでも読み込むので、要素がないときは何もしない)
* ・タブ([data-ar-tabs]:私たちについて/都市・地域設計のギャラリー):クリック・←→・Home/End、切り替えは 0.28 秒。
* 私たちについては URL の #about-us/#team(#staff)にも合わせる。設計チームの節(data-sec="staff")を外したらタブも隠す
* ・メディア掲載のカルーセル:矢印・←→・スワイプ(横のスクロールとスナップ)。両端で矢印を止める
* ・都市・地域設計のギャラリー:サムネイルでメインの写真をクロスフェード(2 枚目からは選んだときに読み込む)
* ・設計の流れ:スクロールに合わせてタイムラインの線が伸び、通った丸印を塗る(html.reduced では動かさない)
*/
export {};
const root = document.documentElement;
const reduced = () => root.classList.contains('reduced');
const $ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => el.querySelector<T>(s);
const $$ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => [...el.querySelectorAll<T>(s)];
const isShown = (el: Element) => !el.closest('[hidden]');
// ---------------------------------------------------------------- タブ
interface Tabs { tabs: HTMLButtonElement[]; select: (t: HTMLButtonElement, o?: { focus?: boolean; user?: boolean }) => void; current: () => HTMLButtonElement | undefined }
function initTabs(list: HTMLElement, onSelect?: (t: HTMLButtonElement, user: boolean) => void): Tabs {
const tabs = $$<HTMLButtonElement>('[role="tab"]', list);
const panelOf = (t: HTMLButtonElement) => document.getElementById(t.getAttribute('aria-controls') ?? '');
const current = () => tabs.find((t) => t.getAttribute('aria-selected') === 'true');
function select(t: HTMLButtonElement, o: { focus?: boolean; user?: boolean } = {}) {
const was = current();
tabs.forEach((x) => {
const on = x === t;
x.setAttribute('aria-selected', String(on));
if (on) x.removeAttribute('tabindex'); else x.tabIndex = -1;
const p = panelOf(x);
if (!p) return;
p.classList.toggle('is-on', on);
if (on && o.user && was !== t && !reduced()) {
// 切り替えたパネルは、パネルごと 0.28 秒で現れる(中の data-in は待たずに見せる)
p.classList.remove('is-enter');
$$('[data-in]', p).forEach((el) => el.classList.add('is-in'));
void p.offsetWidth;
p.classList.add('is-enter');
window.setTimeout(() => p.classList.remove('is-enter'), 320);
} else if (on && o.user && reduced()) {
$$('[data-in]', p).forEach((el) => el.classList.add('is-in'));
}
});
if (o.focus) t.focus();
onSelect?.(t, !!o.user);
}
tabs.forEach((t) => t.addEventListener('click', () => select(t, { user: true })));
list.addEventListener('keydown', (e) => {
const vis = tabs.filter(isShown);
const i = vis.indexOf(document.activeElement as HTMLButtonElement);
if (i < 0) return;
let n = -1;
if (e.key === 'ArrowRight') n = (i + 1) % vis.length;
else if (e.key === 'ArrowLeft') n = (i - 1 + vis.length) % vis.length;
else if (e.key === 'Home') n = 0;
else if (e.key === 'End') n = vis.length - 1;
if (n < 0) return;
e.preventDefault();
select(vis[n], { focus: true, user: true });
});
return { tabs, select, current };
}
// 私たちについて:#about-us/#team(#staff)
const aboutList = $('[data-ar-tabs="about"]');
if (aboutList) {
const bar = aboutList.closest<HTMLElement>('[data-ab-bar]');
const T = initTabs(aboutList, (t, user) => {
if (user && t.dataset.hash) history.replaceState(history.state, '', `#${t.dataset.hash}`);
});
const byHash = (h: string) => T.tabs.find((t) => (h === 'staff' ? 'team' : h) === t.dataset.hash);
// タブが使えるか:外す切り替えはタブの li に hidden が付く(帯ごと隠しているときも、li だけを見る)
const usable = (t: HTMLButtonElement) => !t.closest('li')?.hidden;
const fromHash = (scroll: boolean) => {
const t = byHash(location.hash.slice(1));
if (!t || !usable(t)) return;
T.select(t);
if (scroll && bar) bar.scrollIntoView({ block: 'start', behavior: reduced() ? 'auto' : 'smooth' });
};
// 設計チームの節を外したとき:タブも隠れる(li[data-nav-sec])ので、選ばれていたら「私たちについて」へ。タブが 1 つならタブの帯ごと隠す
const sync = () => {
const vis = T.tabs.filter(usable);
const cur = T.current();
if (vis.length && (!cur || !usable(cur))) T.select(vis[0]);
if (bar) bar.hidden = vis.length < 2;
};
fromHash(false);
sync();
document.addEventListener('mihon:apply', () => { sync(); });
window.addEventListener('hashchange', () => fromHash(true));
}
// 都市・地域設計:計画の事例のタブ
$$('[data-ar-tabs="plans"]').forEach((l) => initTabs(l));
// ---------------------------------------------------------------- 都市・地域設計:写真の切り替え(クロスフェード)
$$('[data-ps-gal]').forEach((g) => {
const imgs = $$<HTMLImageElement>('[data-ps-main] img', g);
const btns = $$<HTMLButtonElement>('[data-ps-th]', g);
const cap = $('[data-ps-cap]', g);
let cur = 0;
let token = 0;
const hydrate = (img: HTMLImageElement): Promise<void> => {
if (img.dataset.src) {
img.srcset = img.dataset.srcset ?? '';
img.src = img.dataset.src;
img.removeAttribute('data-src');
img.removeAttribute('data-srcset');
}
// 読み込みに時間がかかっても、0.9 秒で切り替える
return Promise.race([img.decode().catch(() => undefined), new Promise<void>((r) => window.setTimeout(r, 900))]);
};
async function show(n: number) {
if (n === cur || !imgs[n]) return;
const my = ++token;
btns.forEach((b, i) => b.setAttribute('aria-pressed', String(i === n)));
if (cap) cap.textContent = btns[n]?.dataset.cap ?? '';
await hydrate(imgs[n]);
if (my !== token) return;
imgs.forEach((im, i) => {
im.classList.toggle('is-on', i === n);
if (i === n) im.removeAttribute('aria-hidden'); else im.setAttribute('aria-hidden', 'true');
});
cur = n;
}
btns.forEach((b, i) => {
b.addEventListener('click', () => show(i));
// 指やマウスが乗ったら、先に読み込んでおく
b.addEventListener('pointerenter', () => { const im = imgs[i]; if (im?.dataset.src) hydrate(im); }, { once: true });
b.addEventListener('keydown', (e) => {
let n = -1;
if (e.key === 'ArrowRight') n = (i + 1) % btns.length;
else if (e.key === 'ArrowLeft') n = (i - 1 + btns.length) % btns.length;
else if (e.key === 'Home') n = 0;
else if (e.key === 'End') n = btns.length - 1;
if (n < 0) return;
e.preventDefault();
btns[n].focus();
show(n);
});
});
});
// ---------------------------------------------------------------- メディア掲載:表紙のカルーセル
const car = $('[data-md-car]');
if (car) {
const vp = $('[data-md-vp]', car)!;
const slides = $$('.ar-md-slide', car);
const prev = $<HTMLButtonElement>('[data-md-prev]', car)!;
const next = $<HTMLButtonElement>('[data-md-next]', car)!;
const count = $('[data-md-count]', car);
const total = slides.length;
const step = () => (slides.length > 1 ? slides[1].offsetLeft - slides[0].offsetLeft : vp.clientWidth);
const perView = () => Math.max(1, Math.round((vp.clientWidth + (step() - slides[0].offsetWidth)) / step()));
let raf = 0;
const update = () => {
raf = 0;
const max = vp.scrollWidth - vp.clientWidth;
// disabled にするとフォーカスが外れるので、aria-disabled で止める
prev.setAttribute('aria-disabled', String(vp.scrollLeft <= 2));
next.setAttribute('aria-disabled', String(vp.scrollLeft >= max - 2));
const first = Math.min(total - 1, Math.round(vp.scrollLeft / step()));
const last = Math.min(total, first + perView());
if (count) {
const t = last - first > 1 ? `${first + 1}〜${last} 枚目/全 ${total} 枚` : `${first + 1} 枚目/全 ${total} 枚`;
if (count.textContent !== t) count.textContent = t;
}
};
const queue = () => { if (!raf) raf = requestAnimationFrame(update); };
const go = (dir: number) => vp.scrollBy({ left: dir * step(), behavior: reduced() ? 'auto' : 'smooth' });
prev.addEventListener('click', () => { if (prev.getAttribute('aria-disabled') !== 'true') go(-1); });
next.addEventListener('click', () => { if (next.getAttribute('aria-disabled') !== 'true') go(1); });
vp.addEventListener('keydown', (e) => {
if (e.key === 'ArrowLeft') { e.preventDefault(); go(-1); }
else if (e.key === 'ArrowRight') { e.preventDefault(); go(1); }
});
vp.addEventListener('scroll', queue, { passive: true });
// 横の先の表紙は遅延読み込みのままだと送ったときに一瞬空になるので、カルーセルに触れたら残りも読み込む
const warm = () => $$<HTMLImageElement>('img[loading="lazy"]', car).forEach((im) => (im.loading = 'eager'));
['pointerenter', 'focusin', 'touchstart', 'scroll'].forEach((ev) => (ev === 'scroll' ? vp : car).addEventListener(ev, warm, { once: true, passive: true }));
if ('IntersectionObserver' in window) {
const io = new IntersectionObserver((es) => { if (es.some((e) => e.isIntersecting)) { warm(); io.disconnect(); } }, { rootMargin: '0px 0px 200px 0px' });
io.observe(car);
}
// 矢印の高さ(PC で表紙の中央に合わせる)
const cover = $('.ar-md-cover', car);
const setH = () => { if (cover) car.style.setProperty('--cov-h', `${cover.offsetHeight}px`); queue(); };
if ('ResizeObserver' in window && cover) new ResizeObserver(setH).observe(cover);
else window.addEventListener('resize', setH, { passive: true });
setH();
}
// ---------------------------------------------------------------- 設計の流れ:タイムラインの線
const tl = $('[data-pr-tl]');
if (tl) {
const steps = $$('.ar-pr-step', tl);
let raf = 0;
let on = false;
const upd = () => {
raf = 0;
const r = tl.getBoundingClientRect();
const line = window.innerHeight * 0.62;
const p = Math.min(1, Math.max(0, (line - r.top - 11) / Math.max(1, r.height - 22)));
tl.style.setProperty('--p', p.toFixed(4));
steps.forEach((s) => {
const d = $('.ar-pr-dot', s);
if (d) s.classList.toggle('is-past', d.getBoundingClientRect().top + 11 <= line);
});
};
const queue = () => { if (!raf) raf = requestAnimationFrame(upd); };
const start = () => {
if (on || reduced()) return;
on = true;
tl.classList.add('is-live');
window.addEventListener('scroll', queue, { passive: true });
window.addEventListener('resize', queue, { passive: true });
upd();
};
start();
}
/**
* 建築サンプル:建築事例の動き(arch.ts から読み込む。どのページでも読み込むので、要素がないときは何もしない)
* ・一覧(/projects):種類のテキストのタブで絞り込む(URL の ?kind=。リンクなのでキーボードでも押せる)。
* 絞っても写真どうしはすき間なく並べ、余った列は中央に寄せる(data-c3・data-c2)。スマホは「1 枚 → 2 枚並び」(data-m)
* ・詳細(/projects/<slug>):写真ギャラリー(クロスフェード 0.45 秒・←→キー・スワイプ・キャプション・「2 / 5」)。
* 2 枚目からは data-src にしておき、1 枚目を読み終えたら次の 1 枚、触れたり切り替えたりしたら前後の 1 枚ずつを読み込む
* 動き:html.reduced(動きオフ)では、移り変わりを省く(共通 CSS が transition を止める)
*/
export {};
const root = document.documentElement;
const reduced = () => root.classList.contains('reduced');
const $ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => el.querySelector<T>(s);
const $$ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => [...el.querySelectorAll<T>(s)];
// ---------------------------------------------------------------- 一覧:種類で絞り込む
const grid = $('[data-ar-pj-grid]');
const tabs = $$<HTMLAnchorElement>('[data-ar-pj-kind]');
if (grid && tabs.length) {
const items = $$('.ar-pj-grid__it', grid);
const live = $('[data-ar-pj-live]');
const keys = new Set(tabs.map((t) => t.dataset.arPjKind ?? ''));
let cur = '';
let t = 0;
/** 見えている写真だけで並び方を決める(すき間を出さない) */
const layout = () => {
const vis = items.filter((li) => !li.hidden);
const n = vis.length;
vis.forEach((li, i) => {
// スマホ:幅いっぱいの 1 枚 → 2 枚並び、のくり返し。最後に半分が 1 枚だけ余るときは幅いっぱいに
li.dataset.m = i % 3 === 0 || (i % 3 === 1 && i === n - 1) ? 'f' : 'h';
li.removeAttribute('data-c3');
li.removeAttribute('data-c2');
});
if (n % 3) vis[n - (n % 3)].dataset.c3 = String(n % 3);
if (n % 2) vis[n - 1].dataset.c2 = '';
};
const apply = (kind: string, user: boolean) => {
if (!keys.has(kind)) kind = '';
cur = kind;
items.forEach((li) => (li.hidden = !!kind && li.dataset.kind !== kind));
if (kind) grid.dataset.filtered = kind;
else delete grid.dataset.filtered;
layout();
tabs.forEach((a) => {
if ((a.dataset.arPjKind ?? '') === kind) a.setAttribute('aria-current', 'true');
else a.removeAttribute('aria-current');
});
if (user && live) {
const tab = tabs.find((a) => (a.dataset.arPjKind ?? '') === kind);
const n = items.filter((li) => !li.hidden).length;
live.textContent = kind ? `${tab?.dataset.label ?? ''}の事例を ${n} 件表示しています` : `すべての事例(${n} 件)を表示しています`;
}
};
const setUrl = (kind: string) => {
const url = new URL(location.href);
if (kind) url.searchParams.set('kind', kind);
else url.searchParams.delete('kind');
history.replaceState(history.state, '', url);
};
const switchTo = (kind: string) => {
if (kind === cur) return;
setUrl(kind);
clearTimeout(t);
if (reduced()) { apply(kind, true); return; }
// いったん薄く消してから入れ替える(並びが飛ばないように)
grid.classList.add('is-out');
t = window.setTimeout(() => { apply(kind, true); grid.classList.remove('is-out'); }, 180);
};
tabs.forEach((a) => a.addEventListener('click', (e) => {
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
e.preventDefault();
switchTo(a.dataset.arPjKind ?? '');
}));
apply(new URLSearchParams(location.search).get('kind') ?? '', false);
}
// ---------------------------------------------------------------- 詳細:写真ギャラリー
const gal = $('[data-ar-pj-gal]');
const stage = gal && $('[data-ar-pj-stage]', gal);
if (gal && stage) {
const slides = $$('.ar-pj-gal__sl', stage);
const caps = $$('.ar-pj-gal__cap', gal);
const curEl = $('[data-ar-pj-cur]', gal);
const live = $('[data-ar-pj-glive]', gal);
const n = slides.length;
let cur = 0;
let busy = false;
let leaveT = 0;
let inView = true;
const hydrate = (i: number): Promise<void> => {
const img = $<HTMLImageElement>('img', slides[(i + n) % n]);
if (!img) return Promise.resolve();
if (img.dataset.src) {
img.srcset = img.dataset.srcset ?? '';
img.src = img.dataset.src;
img.removeAttribute('data-src');
img.removeAttribute('data-srcset');
}
return img.decode().catch(() => undefined);
};
const near = () => { hydrate(cur + 1); hydrate(cur - 1); };
const wait = (ms: number) => new Promise<void>((r) => window.setTimeout(r, ms));
async function go(to: number) {
to = (to + n) % n;
if (to === cur || busy || n < 2) return;
busy = true;
// 読み込みを待つのは少しだけ(遅い回線でも操作が止まらないように)
await Promise.race([hydrate(to), wait(900)]);
const prev = slides[cur];
const next = slides[to];
clearTimeout(leaveT);
slides.forEach((s) => { if (s !== prev) s.classList.remove('is-leaving'); });
prev.classList.remove('is-on');
prev.classList.add('is-leaving');
prev.setAttribute('aria-hidden', 'true');
next.classList.remove('is-leaving');
next.classList.add('is-on');
next.removeAttribute('aria-hidden');
leaveT = window.setTimeout(() => prev.classList.remove('is-leaving'), reduced() ? 0 : 520);
caps.forEach((c, i) => c.classList.toggle('is-on', i === to));
cur = to;
if (curEl) curEl.textContent = String(to + 1);
if (live) live.textContent = `${to + 1} 枚目/全 ${n} 枚:${caps[to]?.textContent ?? ''}`;
busy = false;
near();
}
$('[data-ar-pj-prev]', gal)?.addEventListener('click', () => go(cur - 1));
$('[data-ar-pj-next]', gal)?.addEventListener('click', () => go(cur + 1));
// ←→キー:ギャラリーにフォーカスがあるとき。どこにもフォーカスがなく、ギャラリーが見えているときも
const blocked = () => root.classList.contains('ar-drawer-open') || root.classList.contains('ar-menu-open') || !!document.querySelector('dialog[open]');
const onKey = (e: KeyboardEvent) => {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || blocked()) return;
if (e.key === 'ArrowLeft') { e.preventDefault(); go(cur - 1); }
else if (e.key === 'ArrowRight') { e.preventDefault(); go(cur + 1); }
};
gal.addEventListener('keydown', (e) => { if (!(e.target as Element).closest('a, input, textarea, select')) onKey(e); });
document.addEventListener('keydown', (e) => {
const a = document.activeElement;
if (inView && (!a || a === document.body || a === document.documentElement)) onKey(e);
});
// スワイプ(縦のスクロールは妨げない)
let sx = 0, sy = 0, sid = -1;
stage.addEventListener('pointerdown', (e) => { if (e.pointerType === 'mouse') return; sx = e.clientX; sy = e.clientY; sid = e.pointerId; near(); });
stage.addEventListener('pointerup', (e) => {
if (e.pointerId !== sid) return;
sid = -1;
const dx = e.clientX - sx, dy = e.clientY - sy;
if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.3) go(cur + (dx < 0 ? 1 : -1));
});
stage.addEventListener('pointercancel', () => (sid = -1));
// 近づいたら前後を読み込む(マウスが乗った・フォーカスが入った)
gal.addEventListener('pointerenter', near, { once: true });
gal.addEventListener('focusin', near, { once: true });
if ('IntersectionObserver' in window) new IntersectionObserver((es) => { inView = es[0].isIntersecting; }, { threshold: 0.35 }).observe(stage);
// 1 枚目を読み終えたら、次の 1 枚を先に読んでおく
const first = $<HTMLImageElement>('img', slides[0]);
const warm = () => window.setTimeout(() => hydrate(1), 700);
if (first?.complete) warm(); else first?.addEventListener('load', warm, { once: true });
}
/**
* 建築サンプル「青景建築設計室」(/shindan/mihon/arch/*)の動き(どのページでも読み込む)
* ・ヘッダー:下へスクロール中は隠れ、上へ戻すと出る。プルダウンはホバー(閉じるまで 0.13 秒の猶予)・フォーカス・クリック・Esc
* ・スマホのメニュー、お問い合わせのパネル(右から。うしろは inert、Esc・幕・閉じるで戻り、開いたボタンへフォーカスを返す)
* ・ファーストビューのスライダー(クロスフェード 0.8 秒・6 秒ごと。停止/再開・←→・スワイプ・タブを離れると止まる。
* 2 枚目からは手前で読み込む)、建築紹介の動画(ダイアログ)、フォームの入力の確認
* ・下層ページ・建築事例の動きは ./arch-pages・./arch-projects
* 動き:html.reduced(便利DEネットの「動き:オフ」・OS の「動きを減らす」)では、自動で切り替えず、移り変わりも省く
*/
import './arch-pages';
import './arch-projects';
export {};
const root = document.documentElement;
const reduced = () => root.classList.contains('reduced');
const $ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => el.querySelector<T>(s);
const $$ = <T extends Element = HTMLElement>(s: string, el: ParentNode = document) => [...el.querySelectorAll<T>(s)];
// ---------------------------------------------------------------- 参考イメージの帯の高さ(ファーストビューの高さから引く)
const strip = $('.mh-strip');
const setStrip = () => { if (strip) root.style.setProperty('--ar-strip', `${strip.offsetHeight}px`); };
setStrip();
window.addEventListener('resize', setStrip, { passive: true });
// ---------------------------------------------------------------- ヘッダー
const hd = $('[data-ar-hd]');
const ddItems = $$('[data-ar-dd]');
let menuOpen = false;
if (hd) {
let lastY = window.scrollY;
let raf = 0;
const onScroll = () => {
raf = 0;
const y = window.scrollY;
hd.classList.toggle('is-scrolled', y > 4);
if (Math.abs(y - lastY) < 6) return;
const anyOpen = menuOpen || ddItems.some((li) => li.classList.contains('is-open'));
hd.classList.toggle('is-hidden', y > lastY && y > 160 && !anyOpen);
lastY = y;
};
window.addEventListener('scroll', () => { if (!raf) raf = requestAnimationFrame(onScroll); }, { passive: true });
onScroll();
}
// プルダウン
const closeAll = (except?: HTMLElement) => ddItems.forEach((li) => { if (li !== except) setDd(li, false); });
function setDd(li: HTMLElement, open: boolean) {
li.classList.toggle('is-open', open);
$('.ar-nav__tg', li)?.setAttribute('aria-expanded', String(open));
}
ddItems.forEach((li) => {
const btn = $<HTMLButtonElement>('.ar-nav__tg', li)!;
let t = 0;
let hoverAt = 0;
const open = () => { clearTimeout(t); closeAll(li); setDd(li, true); };
const close = (delay = 0) => { clearTimeout(t); t = window.setTimeout(() => setDd(li, false), delay); };
li.addEventListener('pointerenter', (e) => { if (e.pointerType === 'mouse') { hoverAt = performance.now(); open(); } });
li.addEventListener('pointerleave', (e) => { if (e.pointerType === 'mouse') close(130); });
btn.addEventListener('click', () => {
// ホバーで開いた直後のクリックでは閉じない
if (li.classList.contains('is-open') && performance.now() - hoverAt > 400) close();
else open();
});
btn.addEventListener('keydown', (e) => {
if (e.key === 'ArrowDown') { e.preventDefault(); open(); $<HTMLAnchorElement>('.ar-dd__a', li)?.focus(); }
});
li.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && li.classList.contains('is-open')) { e.stopPropagation(); close(); btn.focus(); }
});
li.addEventListener('focusout', (e) => { if (!li.contains(e.relatedTarget as Node | null)) close(); });
});
document.addEventListener('click', (e) => { if (!(e.target as Element).closest('[data-ar-dd]')) closeAll(); });
// スマホのメニュー
const burger = $<HTMLButtonElement>('[data-ar-burger]');
const mnav = $('[data-ar-mnav]');
const setMenu = (open: boolean, focusBack = true) => {
if (!burger || !mnav) return;
menuOpen = open;
// メニューの上端はヘッダーの下端(上の参考イメージの帯がまだ見えている間は、その分だけ下がる)
if (open && hd) {
hd.classList.remove('is-hidden');
const stripBottom = Math.max(0, strip?.getBoundingClientRect().bottom ?? 0);
root.style.setProperty('--ar-mtop', `${Math.round(stripBottom + hd.offsetHeight)}px`);
}
mnav.hidden = !open;
burger.setAttribute('aria-expanded', String(open));
const bt = $('.ar-burger__t', burger);
if (bt) bt.textContent = open ? '閉じる' : 'メニュー';
root.classList.toggle('ar-menu-open', open);
root.style.overflow = open ? 'hidden' : '';
if (open) { hd?.classList.remove('is-hidden'); $$('.ar-mnav__list > li', mnav).forEach((li, i) => li.style.setProperty('--i', String(i))); }
else if (focusBack) burger.focus();
};
burger?.addEventListener('click', () => setMenu(!menuOpen));
mnav?.addEventListener('click', (e) => { if ((e.target as Element).closest('a')) setMenu(false, false); });
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && menuOpen) setMenu(false); });
window.matchMedia('(min-width: 961px)').addEventListener('change', (m) => { if (m.matches && menuOpen) setMenu(false, false); });
// ---------------------------------------------------------------- お問い合わせのパネル
const drawer = $('[data-ar-drawer]');
const scrim = $('[data-ar-scrim]');
let opener: HTMLElement | null = null;
const isOpen = () => root.classList.contains('ar-drawer-open');
const bg = () => [...document.body.children].filter((el) => el !== drawer && el !== scrim && !el.classList.contains('mh-toast') && el.tagName !== 'SCRIPT') as HTMLElement[];
function openDrawer(from: HTMLElement | null) {
if (!drawer || isOpen()) return;
opener = from;
if (menuOpen) setMenu(false, false);
closeAll();
root.classList.add('ar-drawer-open');
bg().forEach((el) => (el.inert = true));
drawer.scrollTop = 0;
window.setTimeout(() => drawer.focus({ preventScroll: true }), reduced() ? 0 : 60);
}
function closeDrawer() {
if (!drawer || !isOpen()) return;
root.classList.remove('ar-drawer-open');
bg().forEach((el) => (el.inert = false));
(opener && document.contains(opener) ? opener : null)?.focus({ preventScroll: true });
opener = null;
if (location.hash === '#ar-contact') history.replaceState(null, '', location.pathname + location.search);
}
document.addEventListener('click', (e) => {
const a = (e.target as Element).closest<HTMLElement>('[data-ar-contact]');
if (!a) return;
e.preventDefault();
openDrawer(a);
});
$$('[data-ar-close]').forEach((b) => b.addEventListener('click', closeDrawer));
scrim?.addEventListener('click', closeDrawer);
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && isOpen()) closeDrawer(); });
if (location.hash === '#ar-contact') openDrawer(null);
// フォーム:入力の確認(送信そのものは mihon-runtime.ts が止めて「デモ」と知らせる)
const form = $<HTMLFormElement>('[data-ar-form]');
if (form) {
const fields = $$<HTMLInputElement | HTMLTextAreaElement>('[required]', form);
const check = (f: HTMLInputElement | HTMLTextAreaElement) => {
let msg = '';
if (f instanceof HTMLInputElement && f.type === 'checkbox') { if (!f.checked) msg = f.dataset.err ?? ''; }
else if (!f.value.trim()) msg = f.dataset.err ?? '';
else if (f.type === 'email' && !f.validity.valid) msg = f.dataset.errType ?? f.dataset.err ?? '';
const out = form.querySelector<HTMLElement>(`#${f.id}-e`);
if (out) out.textContent = msg;
f.setAttribute('aria-invalid', String(!!msg));
return !msg;
};
fields.forEach((f) => f.addEventListener(f.type === 'checkbox' ? 'change' : 'input', () => { if (f.getAttribute('aria-invalid') === 'true') check(f); }));
form.querySelector('[type="submit"]')?.addEventListener('click', (e) => {
const bad = fields.filter((f) => !check(f));
if (bad.length) { e.preventDefault(); bad[0].focus(); }
});
form.addEventListener('submit', () => {
const done = $('[data-ar-done]', form);
if (done) done.textContent = 'デモ用のフォームのため、送信は行われませんでした。実際のホームページでは、この内容が設計室に届き、自動の受付メールが送られます。';
});
}
// ---------------------------------------------------------------- ファーストビューのスライダー
const hero = $('[data-ar-hero]');
if (hero) {
const slides = $$('.ar-slide', hero);
const copy = $('[data-ar-copy]', hero)!;
const t = $('.ar-hero__t', copy)!;
const s = $('.ar-hero__s', copy)!;
const btn = $<HTMLAnchorElement>('.ar-hero__btn', copy)!;
const dots = $$<HTMLButtonElement>('.ar-dot', hero);
const pauseBtn = $<HTMLButtonElement>('[data-ar-pause]', hero);
const live = $('[data-ar-live]', hero);
const DUR = 6000;
let cur = 0;
let timer = 0;
let userPaused = reduced();
let visible = true;
let busy = false;
// 2 枚目からは data-src にしておき、手前で読み込む(全部を一度に読み込まない)
const hydrate = (i: number): Promise<void> => {
const sl = slides[(i + slides.length) % slides.length];
$$<HTMLSourceElement>('source[data-srcset]', sl).forEach((so) => { so.srcset = so.dataset.srcset!; so.removeAttribute('data-srcset'); });
const img = $<HTMLImageElement>('img', sl)!;
if (img.dataset.src) { img.srcset = img.dataset.srcset ?? ''; img.src = img.dataset.src; img.removeAttribute('data-src'); img.removeAttribute('data-srcset'); }
return img.decode().catch(() => undefined);
};
const setCopy = (i: number) => {
const d = slides[i].dataset;
t.textContent = d.copy ?? '';
s.textContent = d.sub ?? '';
btn.textContent = d.btn ?? '';
btn.href = d.href ?? '#';
if (d.contact !== undefined) btn.setAttribute('data-ar-contact', ''); else btn.removeAttribute('data-ar-contact');
};
const schedule = () => {
clearTimeout(timer);
if (userPaused || !visible || document.hidden || reduced()) return;
timer = window.setTimeout(() => go(cur + 1), DUR);
};
async function go(n: number, user = false) {
n = (n + slides.length) % slides.length;
if (n === cur || busy) return;
busy = true;
clearTimeout(timer);
await hydrate(n);
const prev = slides[cur];
const next = slides[n];
prev.classList.remove('is-on');
prev.classList.add('is-leaving');
next.classList.add('is-on');
next.removeAttribute('aria-hidden');
prev.setAttribute('aria-hidden', 'true');
window.setTimeout(() => prev.classList.remove('is-leaving'), reduced() ? 0 : 860);
dots.forEach((d, i) => d.setAttribute('aria-current', String(i === n)));
cur = n;
if (reduced()) { setCopy(n); copy.classList.remove('is-out'); }
else {
copy.classList.remove('is-in');
copy.classList.add('is-out');
window.setTimeout(() => { setCopy(n); copy.classList.remove('is-out'); void copy.offsetWidth; copy.classList.add('is-in'); }, 200);
}
if (live) live.textContent = user ? `${n + 1} 枚目/全 ${slides.length} 枚:${slides[n].dataset.copy}` : '';
busy = false;
hydrate(n + 1);
schedule();
}
$('[data-ar-prev]', hero)?.addEventListener('click', () => go(cur - 1, true));
$('[data-ar-next]', hero)?.addEventListener('click', () => go(cur + 1, true));
dots.forEach((d, i) => d.addEventListener('click', () => go(i, true)));
pauseBtn?.addEventListener('click', () => {
userPaused = !userPaused;
pauseBtn.setAttribute('aria-pressed', String(userPaused));
pauseBtn.setAttribute('aria-label', userPaused ? 'スライドの自動再生を再開する' : 'スライドの自動再生を止める');
schedule();
});
if (pauseBtn && userPaused) { pauseBtn.setAttribute('aria-pressed', 'true'); pauseBtn.setAttribute('aria-label', 'スライドの自動再生を再開する'); }
hero.addEventListener('keydown', (e) => {
if ((e.target as Element).closest('a, input, textarea')) return;
if (e.key === 'ArrowLeft') { e.preventDefault(); go(cur - 1, true); }
if (e.key === 'ArrowRight') { e.preventDefault(); go(cur + 1, true); }
});
// スワイプ(縦のスクロールは妨げない)
let sx = 0, sy = 0, sid = -1;
hero.addEventListener('pointerdown', (e) => { if (e.pointerType === 'mouse') return; sx = e.clientX; sy = e.clientY; sid = e.pointerId; });
hero.addEventListener('pointerup', (e) => {
if (e.pointerId !== sid) return;
sid = -1;
const dx = e.clientX - sx, dy = e.clientY - sy;
if (Math.abs(dx) > 44 && Math.abs(dx) > Math.abs(dy) * 1.4) go(cur + (dx < 0 ? 1 : -1), true);
});
hero.addEventListener('pointercancel', () => (sid = -1));
document.addEventListener('visibilitychange', schedule);
if ('IntersectionObserver' in window) new IntersectionObserver((es) => { visible = es[0].isIntersecting; schedule(); }, { threshold: 0.2 }).observe(hero);
// 1 枚目を読み込み終えたら、2 枚目を先に読み込んでおく
const first = $<HTMLImageElement>('img', slides[0]);
const warm = () => window.setTimeout(() => hydrate(1), 600);
if (first?.complete) warm(); else first?.addEventListener('load', warm, { once: true });
schedule();
}
// ---------------------------------------------------------------- 建築紹介の動画(ダイアログ。開いたときに読み込む)
$$<HTMLButtonElement>('[data-ar-film]').forEach((b) => {
const dlg = document.getElementById(b.getAttribute('aria-controls') ?? '') as HTMLDialogElement | null;
if (!dlg) return;
const v = $<HTMLVideoElement>('video', dlg)!;
b.addEventListener('click', () => {
if (!v.src && v.dataset.src) v.src = v.dataset.src;
dlg.showModal();
root.style.overflow = 'hidden';
if (!reduced()) v.play().catch(() => undefined);
});
$('[data-ar-film-close]', dlg)?.addEventListener('click', () => dlg.close());
dlg.addEventListener('click', (e) => { if (e.target === dlg) dlg.close(); });
dlg.addEventListener('close', () => { v.pause(); root.style.overflow = ''; });
});
# ar-works-tiles — すき間なく並ぶ事例写真の壁と、乗ると降りる幕・種類で絞る文字のタブ
吸収元:青景建築設計室・APPROVED `7202f23`・`/shindan/mihon/arch/projects` の `.ar-pj-top`(題名・導入・種類のタブ)と `.ar-pj-wall`(写真の壁)。吸収元の注記では指示書 15 章。
## 範囲を決めた理由
建築事例の写真のタイルは、トップの「建築事例への誘導」(`.ar-works`。4 枚を 1 列)と、事例の一覧(`/projects`。12 枚の壁と種類のタブ)の 2 か所にある。タイルの部品(`.ar-tile`)は同じで、一覧の方が「すき間なく並べ直す」「タッチでは名前の札を常に出す」「種類で絞る」まで持っているので、一覧を写した。トップの 4 枚は、この壁の列の数と形(1:1・すき間あり)を変えたものにあたる。
## 何をしているか
時間とイージングは吸収元の `arch.css`・`arch-projects.css`・`arch-projects.ts` の値のまま。
- **壁**:5:4 の写真のタイルを、幅 90.5%・3 列・すき間なしで並べる。境目が小数の位置に来ると明るい線が出るので、タイルを右と下へ 1px ずつ重ねる。768〜1023px は 2 列。767px 以下は「幅いっぱいの 1 枚 → 2 枚並び」のくり返し(`data-m` の f/h)。
- **乗ったとき**(`@media (hover: hover)`):黒 40% の幕が `opacity` 0.28 秒で降り、名前と種類が 6px 下から 0.4/0.45 秒(`cubic-bezier(.22,1,.36,1)`)で上がり、写真は 0.6 秒で 1.03 倍。キーボードのフォーカスでも幕を出し、白い 2px の線を内側 8px に引く。
- **ホバーのない端末と 767px 以下**:幕を出さず、写真の左下に名前の札(墨 58%)を常に出す。
- **種類で絞る**(`arch-projects.ts`):テキストのタブ(選んだものに下線が左から 0.35 秒で引かれる)を押すと、URL の `?kind=` を書き換え(履歴は増やさない)、壁を 0.18 秒で消し、0.18 秒後に見えている写真だけで並べ直して 0.3 秒で戻す。3 列で余った 1・2 枚は 6 つ割りで中央へ寄せ、2 列で余った 1 枚も中央へ、スマホは最後に半分が 1 枚だけ余るときは幅いっぱいにする。読み上げで「住宅の事例を 8 件表示しています」。読み込み時は `?kind=` に合わせる。
- **現れる動き**(見本の共通の器 `mihon-runtime.ts`):`[data-in]` が画面の下 8% の線を越えたら 1 度だけ `.is-in`。見出し・文は 10px 下から 0.55 秒、写真は 8px 下から 0.75 秒、行の中は `--i` で 80ms ずつずれる。
## ファイル
| ファイル | 中身 |
|---|---|
| `src/markup.html` | サーバーが返した main の中(題名・導入・タブと写真の壁。JS が書き換える前)。写真は `{{asset:名前}}` |
| `src/style.css` | 節と祖先に当たる規則を、吸収元の CSS の原文のまま(`arch.css`・`arch-pages.css`・`arch-projects.css`・`_base.css`。`is-out`・`data-filtered`・`data-c3`・`data-c2`・`is-in` など JS が付ける状態の規則も) |
| `src/js/mihon/arch.ts` `arch-pages.ts` `arch-projects.ts` | 吸収元のモジュールを書き換えずに写したもの(レジストリが blob で照合)。arch.ts が残りの 2 つを読む |
| `src/js/mihon-runtime.ts`・`data/shindan/mihon.ts` | 見本の共通の器と、それが読む見本の定義。吸収元の版の書き出し(`.snapshots/arch`)から書き換えずに写した共有のモジュール(見本の持ち物ではないので、レジストリは blob を照合せず警告にする) |
| `src/index.ts` | 入口。字体と CSS を読み、吸収元のページと同じ順で `js/mihon/arch.ts` → `js/mihon-runtime.ts` を読み込む(読み込んだ時点で動き出す) |
| `assets/` | 建築写真 12 枚 × 3 幅(架空の事務所のために生成したもの。案件には書き出さない) |
| `extract.json` | 写した範囲・規則の数・html と body の属性・吸収元の版 |
`data/shindan/mihon.ts` が `src/` の外にあるのは、抽出器が「最初の --js のモジュールのフォルダー」を基準に相対の位置を保って写すため(`mihon-runtime.ts` の `import '../../data/shindan/mihon'` をそのまま解けるようにした)。
## 入口の順番
吸収元のページの HTML では、器 `Arch.astro` のスクリプト(`arch.ts`)→ `Mihon.astro` のスクリプト(`mihon-runtime.ts`)の順に読む。入口も同じ順で読み込む。
1. `js/mihon/arch.ts`:`arch-pages.ts`・`arch-projects.ts` を読み、一覧の絞り込みを用意して `?kind=` に合わせて並べる。ヘッダー・メニュー・お問い合わせのパネル・スライダー・動画・詳細のギャラリーは、該当の要素がこの部品にないので何もしない。
2. `js/mihon-runtime.ts`:`[data-in]` を見張り、画面に入ったら `.is-in`。雰囲気(`data-taste`)・規模の適用、題名の書き換え、デモの安全(外へのリンク・送信を止めて通知)も同じく動く。
## 変えたところ
写したモジュールは変えていない。入口 `index.ts` だけはこの LAB で書いた。
- 吸収元の `arch.ts`・`mihon-runtime.ts` は、読み込んだ時点でページの要素を探して動かす作りで、関数を書き出さない。入口は読み込むだけで、`mount()` は何もしない後片付けの関数を返す。**タブのクリックの受け口・IntersectionObserver・document の受け口・通知の要素(`p.mh-toast`)は、ページを移るまで残る**(写したモジュールに手を入れずに止める方法がない)。
- 器(`Arch.astro`)が読む字体のうち Zen Old Mincho は別の雰囲気(`luxe`)の見出し用で、この版の既定(`modern`)では使わない。LAB にも入っていないので読まない(ar-hero-crossfade と同じ)。
- タイルのリンクとタブの `href` は吸収元のページへの道のまま。タブは JS が押した動きを止めて絞り込むが、タイルを押すと LAB の中では見つからないページへ移る。
- 吸収元のヘッダー(固定)・上の「参考イメージ」の帯・写真ギャラリーと相談の暗い面・フッターは、この部品に含めない。
## 変えてよい所・いけない所
- 変えてよい:写真と事例の名前・種類、タブの種類と件数、写真の形(5:4)、列の数と壁の幅、幕と札の色、字体と色(`technique.json` の `customizable`)。
- 変えてはいけない:すき間なく並べ直すこと(余りを中央へ・スマホの 1 枚 → 2 枚)、絞り込みの「消す → 並べ直す → 戻す」の順と時間、ホバーとタッチの出し分け(ホバーだけに頼らない)、現れる動きは 1 度だけ(`technique.json` の `invariants`)。
## 使い方
```ts
import { mount } from './src/index'; // 読み込んだ時点で、ページの一覧の絞り込みと現れる動きが動き出す
mount();
```
markup の `<main>` がページにあること。`html` に `data-mihon="arch"`・`data-taste="modern"`・`data-scale="pre"`・`class="js"`、`body` に `class="ar"`。`html.reduced` を付けて読み込むと「動き:オフ」(現れる動きなし・絞り込みはその場で)。
## 比較の結果
`node tools/compare.mjs ar-works-tiles`(2026-12-05、`reports/compare/ar-works-tiles.json`・`sheet.jpg`)。比べる要素は `#ar-main`(吸収元の main はこの 2 つの節だけ)。
- 判定:**一致**(止めた状態 1% 以下・動きの各コマ 3% 以下・誤り 0・やり直し 0)
- 止めた状態(動き:オフ):1440px 0.00%・390px 0.00%
- 動き(15 コマ × 2 幅。main の上端まで送った直後の 2 段目の現れる動き → 1000ms に「住宅」へフォーカスして Enter → 2200ms に 1 枚目へマウスを乗せる):最大 1.33%(1440px の 1400ms)、平均 0.04%。390px はすべて 0.00%。
- 1400ms の差は、絞り込みで 2 段目の右に来た「傾斜地の住まい」が現れる途中の濃さだけ(差の範囲は x 927〜1357・y 750〜898)。このタイルは並べ直しで画面に入ったときに IntersectionObserver が `.is-in` を付けるが、その知らせは実時間の描画で届くので、道具が 50ms ずつ時計を合わせる刻みのどこで始まったかが吸収元とデモで 1 刻みずれた(デモが少し先)。1700ms で 0.00% に戻る。写し方の漏れではなく、条件(実時間で届く知らせ)の差。
- 目で確かめたこと:1080〜1250ms で壁全体が消えて戻る途中(1000ms のコマとの差が壁の範囲全体)、2400ms で「住宅」のタブに下線とフォーカスの線、1 枚目に黒い幕と「森にひらく平屋/住宅・新築/木造平屋」、2 段目の右に「傾斜地の住まい」(8 件に並べ直した形)。吸収元とデモで同じ。
- 途中の経過:はじめは 1000ms の操作を `click` にしていたが、道具の合成のクリック(`new MouseEvent('click', { bubbles: true })`、`cancelable` なし)ではページの `preventDefault()` が効かず、リンクのタブを押すと吸収元は `?kind=house` へ、デモは LAB の中の見つからない道へ移ってしまい、比較が途中で止まった(道具の不具合として報告した。道具は直していない)。リンクを押す操作はフォーカスして Enter に替えた(本物のクリックになり、`preventDefault()` が効く)。
## 案件に使うとき(権利)
コードは自社制作。写真・事例・文・事務所名は架空の見本のものなので差し替える。この版(7202f23)は、指示書「高精度再現マスタープロンプト」で参考サイト((参考サイト))の構成を高い精度で再現した版で、事業者がそのあと「(公開版では省略)」と指示した。そのため壁の幅と列・5:4・幕・タブの形は案件のアートディレクションで決め直し、並べ直す仕組み・絞り込みの手順・ホバーとタッチの出し分け・現れる動きの扱いだけを使う(`technique.json` の `export`)。`mihon-runtime.ts` は見本の器なので、案件では現れる動きの部分だけを持ち出す。
/**
* 無料診断の「完成イメージ」=業種別のサンプルサイト(/shindan/mihon/<id>)の定義
* ------------------------------------------------------------------
* 2026-11-29 指示書「ホームページ無料診断・自動制作提案システム」8 章。
* 生成 AI は使わず、業種ごとに作り込んだサンプルサイトを前もって用意し、診断の結果で
* ・雰囲気(taste)・載せる節(sections)・会社名(name。ブラウザの中だけ)・制作の規模(scale)
* を切り替える。サンプルサイトの中の切り替えは scripts/shindan/mihon-runtime.ts、
* 載せる節と料金・ページ構成の対応は scripts/shindan/plan.ts(同じ「制作構成」を見る)。
*
* サンプルサイトの約束(各 /shindan/mihon/<id>.astro):
* ・切り替えられる節は <section data-sec="<SecId>" id="<SecId>"> で囲む(11 種類すべてを持つ)。いつも出す部分は data-core
* ・ナビの項目は data-nav-sec="<SecId>"(その節を外すと隠れる)
* ・事業者名を出す所は data-co(中身が既定の名前。入力があれば置き換わる)
* ・雰囲気は html[data-taste="<TasteId>"]、規模は html[data-scale="min|std|pre"] で見た目を変える
* ・現れる動きは data-in(画面に入ると .is-in が付く)。html.reduced のときは動かさない
* ・送信・予約・電話は動かない(フォームの送信と tel:/mailto:/外部リンク/data-demo は、ランタイムが止めて「デモ」と知らせる)
*/
export type TasteId = 'simple' | 'friendly' | 'trust' | 'modern' | 'luxe';
export type SecId = 'about' | 'services' | 'price' | 'works' | 'news' | 'staff' | 'recruit' | 'faq' | 'map' | 'line' | 'form';
export type SampleId = 'build' | 'care' | 'food' | 'beauty' | 'maker' | 'pro' | 'shop' | 'corp' | 'arch';
export type ScaleId = 'min' | 'std' | 'pre';
export const TASTES: Record<TasteId, { label: string; note: string }> = {
simple: { label: 'シンプル・低コスト', note: '読みやすさを第一に。写真と動きは控えめ' },
friendly: { label: '親しみやすい', note: 'やわらかな色と字、丸みのある形' },
trust: { label: '信頼感・誠実さ', note: '落ち着いた色と、整った文字組み' },
modern: { label: 'モダン・スタイリッシュ', note: '大きな文字と余白、すっきりした線' },
luxe: { label: '高級感・上質', note: '明朝体と広い余白、写真を大きく' },
};
/** 切り替えられる節(指示書 9 章「掲載内容の変更」の 11 種類)。label は既定の呼び名(業種ごとに secLabels で替える) */
export const SECTIONS: { id: SecId; label: string; note: string }[] = [
{ id: 'about', label: '会社概要', note: '所在地・代表・沿革など' },
{ id: 'services', label: 'サービス紹介', note: '何をしている会社か' },
{ id: 'price', label: '料金表', note: '料金や目安' },
{ id: 'works', label: '実績', note: '施工事例・制作事例など' },
{ id: 'news', label: 'お知らせ', note: '新着・休業日など' },
{ id: 'staff', label: 'スタッフ紹介', note: '人柄・資格' },
{ id: 'recruit', label: '求人情報', note: '募集要項と応募' },
{ id: 'faq', label: 'よくある質問', note: '電話での説明を減らす' },
{ id: 'map', label: 'アクセス・地図', note: 'Googleマップへの導線' },
{ id: 'line', label: 'LINEで問い合わせ', note: 'LINE公式アカウントへの導線' },
{ id: 'form', label: 'お問い合わせフォーム', note: '24 時間受け付け' },
];
export const SEC_IDS = SECTIONS.map((s) => s.id);
export interface Sample {
id: SampleId;
/** サンプルの業種名 */
label: string;
/** 架空のサンプル事業者名(会社名を入れないときに出す) */
name: string;
/** 診断の業種(questions.ts の industry の id)→ このサンプル */
industries: string[];
/** この業種に合う雰囲気(先頭が既定) */
tastes: TasteId[];
/** 節の呼び名(業種の言葉に) */
secLabels: Partial<Record<SecId, string>>;
/** サンプルを直接開いたときに出す節 */
defaults: SecId[];
/** 掲載が求められる情報など、別途確認が要ること(結果の画面に出す) */
legal: string;
/** デザインの考え方(結果の画面に出す短い説明) */
concept: string;
/** プレビューの写真のクレジット・注記 */
photo: string;
/** 同じ業種で選べる、別の見本(結果の画面で「見本の種類」として切り替えられる) */
alt?: SampleId[];
/** 「見本の種類」に出す短い説明 */
kind?: string;
/** サンプルを直接開いたときの規模(既定は std) */
scale?: ScaleId;
/** 複数ページのサンプル:プレビューの「ページ」で選べるページ(path は /shindan/mihon/<id> からの相対) */
pages?: { path: string; label: string }[];
}
export const SAMPLES: Sample[] = [
{
id: 'build', label: '建設・工事', name: 'つむぎ建設', industries: ['construction', 'reform', 'equipment'],
alt: ['arch'], kind: '工務店・建設会社の例:現場の写真と施工事例を大きく、対応地域と見積もりへ',
tastes: ['modern', 'trust', 'friendly', 'simple'],
secLabels: { services: 'できる工事', works: '施工事例', price: '工事の目安', staff: '職人紹介', map: '対応地域・アクセス', form: '見積もり・相談' },
defaults: ['about', 'services', 'works', 'faq', 'map', 'form'],
legal: '建設業の許可を受けている場合は、許可番号などの表示を確認してください。',
concept: '現場の写真を大きく、施工事例と対応地域で「頼める会社か」を確かめられる形。',
photo: '写真は AI で作ったイメージです(実在の現場・施工実績ではありません)。',
},
{
id: 'care', label: '介護・福祉・医療', name: 'デイサービス まどあかり', industries: ['care', 'medical', 'seitai'],
tastes: ['friendly', 'trust', 'simple'],
secLabels: { about: '事業所について', services: 'サービス内容', works: '一日の流れ', price: '利用料金の目安', staff: 'スタッフ紹介', map: '事業所・送迎エリア', form: '見学・相談のお申し込み' },
defaults: ['about', 'services', 'works', 'price', 'staff', 'recruit', 'faq', 'map', 'form'],
legal: '介護・医療の事業は、運営規程・重要事項・広告の決まり(医療広告ガイドラインなど)で掲載が求められる・制限される情報があります。別途確認してください。',
concept: '大きな文字と電話番号、ご本人・ご家族・ケアマネジャー・求職者が迷わず目的の情報へ進める形。',
photo: '写真は AI で作ったイメージです(実在の事業所・利用者ではありません)。',
},
{
id: 'food', label: '飲食店', name: '食堂 ゆげと灯', industries: ['food'],
tastes: ['friendly', 'modern', 'luxe', 'simple'],
secLabels: { about: 'お店について', services: 'おすすめ', price: 'メニュー', works: 'お店のようす', staff: 'つくる人', map: 'アクセス・営業時間', line: 'LINEで予約', form: 'ご予約・お問い合わせ' },
defaults: ['about', 'services', 'price', 'works', 'news', 'map', 'line'],
legal: 'アレルギー・原産地などの表示や、酒類の提供に関する表示は、別途確認してください。',
concept: '料理の写真とメニューを主役に、営業時間・アクセス・予約まで迷わない形。',
photo: '写真は AI で作ったイメージです(実在のお店・料理ではありません)。',
},
{
id: 'beauty', label: '美容・サロン', name: 'hair salon nagi', industries: ['beauty'],
tastes: ['modern', 'luxe', 'friendly', 'simple'],
secLabels: { about: 'サロンについて', services: 'コンセプト', price: 'メニュー・料金', works: 'スタイル', staff: 'スタイリスト', map: 'アクセス', line: 'LINEで予約', form: 'ご予約' },
defaults: ['about', 'services', 'price', 'works', 'staff', 'map', 'line'],
legal: '料金の表示(税込の総額)や、医療に当たる施術の表現は、別途確認してください。',
concept: '余白と写真、文字組みで空気感を伝え、メニューと料金、予約までを短くつなぐ形。',
photo: '写真は AI で作ったイメージです(実在のサロン・スタイルではありません)。',
},
{
id: 'maker', label: '製造業', name: '白峰精工', industries: ['maker'],
tastes: ['trust', 'modern', 'simple'],
secLabels: { services: '加工・技術', works: '製作事例', price: '対応範囲・ロット', staff: 'ものづくりの人', map: '工場・アクセス', form: '技術相談・お見積もり' },
defaults: ['about', 'services', 'works', 'price', 'recruit', 'faq', 'map', 'form'],
legal: '取引先名・図面・製品の掲載は、取引先の了解を確認してください。',
concept: '設備と工程、対応できる加工を一覧で示し、法人の担当者が社内で説明しやすい形。',
photo: '写真は AI で作ったイメージです(実在の工場・製品ではありません)。',
},
{
id: 'pro', label: '士業・専門サービス', name: 'ひらく行政書士事務所', industries: ['pro', 'realestate'],
tastes: ['modern', 'trust', 'luxe', 'simple'],
secLabels: { about: '事務所について', services: '取り扱い業務', works: '解決までの流れ', price: '報酬の目安', staff: '代表あいさつ', map: '事務所・アクセス', form: '初回相談のお申し込み' },
defaults: ['about', 'services', 'works', 'price', 'staff', 'faq', 'map', 'form'],
legal: '士業・不動産業は、所属する会の規程や免許番号・登録番号など、表示が求められる情報があります。別途確認してください。',
concept: '相談できる内容・料金・流れを順に説明し、はじめての人の不安を減らす形。',
photo: '写真は AI で作ったイメージです(実在の事務所ではありません)。',
},
{
id: 'shop', label: '小売・地域サービス', name: 'わだち自転車店', industries: ['retail', 'auto', 'agri'],
tastes: ['friendly', 'modern', 'simple'],
secLabels: { about: 'お店について', services: '取り扱い・できること', price: '料金表', works: '入荷・作業のようす', staff: 'お店の人', map: 'お店の場所', line: 'LINEで問い合わせ', form: 'お問い合わせ' },
defaults: ['about', 'services', 'price', 'news', 'faq', 'map', 'line'],
legal: '販売する商品によっては、特定商取引法などの表示が必要です。別途確認してください。',
concept: '商品やサービスの特徴と、お店の場所・営業日をすぐ確かめられる、地域に根ざした形。',
photo: '写真は AI で作ったイメージです(実在のお店・商品ではありません)。',
},
{
id: 'corp', label: '法人向けサービス・その他', name: '株式会社しるべ', industries: ['b2b', 'logistics', 'other'],
tastes: ['modern', 'trust', 'simple', 'luxe'],
secLabels: { services: '事業内容', works: '導入事例', price: '料金・プラン', staff: 'メンバー', map: '所在地', form: 'お問い合わせ・資料請求' },
defaults: ['about', 'services', 'works', 'news', 'recruit', 'faq', 'map', 'form'],
legal: '取引先名・導入事例の掲載は、相手先の了解を確認してください。',
concept: '事業の全体像を図で示し、何を頼める会社かを短く説明する形。',
photo: '写真は AI で作ったイメージです(実在の会社・事例ではありません)。',
},
{
// 2026-11-30 指示書「建築・建設業向け日本語ホームページ|高精度再現マスタープロンプト」。建設・工事の別の見本(複数ページ)
id: 'arch', label: '建築設計事務所', name: '青景建築設計室', industries: [],
alt: ['build'], kind: '建築設計事務所の例:建築写真を大きく、狭い本文と余白で、建築誌のように読ませる複数ページ',
tastes: ['modern', 'luxe', 'trust'],
secLabels: { about: '私たちについて', services: '設計・事業内容', price: '設計料の考え方', works: '建築事例', staff: '設計チーム', faq: 'よくある質問', map: 'アクセス', line: 'LINEで相談', form: 'お問い合わせフォーム' },
defaults: ['about', 'services', 'price', 'works', 'news', 'staff', 'recruit', 'faq', 'map', 'form'],
scale: 'pre',
pages: [
{ path: '', label: 'トップ' },
{ path: '/about', label: '私たちについて' },
{ path: '/services', label: '事業内容' },
{ path: '/process', label: '設計の流れ' },
{ path: '/projects', label: '建築事例' },
{ path: '/projects/beach-house', label: '建築事例の詳細(海辺の家)' },
{ path: '/philosophy/environment', label: '環境と建築' },
{ path: '/philosophy/urban', label: '都市・地域設計' },
{ path: '/philosophy/sustainable', label: '持続可能な住宅' },
{ path: '/media', label: 'メディア掲載' },
],
legal: '建築士事務所の登録番号・管理建築士の氏名などの表示や、建設業の許可番号は、別途確認してください。資格・受賞歴・掲載歴は、実際の情報だけを載せます。',
concept: '建築写真を画面いっぱいに、本文は狭く。写真と余白の緩急で、設計の考え方と事例を建築誌のように読ませる形。',
photo: '写真は AI で作ったイメージです(実在の建物・設計実績ではありません)。',
},
];
export const SAMPLE_BY_ID = Object.fromEntries(SAMPLES.map((s) => [s.id, s])) as Record<SampleId, Sample>;
/** 診断の業種 → サンプル(知らない業種は corp) */
export const sampleOf = (industry: string | undefined): Sample => SAMPLES.find((s) => s.industries.includes(industry ?? '')) ?? SAMPLE_BY_ID.corp;
export const secLabel = (s: Sample, id: SecId) => s.secLabels[id] ?? SECTIONS.find((x) => x.id === id)!.label;
export interface MihonCfg { taste: TasteId; sections: SecId[]; scale: ScaleId; name: string }
export function normalizeCfg(id: SampleId, c: Partial<{ taste: unknown; sections: unknown; scale: unknown; name: unknown }>): MihonCfg {
const s = SAMPLE_BY_ID[id];
const taste = s.tastes.includes(c.taste as TasteId) ? (c.taste as TasteId) : s.tastes[0];
const sections = Array.isArray(c.sections) ? SEC_IDS.filter((x) => (c.sections as unknown[]).includes(x)) : [...s.defaults];
const scale = (['min', 'std', 'pre'] as const).includes(c.scale as ScaleId) ? (c.scale as ScaleId) : (s.scale ?? 'std');
const name = typeof c.name === 'string' ? c.name.replace(/[\u0000-\u001f<>]/g, '').trim().slice(0, 40) : '';
return { taste, sections, scale, name };
}
/** 名前を入れずにサンプルを開く URL(#t=雰囲気&s=節&v=規模。会社名は URL に入れない) */
export const mihonUrl = (id: SampleId, c?: Partial<MihonCfg>, page = '') => {
const n = normalizeCfg(id, c ?? {});
return `/shindan/mihon/${id}${page}#t=${n.taste}&s=${n.sections.join(',')}&v=${n.scale}`;
};
/** 業種の見本と、同じ業種で選べる別の見本(先頭が業種の既定) */
export const samplesFor = (base: Sample): Sample[] => [base, ...(base.alt ?? []).map((x) => SAMPLE_BY_ID[x])];
{
"site": "arch",
"commit": "7202f2341d9d908e05296dff438a653d0cb4111c",
"route": "/shindan/mihon/arch/projects",
"selector": ".ar-pj-top || .ar-pj-wall",
"width": 1440,
"extractedAt": "2026-12-05T08:25:30.837Z",
"htmlAttrs": [
[
"lang",
"ja"
],
[
"data-mihon",
"arch"
],
[
"data-taste",
"modern"
],
[
"data-scale",
"pre"
],
[
"data-page-title",
"建築事例"
]
],
"bodyAttrs": [
[
"class",
"ar"
]
],
"liveHtmlAttrs": [
[
"lang",
"ja"
],
[
"data-mihon",
"arch"
],
[
"data-taste",
"modern"
],
[
"data-scale",
"pre"
],
[
"data-page-title",
"建築事例"
],
[
"class",
"js"
]
],
"liveBodyAttrs": [
[
"class",
"ar"
]
],
"cssLines": 178,
"fonts": [
"var(--ar-font)",
"var(--ar-head-font)",
"system-ui, -apple-system, \"Hiragino Sans\", \"Noto Sans JP\", sans-serif"
],
"fontImports": [
"@fontsource-variable/noto-sans-jp",
"@fontsource/zen-old-mincho/500.css"
],
"assets": [
{
"name": "forest-a-1280.webp",
"from": "/media/demos/arch/forest-a-1280.webp",
"bytes": 199638,
"sha1": "5264f2251e29da390c537e0282d98fc39fb3cfb8"
},
{
"name": "forest-a-640.webp",
"from": "/media/demos/arch/forest-a-640.webp",
"bytes": 60432,
"sha1": "cd25f7729f456e48f5ec26ed6298b918fd8cdcd7"
},
{
"name": "forest-a-1872.webp",
"from": "/media/demos/arch/forest-a-1872.webp",
"bytes": 341884,
"sha1": "2e5ece6837dd5bb7d8995a55970e5c1074f0109a"
},
{
"name": "stone-a-1280.webp",
"from": "/media/demos/arch/stone-a-1280.webp",
"bytes": 136360,
"sha1": "ba7f410c1793c17a07781425d106c8c454784184"
},
{
"name": "stone-a-640.webp",
"from": "/media/demos/arch/stone-a-640.webp",
"bytes": 43044,
"sha1": "1edb02cbc1e99cdcca99354a88cb2ba8f8c56175"
},
{
"name": "stone-a-1872.webp",
"from": "/media/demos/arch/stone-a-1872.webp",
"bytes": 232670,
"sha1": "9a610aa680aa5a76e49deb503d2a2e1da81cfdd4"
},
{
"name": "courtyard-a-1280.webp",
"from": "/media/demos/arch/courtyard-a-1280.webp",
"bytes": 114482,
"sha1": "041024904c0eb93340321cb6177fde3be08e36ae"
},
{
"name": "courtyard-a-640.webp",
"from": "/media/demos/arch/courtyard-a-640.webp",
"bytes": 35566,
"sha1": "e96e1a44799f6a8c29af99dc007581e4805e3b14"
},
{
"name": "courtyard-a-1872.webp",
"from": "/media/demos/arch/courtyard-a-1872.webp",
"bytes": 200066,
"sha1": "74c49815a7b4af3a978bfd15b5e7e293e9089562"
},
{
"name": "beach-a-1280.webp",
"from": "/media/demos/arch/beach-a-1280.webp",
"bytes": 136388,
"sha1": "05abfcb77f1e1e863e554d34ecd95e7d5c2ebe56"
},
{
"name": "beach-a-640.webp",
"from": "/media/demos/arch/beach-a-640.webp",
"bytes": 37710,
"sha1": "8e895e09a52cd6423af035f6cf60567c6ab2daa1"
},
{
"name": "beach-a-1872.webp",
"from": "/media/demos/arch/beach-a-1872.webp",
"bytes": 237288,
"sha1": "5fc17362a6a7e28749cc9b9de46c4f59181151be"
},
{
"name": "mountain-a-1280.webp",
"from": "/media/demos/arch/mountain-a-1280.webp",
"bytes": 117406,
"sha1": "47db3f258cedffc63d523e2205c83bfa132d2a66"
},
{
"name": "mountain-a-640.webp",
"from": "/media/demos/arch/mountain-a-640.webp",
"bytes": 33422,
"sha1": "728c4a2707b2b373547c54fa4ab0c9f0e3607b23"
},
{
"name": "mountain-a-1872.webp",
"from": "/media/demos/arch/mountain-a-1872.webp",
"bytes": 200660,
"sha1": "3afcd64967475d79d6bba533f22fc22b945ab3e6"
},
{
"name": "reno-b-1280.webp",
"from": "/media/demos/arch/reno-b-1280.webp",
"bytes": 159736,
"sha1": "d6443c675a28fc3122329c55b2d792fe8be72954"
},
{
"name": "reno-b-640.webp",
"from": "/media/demos/arch/reno-b-640.webp",
"bytes": 49664,
"sha1": "4bc7f17efb9859ca8d44a302756806680d5aef21"
},
{
"name": "reno-b-1872.webp",
"from": "/media/demos/arch/reno-b-1872.webp",
"bytes": 267528,
"sha1": "143ad9e9e2fe8f038656605cd67c1adf48fe4b2e"
},
{
"name": "corner-a-1280.webp",
"from": "/media/demos/arch/corner-a-1280.webp",
"bytes": 104182,
"sha1": "776e98487875ee99b801014c5bba7f088cf3f7a3"
},
{
"name": "corner-a-640.webp",
"from": "/media/demos/arch/corner-a-640.webp",
"bytes": 32470,
"sha1": "97f9f303074e349c922c7e37d2eebba8a4cb5d30"
},
{
"name": "corner-a-1872.webp",
"from": "/media/demos/arch/corner-a-1872.webp",
"bytes": 183972,
"sha1": "6ca3ed78ede8b5da96f74e909e4464396574721e"
},
{
"name": "villa-c-1280.webp",
"from": "/media/demos/arch/villa-c-1280.webp",
"bytes": 167182,
"sha1": "83ef02e5525366ecd6a3f66c692fdb7cf7b65514"
},
{
"name": "villa-c-640.webp",
"from": "/media/demos/arch/villa-c-640.webp",
"bytes": 49910,
"sha1": "c4a6600ee308fe91cc40f6239acb5db8c1045bd8"
},
{
"name": "villa-c-1872.webp",
"from": "/media/demos/arch/villa-c-1872.webp",
"bytes": 281618,
"sha1": "a305b40d79276b70c42f85927938323dd1e2c38f"
},
{
"name": "office-a-1280.webp",
"from": "/media/demos/arch/office-a-1280.webp",
"bytes": 222666,
"sha1": "c181215bfa5d41f0d09903b5c5554b7ae8e65359"
},
{
"name": "office-a-640.webp",
"from": "/media/demos/arch/office-a-640.webp",
"bytes": 72882,
"sha1": "3eb74d5108e4ba9c12e62c70c49aedb0e8da45bf"
},
{
"name": "office-a-1872.webp",
"from": "/media/demos/arch/office-a-1872.webp",
"bytes": 361318,
"sha1": "dc77575274a7f74200d43fafbd4fd0ba382651c8"
},
{
"name": "slope-a-1280.webp",
"from": "/media/demos/arch/slope-a-1280.webp",
"bytes": 207294,
"sha1": "d6010c044a7a724eb8efd28b09a6d9c5cd54147c"
},
{
"name": "slope-a-640.webp",
"from": "/media/demos/arch/slope-a-640.webp",
"bytes": 64108,
"sha1": "eb5767b02fd2f7f51c950353bf5af59db7077bd3"
},
{
"name": "slope-a-1872.webp",
"from": "/media/demos/arch/slope-a-1872.webp",
"bytes": 350666,
"sha1": "d4b323bb774c4190630e3b8993ab0b2167c66960"
},
{
"name": "tradition-a-1280.webp",
"from": "/media/demos/arch/tradition-a-1280.webp",
"bytes": 237090,
"sha1": "dd5bed77661788d2b18ce37397608d3d7807953d"
},
{
"name": "tradition-a-640.webp",
"from": "/media/demos/arch/tradition-a-640.webp",
"bytes": 70924,
"sha1": "3dddc290a455bb121a9348f6c80d776243cdc28c"
},
{
"name": "tradition-a-1872.webp",
"from": "/media/demos/arch/tradition-a-1872.webp",
"bytes": 406498,
"sha1": "2de5aa63d92c19f23e9526cfbc18abafcb2ffad8"
},
{
"name": "quiet-b-1280.webp",
"from": "/media/demos/arch/quiet-b-1280.webp",
"bytes": 186220,
"sha1": "3d723373f7122a2e2ca5fc78bda843ff9fc740e8"
},
{
"name": "quiet-b-640.webp",
"from": "/media/demos/arch/quiet-b-640.webp",
"bytes": 53312,
"sha1": "b6f0a6be668e5cf05f7b6bb9ded9993fd76f06a1"
},
{
"name": "quiet-b-1872.webp",
"from": "/media/demos/arch/quiet-b-1872.webp",
"bytes": 327014,
"sha1": "c991e266c11e2852e10258be70f409bdbeaeb2bc"
}
],
"js": [
{
"from": "src/scripts/shindan/mihon-runtime.ts",
"to": "src/js/mihon-runtime.ts",
"own": false
},
{
"from": "src/scripts/shindan/mihon/arch.ts",
"to": "src/js/mihon/arch.ts",
"own": true
},
{
"from": "src/data/shindan/mihon.ts",
"to": "data/shindan/mihon.ts",
"own": false
},
{
"from": "src/scripts/shindan/mihon/arch-pages.ts",
"to": "src/js/mihon/arch-pages.ts",
"own": true
},
{
"from": "src/scripts/shindan/mihon/arch-projects.ts",
"to": "src/js/mihon/arch-projects.ts",
"own": true
}
],
"warnings": []
}{
"id": "ar-works-tiles",
"version": "1.0.0",
"title": "すき間なく並ぶ 5:4 の事例写真の壁と、乗ると降りる黒い幕・種類で絞る文字のタブ",
"category": "images",
"level": "section",
"summary": "建築事例の一覧。5:4 の写真のタイルを、幅 90.5%・3 列・すき間なしの壁に並べる(境目の髪の毛ほどの線を消すため、右と下へ 1px ずつ重ねる)。768〜1023px は 2 列、767px 以下は「幅いっぱいの 1 枚 → 2 枚並び」のくり返し。マウスが乗ると(またはフォーカスで)黒 40% の幕が 0.28 秒で降り、名前と種類が 6px 下から 0.4/0.45 秒で上がり、写真は 0.6 秒で 1.03 倍。ホバーのない端末と 767px 以下は幕を出さず、写真の下端に名前の札を常に出す。上の種類のテキストのタブ(下線が左から引かれる)で絞り込むと、壁が 0.18 秒で消え、0.18 秒後に並べ直して 0.3 秒で戻る。絞った後も写真はすき間なく並び、余った写真は中央へ寄せる(6 つ割り)。見出し・導入・タブ・写真は画面に入ると下から 0.55/0.75 秒で現れ、行の中は 80ms ずつずれる。",
"tags": ["写真の壁", "タイル", "すき間なし", "ホバーの幕", "名前の札", "絞り込み", "テキストのタブ", "中央寄せ", "現れる動き", "建築", "事例一覧"],
"provenance": {
"site": "arch",
"siteName": "青景建築設計室",
"commit": "7202f2341d9d908e05296dff438a653d0cb4111c",
"status": "APPROVED",
"route": "/shindan/mihon/arch/projects",
"selector": ".ar-pj-top || .ar-pj-wall",
"files": [
"src/scripts/shindan/mihon/arch-projects.ts(一覧の絞り込みと並べ直しの節。詳細のギャラリーの節は要素がないので何もしない)",
"src/scripts/shindan/mihon/arch.ts・arch-pages.ts(arch-projects.ts を読む入口。ヘッダー・パネル・スライダーなどは要素がないので何もしない)",
"src/scripts/shindan/mihon-runtime.ts・src/data/shindan/mihon.ts(見本の共通の器。[data-in] の現れる動き。吸収元の版の書き出しから写した共有のモジュール)",
"src/styles/mihon/arch.css",
"src/styles/mihon/arch-pages.css",
"src/styles/mihon/arch-projects.css",
"src/styles/mihon/_base.css",
"src/pages/shindan/mihon/arch/projects/index.astro(マークアップはサーバーの HTML から)",
"src/layouts/Arch.astro・Mihon.astro(字体とスクリプトの読み込みの順)"
],
"spec": "prompts/arch.md",
"basis": "provenance/decisions.json の arch(APPROVED 7202f23 は、事業者が「(公開版では省略)」と言った独自性の指示より前の最後のコミット)。一覧の作りは吸収元の projects/index.astro の注記で指示書 15 章"
},
"dependencies": {
"@fontsource-variable/noto-sans-jp": "5.3.1"
},
"license": {
"code": "便利DEネットの自社制作(見本サイトのために書いたコード。ライブラリは使わない)",
"fonts": "OFL(fontsource のパッケージから読む。字体ファイルは持ち込まない)",
"assets": "架空の設計事務所の見本のために、ローカルの ComfyUI(Z-Image Turbo)で生成した建築写真 12 枚(各 640・1280・1872w の webp)。実在の建物・実績ではない",
"reference": "参考サイト (参考サイト))。この版は指示書「高精度再現マスタープロンプト」で、参考サイトの構成を高い精度で再現したもの(事業者が「(公開版では省略)」と言った版)。参考の写真・文章・字体・コードは持ち込んでいない"
},
"export": {
"policy": "code-restyle",
"code": true,
"assets": false,
"copy": false,
"requires": [
"写真・事例の名前と種類・題名と導入文・タブの種類と件数は案件のものに差し替える(見本の写真は架空の事務所のための生成画像、事例はすべて架空)",
"この版は参考サイトの構成をそのまま再現した版なので、壁の幅と列・5:4・幕の濃さ・タブの形は案件のアートディレクションで決め直す(すき間なく並べ直す仕組み・絞り込みの手順・ホバーとタッチの出し分け・現れる動きの扱いだけを使う)",
"mihon-runtime.ts は見本の共通の器(雰囲気の切り替え・デモの安全も含む)。案件では [data-in] の現れる動きだけを持ち出し、残りは使わない"
]
},
"customizable": [
{ "name": "事例の写真と名前", "how": "markup の li.ar-pj-grid__it ごとに data-kind(絞り込みの種類)・写真・.ar-tile__ov の名前と種類・.ar-pj-tile__lb の名前・a の aria-label。li の data-m(f=スマホで幅いっぱい/h=半分)と --i(行の中の順番)は最初の並びの値で、絞り込みのたびに arch-projects.ts が付け直す" },
{ "name": "種類のタブ", "how": ".ar-pj-filter の a[data-ar-pj-kind](空=すべて)と data-label・件数。href は ?kind= の道(JS がないときもその道で開ける)" },
{ "name": "写真の形", "how": ".ar-pj-tile .ar-tile__ph の aspect-ratio: 5 / 4" },
{ "name": "列の数と幅", "how": ".ar-pj-grid の repeat(3, …)(絞り込みは 6 つ割り)、768〜1023px の 2 列(4 つ割り)、.ar-wide の 90.5%(767px 以下は 100% − 24px)" },
{ "name": "幕と札", "how": ".ar-pj-tile .ar-tile__ov の rgba(0,0,0,.4)・名前 17px、.ar-pj-tile__lb の rgba(24,24,22,.58)" },
{ "name": "色・字体", "how": "html[data-mihon='arch'] の --ar-*(--ar-font・--ar-head-font・--ar-ease・--ar-muted・--ar-text)" }
],
"invariants": [
"写真どうしはすき間なく並べる(gap 0、右と下へ 1px ずつ重ねて境目の線を消す)。角丸・影は付けない",
"絞り込んでもすき間を出さない:見えている写真だけで並べ直し、3 列で余った 1・2 枚は中央へ(6 つ割りの grid-column)。768〜1023px は 2 列で余り 1 枚を中央へ。767px 以下は「1 枚 → 2 枚並び」をくり返し、最後に半分が 1 枚だけ余るときは幅いっぱい",
"絞り込みは、壁を 0.18 秒で消してから並べ直し、0.3 秒で戻す(並びが飛ぶところを見せない)。URL の ?kind= を書き換え(履歴は増やさない)、読み込み時はそれに合わせる",
"マウスが乗る・フォーカスで、黒 40% の幕が 0.28 秒で降り、名前と種類が 6px 下から 0.4/0.45 秒(cubic-bezier(.22,1,.36,1))、写真は 0.6 秒で 1.03 倍",
"ホバーのない端末と 767px 以下は幕を出さず、写真の下端の名前の札を常に出す(ホバーだけに頼らない)",
"現れる動きは画面の下 8% の線を越えたら 1 度だけ:見出し・文は 10px 下から 0.55 秒、写真は 8px 下から 0.75 秒、行の中で 80ms ずつずらす"
],
"industries": ["architecture", "construction", "reform", "corporate", "hotel"],
"artDirections": ["ad-arch"],
"combine": {
"goodWith": ["写真が主役の実績・事例・作品の一覧ページ", "詳細のページへつなぐ入口の一覧"],
"avoid": ["写真の中に文字が入った素材(幕の名前と重なる)", "縦横の比がばらばらの写真(5:4 に切り抜くので主題が切れる)", "種類が 8 つを超えるタブ(スマホで 3 つずつの段が増える)"],
"note": "html・body・* に効く初期化の規則(_base.css)と、html[data-mihon='arch'] に置いた変数を含む。mihon-runtime.ts は document 全体の [data-in]・[data-sec]・外へのリンクを扱うので、ほかの技術と 1 枚のページに組むときは iframe で分けるか、現れる動きだけを持ち出す"
},
"performance": {
"images": "写真 12 枚 × 640・1280・1872w の webp(srcset。sizes は PC 31vw、768〜1023px 46vw、スマホは 1 枚目の型が 100vw − 24px・半分の型が 50vw)。最初の 3 枚だけ eager・fetchpriority high・decoding sync、ほかは lazy",
"animation": "CSS の opacity・transform の transition だけ。JS は class と data-* を付け替えるだけで、毎コマの計算はしない",
"notes": "素材のファイルの合計はレジストリの files を参照"
},
"responsive": {
"breakpoints": ["1023px(768〜1023px は 2 列)", "767px(1 枚 → 2 枚並びのくり返し・名前の札を常に・幕なし・タブを 3 つずつ 2 段)", "(hover: none)(幕なし・名前の札を常に)"],
"verified": ["1440×900", "390×844"]
},
"accessibility": {
"roles": "一覧は ul(aria-label=建築事例の一覧)。タイルは a で、aria-label に「名前(種類)」。幕と札は aria-hidden。タブは role=group(aria-label=事例の種類で絞り込む)のリンクで、選んだものに aria-current",
"live": "利用者が絞り込んだときだけ、aria-live=polite で「住宅の事例を 8 件表示しています」",
"focus": "タイルは :focus-visible で白い 2px の線(内側 8px)と幕を出す。タブは .ar :focus-visible(2px・--ar-accent)",
"keys": "タブはリンクなので Tab と Enter で選べる(JS がないときは ?kind= の道へ移る)"
},
"reducedMotion": {
"rule": "この版(7202f23)では、器 mihon-runtime.ts が localStorage の bdn-motion=off、または OS の「動きを減らす」で html.reduced を付ける(ソースで確かめた。のちの版の「動き:オフのときだけ止める」の決まり(2026-11-30)より前の版)。LAB のデモは ?motion=off で html.reduced を付ける",
"whenOff": "現れる動きはなし(はじめから見せる)。絞り込みは消さずにその場で並べ直す。幕・写真の拡大・タブの下線は移り変わりなし(html.reduced .ar * の transition 0.01ms・animation なし)"
},
"verify": {
"selector": "#ar-main",
"selectorNote": "写す範囲は .ar-pj-top(題名・導入・種類のタブ)と .ar-pj-wall(写真の壁)。吸収元の main はこの 2 つだけなので、比べるのは main",
"frames": [0, 200, 450, 700, 1000, 1080, 1150, 1250, 1400, 1700, 2200, 2280, 2400, 2600, 3000],
"framesNote": "0〜700 は main の上端まで送った直後に 2 段目の写真が現れる動き。1000・2200 は操作の直後で、時計を進める前のコマ",
"actions": [
{ "at": 1000, "focus": "[data-ar-pj-kind='house']", "key": "Enter", "note": "「住宅」で絞り込む(壁が 0.18 秒で消え、並べ直して 0.3 秒で戻る。8 件で、最後の 2 枚は中央へ。タブの下線が移る)。タブはリンクで、道具の click(合成の MouseEvent、cancelable なし)では preventDefault が効かずに移ってしまうので、フォーカスして Enter で押す" },
{ "at": 2200, "hover": ".ar-pj-grid__it:nth-child(1) .ar-pj-tile", "note": "1 枚目にマウスを乗せる(PC は黒い幕と名前、どちらも写真が 1.03 倍)" }
],
"recordMs": 3600
}
}