sidebar.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  2. <a href="{{ '/index.html' | prepend: site.baseurl }}" class="brand-link logo-switch">
  3. <img src="{{ '/assets/img/logo-xs.png' | prepend: site.baseurl }}" alt="AdminLTE Docs Logo Small" class="brand-image-xl logo-xs">
  4. <img src="{{ '/assets/img/logo-xl.png' | prepend: site.baseurl }}" alt="AdminLTE Docs Logo Large" class="brand-image-xs logo-xl" style="left: 12px">
  5. </a>
  6. <div class="sidebar">
  7. <div class="form-inline mt-2">
  8. <div class="input-group" data-widget="sidebar-search">
  9. <input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search">
  10. <div class="input-group-append">
  11. <button class="btn btn-sidebar">
  12. <i class="fas fa-search fa-fw"></i>
  13. </button>
  14. </div>
  15. </div>
  16. </div>
  17. <nav class="mt-2">
  18. <ul class="nav nav-pills nav-sidebar nav-child-indent flex-column" data-widget="treeview" role="menu">
  19. {% for item in site.navigation -%}
  20. {%- assign subitem_active = 'false' -%}
  21. {%- for subitem in item.subitems -%}
  22. {%- assign subitem_url = '/' | append: subitem.url -%}
  23. {%- if subitem_url == page.url -%}
  24. {%- assign subitem_active = 'true' -%}
  25. {%- endif -%}
  26. {%- endfor %}
  27. <li class="nav-item{% if subitem_active == 'true' %} menu-open{% endif %}">
  28. {% if item.url == 'index.html' -%}
  29. {%- assign item_url = '/' -%}
  30. {%- else -%}
  31. {%- assign item_url = '/' | append: item.url -%}
  32. {%- endif %}
  33. <a href="{% if item.url %}{{ item.url | prepend: "/" | prepend: site.baseurl }}{% else %}#{% endif %}" class="nav-link{% if item_url == page.url %} active{% endif %}{% if subitem_active == 'true'%} active{% endif %}">
  34. <i class="nav-icon {{ item.icon }}"></i>
  35. <p>
  36. {{ item.title }}
  37. {% if item.subitems %}<i class="right fas fa-angle-left"></i>{% endif %}
  38. </p>
  39. </a>
  40. {% if item.subitems -%}
  41. <ul class="nav nav-treeview">
  42. {% for subitem in item.subitems -%}
  43. {%- assign subitem_url = '/' | append: subitem.url -%}
  44. <li class="nav-item">
  45. <a href="{{ subitem.url | prepend: "/" | prepend: site.baseurl }}" class="nav-link{% if subitem_url == page.url %} active{% endif %}">
  46. <i class="far fa-circle nav-icon"></i>
  47. <p>{{ subitem.title }}</p>
  48. </a>
  49. </li>
  50. {%- endfor %}
  51. </ul>
  52. {%- endif %}
  53. </li>
  54. {% endfor %}
  55. </ul>
  56. </nav>
  57. </div>
  58. </aside>