media-grid
Màn hình danh sách Màn hình danh sách thông thường: tiêu đề, thanh công cụ và các hàng, chạy được cả trên máy tính lẫn điện thoại.
Một lưới các ô hình ảnh. Mỗi khung là 4:3, nên ảnh chụp màn hình cao và biểu ngữ rộng nằm gọn trong cùng một lưới đều.
Mỗi ví dụ đều hoạt động thật, nhưng các liên kết trong đó không dẫn đến đâu. HTML hiển thị mã đánh dấu để sao chép.
Ảnh chụp màn hình, một logo và một biểu ngữ
Cho logo hoặc biểu ngữ rst-media-frame="contain". Ảnh chụp màn hình giữ mặc định và hiện phần trên cùng. Ô không có mô tả sẽ ghi "Không có mô tả".
Đặt đoạn này bên trong <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" >Thanh toán, bước 2</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Thanh toán, bước 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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/1/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc >Bước thanh toán, với biểu mẫu thẻ đang mở.</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" >Trang giá</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Trang giá" >
<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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/2/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc ="none" >Không có mô tả</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" >Logo Harbour</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Logo 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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/3/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc >Biểu tượng riêng, dùng trên nền tối và nền sáng.</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" >Biểu ngữ mùa xuân</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Biểu ngữ mùa xuân" >
<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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/4/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc >Dải ở đầu cửa hàng vào tháng Ba.</p >
<p rst-media-meta >1200 × 200 · 64 KB</p >
</div >
</div >
</div >
Trong một ứng dụng, phần này sẽ đi tới /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. Ở đây các liên kết và biểu mẫu của nó không dẫn đến đâu.
Chế độ chọn, một ô được chọn
Bọc lưới và một bulk-bar trong cùng một biểu mẫu. Hộp kiểm của mỗi ô gửi giá trị của nó dưới tên "id"; đổi tên nếu ứng dụng của bạn mong một tên khác. Trong biểu mẫu, các mục menu phải là liên kết.
Đặt đoạn này bên trong <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 ="Chọn Thanh toán, bước 2" >
</label >
</div >
<div rst-media-caption >
<div rst-media-name >
<a href ="/images/1" >Thanh toán, bước 2</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Thanh toán, bước 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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/1/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc >Bước thanh toán, với biểu mẫu thẻ đang mở.</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 ="Chọn Trang giá" >
</label >
</div >
<div rst-media-caption >
<div rst-media-name >
<a href ="/images/2" >Trang giá</a >
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Thao tác cho Trang giá" >
<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" >Sửa</a >
<hr >
<a class ="rst-danger" href ="/images/2/delete" >Xóa…</a >
</div >
</details >
</div >
<p rst-media-desc ="none" >Không có mô tả</p >
<p rst-media-meta >1280 × 2400 · 318 KB</p >
</div >
</div >
</div >
Trong một ứng dụng, phần này sẽ đi tới /images/1, /images/1/delete, /images/1/edit, /images/2, /images/2/delete, /images/2/edit. Ở đây các liên kết và biểu mẫu của nó không dẫn đến đâu.