offcanvas.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. menu: base.offcanvas
  3. title: Offcanvas
  4. page-header: Offcanvas
  5. ---
  6. {% assign directions = 'start,end,top,bottom' | split: ',' %}
  7. <div class="card">
  8. <div class="card-body">
  9. {% for direction in directions %}
  10. <a class="btn" data-bs-toggle="offcanvas" href="#offcanvas{{ direction | capitalize }}" role="button" aria-controls="offcanvas{{ direction | capitalize }}">
  11. Toggle {{ direction }} offcanvas
  12. </a>
  13. {% endfor %}
  14. </div>
  15. </div>
  16. {% for direction in directions %}
  17. <div class="offcanvas offcanvas-{{ direction }}" tabindex="-1" id="offcanvas{{ direction | capitalize }}" aria-labelledby="offcanvas{{ direction | capitalize }}Label">
  18. <div class="offcanvas-header">
  19. <h2 class="offcanvas-title" id="offcanvas{{ direction | capitalize }}Label">{{ direction | capitalize }} offcanvas</h2>
  20. <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  21. </div>
  22. <div class="offcanvas-body">
  23. <div>
  24. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab assumenda ea est, eum exercitationem fugiat illum itaque laboriosam magni necessitatibus, nemo nisi numquam quae reiciendis repellat sit soluta unde. Aut!
  25. </div>
  26. <div class="mt-3">
  27. <button class="btn btn-primary" type="button" data-bs-dismiss="offcanvas">
  28. Close offcanvas
  29. </button>
  30. </div>
  31. </div>
  32. </div>
  33. {% endfor %}