الانتقال إلى المحتوى
الأقسام
Fiesta

list-bar-search

شاشة القائمة شاشة قائمة عامة فيها عنوان وشريط أدوات وصفوف، تعمل على سطح المكتب وعلى الهاتف.

نموذج بحث قائم بذاته للقوائم التي تبحث فقط. نموذج method="get" عادي.

كل مثال يعمل فعلًا، لكن روابطه لا تؤدي إلى أي مكان. يعرض HTML الترميز الجاهز للنسخ.

مع استعلام

الرمز ✕ رابط إلى الشاشة نفسها بعد إسقاط الاستعلام. ويسافر مرشّح الحالة في حقل مخفي فيبقى.

معاينة

ضع هذا داخل <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <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="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" value="spam" placeholder="ابحث في التعليقات" aria-label="ابحث في التعليقات">
    <a rst-search-clear href="/comments?status=held" 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"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
    </a>
    <input type="hidden" name="status" value="held">
    <button class="rst-sr-only" type="submit">بحث</button>
  </form>
</search>

في تطبيق حقيقي سيصل هذا إلى /comments, /comments?status=held. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.

مع استعلام، في الصفحة 4

يسافر رقم الصفحة في حقل مخفي، فيحمل البحث الجديد ‎page=4‎ إلى مجموعة نتائج لم تعد فيها أربع صفحات. ورابط ✕ يُسقطه: وجّهه إلى الصفحة الأولى من القائمة.

معاينة

ضع هذا داخل <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <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="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" value="spam" placeholder="ابحث في التعليقات" aria-label="ابحث في التعليقات">
    <a rst-search-clear href="/comments" 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"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
    </a>
    <input type="hidden" name="page" value="4">
    <button class="rst-sr-only" type="submit">بحث</button>
  </form>
</search>

في تطبيق حقيقي سيصل هذا إلى /comments. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.

فارغ، والاسم الوصفي من الفهرس

بلا ‎placeholder‎. الاسم الذي يُتاح لحقل الإدخال هو ‎aria-label‎ الخاص به، ويكتبه التطبيق بلغة الصفحة.

معاينة

ضع هذا داخل <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <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="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" aria-label="بحث">
    <button class="rst-sr-only" type="submit">بحث</button>
  </form>
</search>

في تطبيق حقيقي سيصل هذا إلى /comments. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.