components-pagination.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. Pagination
  2. ===============================================================================
  3. .. lead:: Provide pagination links for your site or app with the multi-page
  4. pagination component, or the simpler pager alternative.
  5. .. ----------------------------------------------------------------------------
  6. Default pagination
  7. ------------------
  8. Simple pagination inspired by Rdio, great for apps and search results. The
  9. large block is hard to miss, easily scalable, and provides large click areas.
  10. .. container:: bs-example
  11. .. class:: pagination
  12. * `« <#>`_
  13. * `1 <#>`_
  14. * `2 <#>`_
  15. * `3 <#>`_
  16. * `4 <#>`_
  17. * `5 <#>`_
  18. * `» <#>`_
  19. .. code::
  20. :class: highlight
  21. .. class:: pagination
  22. * `« <#>`_
  23. * `1 <#>`_
  24. * `2 <#>`_
  25. * `3 <#>`_
  26. * `4 <#>`_
  27. * `5 <#>`_
  28. * `» <#>`_
  29. Disabled and active states
  30. --------------------------
  31. Links are customizable for different circumstances. Use `.disabled` for
  32. unclickable links and `.active` to indicate the current page.
  33. .. container:: bs-example
  34. .. class:: pagination
  35. * .. item-class:: disabled
  36. `« <#>`_
  37. * .. item-class:: active
  38. `1 <#>`_
  39. * `2 <#>`_
  40. * `3 <#>`_
  41. * `4 <#>`_
  42. * `5 <#>`_
  43. * `» <#>`_
  44. .. code::
  45. :class: highlight
  46. .. class:: pagination
  47. * .. item-class:: disabled
  48. `« <#>`_
  49. * .. item-class:: active
  50. `1 <#>`_
  51. * `2 <#>`_
  52. * `3 <#>`_
  53. * `4 <#>`_
  54. * `5 <#>`_
  55. * `» <#>`_
  56. Sizing
  57. ------
  58. Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
  59. additional sizes.
  60. .. container:: bs-example
  61. .. class:: pagination pagination-lg
  62. * `« <#>`_
  63. * `1 <#>`_
  64. * `2 <#>`_
  65. * `3 <#>`_
  66. * `4 <#>`_
  67. * `5 <#>`_
  68. * `» <#>`_
  69. |
  70. .. class:: pagination
  71. * `« <#>`_
  72. * `1 <#>`_
  73. * `2 <#>`_
  74. * `3 <#>`_
  75. * `4 <#>`_
  76. * `5 <#>`_
  77. * `» <#>`_
  78. |
  79. .. class:: pagination pagination-sm
  80. * `« <#>`_
  81. * `1 <#>`_
  82. * `2 <#>`_
  83. * `3 <#>`_
  84. * `4 <#>`_
  85. * `5 <#>`_
  86. * `» <#>`_
  87. .. code::
  88. :class: highlight
  89. .. class:: pagination pagination-lg
  90. ...
  91. .. class:: pagination
  92. ...
  93. .. class:: pagination pagination-sm
  94. ...
  95. Pager
  96. ===============================================================================
  97. Quick previous and next links for simple pagination implementations with light
  98. markup and styles. It's great for simple sites like blogs or magazines.
  99. Default example
  100. ---------------
  101. By default, the pager centers links.
  102. .. container:: bs-example
  103. .. class:: pager
  104. * `Previous <#>`_
  105. * `Next <#>`_
  106. .. code::
  107. :class: highlight
  108. .. class:: pager
  109. * `Previous <#>`_
  110. * `Next <#>`_
  111. Aligned links
  112. -------------
  113. Alternatively, you can align each link to the sides:
  114. .. container:: bs-example
  115. .. class:: pager
  116. * .. item-class:: previous
  117. `← Older <#>`_
  118. * .. item-class:: next
  119. `Newer → <#>`_
  120. .. code::
  121. :class: highlight
  122. .. class:: pager
  123. * .. item-class:: previous
  124. `← Older <#>`_
  125. * .. item-class:: next
  126. `Newer → <#>`_
  127. Optional disabled state
  128. -----------------------
  129. Pager links also use the general `disabled` utility class from the pagination.
  130. .. container:: bs-example
  131. .. class:: pager
  132. * .. item-class:: previous disabled
  133. `← Older <#>`_
  134. * .. item-class:: next
  135. `Newer → <#>`_
  136. .. code::
  137. :class: highlight
  138. .. class:: pager
  139. * .. item-class:: previous disabled
  140. `← Older <#>`_
  141. * .. item-class:: next
  142. `Newer → <#>`_