pagination
شاشة القائمة شاشة قائمة عامة فيها عنوان وشريط أدوات وصفوف، تعمل على سطح المكتب وعلى الهاتف.
شريط من روابط عادية مرقّمة، حتى يظل التنقّل بين الصفحات يعمل مع تعطيل JavaScript.
كل مثال يعمل فعلًا، لكن روابطه لا تؤدي إلى أي مكان. يعرض HTML الترميز الجاهز للنسخ.
في وسط قائمة طويلة
<nav rst-pagination aria-label ="صفحات المنشورات" >
<a href ="/posts?page=3" rst-pagination-step ="prev" ><svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg ><span rst-pagination-word >السابق</span ></a >
<a href ="/posts?page=1" >1</a >
<span rst-pagination-gap aria-hidden ="true" >…</span >
<a href ="/posts?page=3" rst-pagination-wide >3</a >
<span aria-current ="page" >4</span >
<a href ="/posts?page=5" rst-pagination-wide >5</a >
<span rst-pagination-gap aria-hidden ="true" >…</span >
<a href ="/posts?page=9" >9</a >
<a href ="/posts?page=5" rst-pagination-step ="next" ><svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg ><span rst-pagination-word >التالي</span ></a >
</nav >
في تطبيق حقيقي سيصل هذا إلى /posts?page=1, /posts?page=3, /posts?page=5, /posts?page=9. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.
الصفحة الأولى، بالاسم الوصفي الافتراضي
aria-label لعنصر nav هو الكلمة البسيطة "ترقيم الصفحات". قل أي قائمة يقسّمها حين يكون في الصفحة أكثر من واحدة.
<nav rst-pagination aria-label ="ترقيم الصفحات" >
<span rst-pagination-disabled rst-pagination-step ="prev" ><svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg ><span rst-pagination-word >السابق</span ></span >
<span aria-current ="page" >1</span >
<a href ="/posts?page=2" >2</a >
<a href ="/posts?page=2" rst-pagination-step ="next" ><svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg ><span rst-pagination-word >التالي</span ></a >
</nav >
في تطبيق حقيقي سيصل هذا إلى /posts?page=2. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.