page-layouts.mdx 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. ---
  2. title: Page layouts
  3. description: Learn how to build a sample version of the dashboard
  4. ---
  5. <Callout>
  6. Before you start with this section, make sure you have followed the [installation guideline](/docs/getting-started/download).
  7. </Callout>
  8. ## Sample layout
  9. ```html example code fullpage resizable height="30rem"
  10. <div class="page">
  11. <header class="navbar navbar-expand-sm navbar-light d-print-none">
  12. <div class="container-xl">
  13. <h1 class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
  14. <a href="#">
  15. <img src="https://preview.tabler.io/static/logo.svg" width="110" height="32" alt="Tabler" class="navbar-brand-image" />
  16. </a>
  17. </h1>
  18. <div class="navbar-nav flex-row order-md-last">
  19. <div class="nav-item">
  20. <a href="#" class="nav-link d-flex lh-1 text-reset p-0">
  21. <span class="avatar avatar-sm" style="background-image: url(/samples/avatars/002m.jpg)"></span>
  22. <div class="d-none d-xl-block ps-2">
  23. <div>Paweł Kuna</div>
  24. <div class="mt-1 small text-muted">UI Designer</div>
  25. </div>
  26. </a>
  27. </div>
  28. </div>
  29. </div>
  30. </header>
  31. <div class="page-wrapper">
  32. <div class="page-body">
  33. <div class="container-xl">
  34. <div class="row row-deck row-cards">
  35. <div class="col-4">
  36. <div class="card">
  37. <div class="card-body" style="height: 10rem"></div>
  38. </div>
  39. </div>
  40. <div class="col-4">
  41. <div class="card">
  42. <div class="card-body" style="height: 10rem"></div>
  43. </div>
  44. </div>
  45. <div class="col-4">
  46. <div class="card">
  47. <div class="card-body" style="height: 10rem"></div>
  48. </div>
  49. </div>
  50. <div class="col-12">
  51. <div class="card">
  52. <div class="card-body" style="height: 10rem"></div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. ```
  61. ## Sidebar layout
  62. ```html example code fullpage resizable height="30rem"
  63. <div class="page">
  64. <!-- Sidebar -->
  65. <aside class="navbar navbar-vertical navbar-expand-sm navbar-dark">
  66. <div class="container-fluid">
  67. <button class="navbar-toggler" type="button">
  68. <span class="navbar-toggler-icon"></span>
  69. </button>
  70. <h1 class="navbar-brand navbar-brand-autodark">
  71. <a href="#">
  72. <img src="https://preview.tabler.io/static/logo-white.svg" width="110" height="32" alt="Tabler" class="navbar-brand-image">
  73. </a>
  74. </h1>
  75. <div class="collapse navbar-collapse" id="sidebar-menu">
  76. <ul class="navbar-nav pt-lg-3">
  77. <li class="nav-item">
  78. <a class="nav-link" href="./">
  79. <span class="nav-link-title">
  80. Home
  81. </span>
  82. </a>
  83. </li>
  84. <li class="nav-item">
  85. <a class="nav-link" href="#">
  86. <span class="nav-link-title">
  87. Link 1
  88. </span>
  89. </a>
  90. </li>
  91. <li class="nav-item">
  92. <a class="nav-link" href="#">
  93. <span class="nav-link-title">
  94. Link 2
  95. </span>
  96. </a>
  97. </li>
  98. <li class="nav-item">
  99. <a class="nav-link" href="#">
  100. <span class="nav-link-title">
  101. Link 3
  102. </span>
  103. </a>
  104. </li>
  105. </ul>
  106. </div>
  107. </div>
  108. </aside>
  109. <div class="page-wrapper">
  110. <div class="page-header d-print-none">
  111. <div class="container-xl">
  112. <div class="row g-2 align-items-center">
  113. <div class="col">
  114. <h2 class="page-title">
  115. Vertical layout
  116. </h2>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="page-body">
  122. <div class="container-xl">
  123. <div class="row row-deck row-cards">
  124. <div class="col-sm-6 col-lg-3">
  125. <div class="card">
  126. <div class="card-body" style="height: 10rem"></div>
  127. </div>
  128. </div>
  129. <div class="col-sm-6 col-lg-3">
  130. <div class="card">
  131. <div class="card-body" style="height: 10rem"></div>
  132. </div>
  133. </div>
  134. <div class="col-sm-6 col-lg-3">
  135. <div class="card">
  136. <div class="card-body" style="height: 10rem"></div>
  137. </div>
  138. </div>
  139. <div class="col-sm-6 col-lg-3">
  140. <div class="card">
  141. <div class="card-body" style="height: 10rem"></div>
  142. </div>
  143. </div>
  144. <div class="col-lg-6">
  145. <div class="row row-cards">
  146. <div class="col-12">
  147. <div class="card">
  148. <div class="card-body" style="height: 10rem"></div>
  149. </div>
  150. </div>
  151. <div class="col-12">
  152. <div class="card">
  153. <div class="card-body" style="height: 10rem"></div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="col-lg-6">
  159. <div class="card">
  160. <div class="card-body" style="height: 10rem"></div>
  161. </div>
  162. </div>
  163. <div class="col-12">
  164. <div class="card">
  165. <div class="card-body" style="height: 10rem"></div>
  166. </div>
  167. </div>
  168. <div class="col-md-12 col-lg-8">
  169. <div class="card">
  170. <div class="card-body" style="height: 10rem"></div>
  171. </div>
  172. </div>
  173. <div class="col-md-6 col-lg-4">
  174. <div class="card">
  175. <div class="card-body" style="height: 10rem"></div>
  176. </div>
  177. </div>
  178. <div class="col-md-6 col-lg-4">
  179. <div class="card">
  180. <div class="card-body" style="height: 10rem"></div>
  181. </div>
  182. </div>
  183. <div class="col-md-12 col-lg-8">
  184. <div class="card">
  185. <div class="card-body" style="height: 10rem"></div>
  186. </div>
  187. </div>
  188. <div class="col-12">
  189. <div class="card">
  190. <div class="card-body" style="height: 10rem"></div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. ```