本文へ移動
セクション
Fiesta

media-grid

一覧画面 一般的な一覧画面。タイトル、ツールバー、行があり、デスクトップでもモバイルでも動きます。

画像タイルのグリッドです。すべての枠が 4:3 なので、縦長のスクリーンショットも横長のバナーも、ひとつの揃ったグリッドに収まります。

どの例も実際に動きますが、リンクはどこにも移動しません。 HTML にはコピーできるマークアップがあります。

スクリーンショット、ロゴ、バナー

ロゴやバナーには rst-media-frame="contain" を付けます。スクリーンショットは既定のままで、上部を表示します。説明のないタイルには「説明なし」と表示されます。

プレビュー

これは <div rst-list> の中に置きます。

<div rst-media>
  <div rst-media-tile>
    <div rst-media-frame>
      <img src="../assets/sample-checkout.svg" alt="" loading="lazy" decoding="async" width="1280" height="3200">
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/1">チェックアウト、ステップ 2</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="チェックアウト、ステップ 2 の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/1/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/1/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc>支払いのステップ。カードのフォームが開いています。</p>
      <p rst-media-meta>1280 × 3200 · 412 KB</p>
    </div>
  </div>
  <div rst-media-tile>
    <div rst-media-frame>
      <img src="../assets/sample-pricing.svg" alt="" loading="lazy" decoding="async" width="1280" height="2400">
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/2">料金ページ</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="料金ページ の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/2/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/2/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc="none">説明なし</p>
      <p rst-media-meta>1280 × 2400 · 318 KB</p>
    </div>
  </div>
  <div rst-media-tile>
    <div rst-media-frame="contain">
      <img src="../assets/sample-logo.svg" alt="Harbour" loading="lazy" decoding="async" width="240" height="240">
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/3">Harbour のロゴ</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="Harbour のロゴ の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/3/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/3/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc>マークだけ。ダークとライトの背景向けです。</p>
      <p rst-media-meta>240 × 240 · 3 KB</p>
    </div>
  </div>
  <div rst-media-tile>
    <div rst-media-frame="contain">
      <img src="../assets/sample-banner.svg" alt="" loading="lazy" decoding="async" width="1200" height="200">
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/4">春のバナー</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="春のバナー の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/4/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/4/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc>3月のショップ上部の帯。</p>
      <p rst-media-meta>1200 × 200 · 64 KB</p>
    </div>
  </div>
</div>

アプリの中なら、これは /images/1, /images/1/delete, /images/1/edit, /images/2, /images/2/delete, /images/2/edit, /images/3, /images/3/delete, /images/3/edit, /images/4, /images/4/delete, /images/4/edit に届きます。ここではリンクもフォームもどこにも行きません。

選択モード、タイルをひとつ選択中

グリッドと bulk-bar をひとつのフォームで囲みます。各タイルのチェックボックスは "id" という名前で値を送信します。アプリが別の名前を期待するなら変えてください。フォームの中では、メニュー項目はリンクでなければなりません。

プレビュー

これは <div rst-list> の中に置きます。

<div rst-media>
  <div rst-media-tile>
    <div rst-media-frame>
      <img src="../assets/sample-checkout.svg" alt="" loading="lazy" decoding="async" width="1280" height="3200">
      <label rst-selbox>
        <input type="checkbox" name="id" value="1" checked aria-label="チェックアウト、ステップ 2 を選択">
      </label>
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/1">チェックアウト、ステップ 2</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="チェックアウト、ステップ 2 の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/1/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/1/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc>支払いのステップ。カードのフォームが開いています。</p>
      <p rst-media-meta>1280 × 3200 · 412 KB</p>
    </div>
  </div>
  <div rst-media-tile>
    <div rst-media-frame>
      <img src="../assets/sample-pricing.svg" alt="" loading="lazy" decoding="async" width="1280" height="2400">
      <label rst-selbox>
        <input type="checkbox" name="id" value="2" aria-label="料金ページ を選択">
      </label>
    </div>
    <div rst-media-caption>
      <div rst-media-name>
        <a href="/images/2">料金ページ</a>
        <details rst-row-menu name="rst-menus">
          <summary aria-label="料金ページ の操作">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <a href="/images/2/edit">編集</a>
            <hr>
            <a class="rst-danger" href="/images/2/delete">削除…</a>
          </div>
        </details>
      </div>
      <p rst-media-desc="none">説明なし</p>
      <p rst-media-meta>1280 × 2400 · 318 KB</p>
    </div>
  </div>
</div>

アプリの中なら、これは /images/1, /images/1/delete, /images/1/edit, /images/2, /images/2/delete, /images/2/edit に届きます。ここではリンクもフォームもどこにも行きません。