Guest User

Untitled

a guest
Aug 4th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. <div class="sidebar" x-data="{ showNav: false }">
  2. {{ if collection.handle == 'pages' || current_template == '2014-2020/show' || current_template == '2021-2027/show' }}
  3. {{ nav scope="item2"}}
  4. {{ if depth == 2 && (is_current || is_parent) }}
  5. <a class="active-page{{ if is_current }} active{{ /if }}" href="{{ url }}">{{ title }}</a>
  6. <button class="active-page mobile" @click.prevent="showNav = !showNav">
  7. <svg :class="{ 'rotate-180': showNav }" aria-hidden="true">
  8. <use xlink:href="#icon-angle-down"></use>
  9. </svg>
  10. {{ title }}
  11. </button>
  12. <ul class="sidebar-nav" :class="{ 'show-nav': showNav }">
  13. {{ children scope="item"}}
  14. {{ if item.entry_id == "f43f08d8-a6ad-4460-9bea-e03577545828" }}
  15. <li class="nav-item">
  16. <a href="/" target="_blank" rel="noopener">
  17. {{ trans:strings.portfolio_archive }}
  18. </a>
  19. </li>
  20. {{ /if }}
  21. <li class="nav-item"
  22. {{ if item.children }}
  23. {{ if item.is_current || item.is_parent }}
  24. x-data="{ subnavOpen: true }"
  25. {{ else }}
  26. x-data="{ subnavOpen: false }"
  27. {{ /if}}
  28. {{ /if}}
  29. >
  30. <a href="{{ item.url }}" class="{{ if item.is_current }}active{{ /if }}{{ if item.children }} is-parent{{ /if }}">
  31. {{ item.title }}
  32. {{ if item.children }}
  33. <button class="toogle-submenu" @click.prevent="subnavOpen = !subnavOpen">
  34. <svg :class="{ 'rotate-180': subnavOpen }" aria-hidden="true">
  35. <use xlink:href="#icon-angle-down-small"></use>
  36. </svg>
  37. </button>
  38. {{ /if }}
  39. </a>
  40. {{ if item.children }}
  41. <ul class="second-nav"
  42. x-show="subnavOpen"
  43. x-cloak
  44. >
  45. {{ item.children scope="item2"}}
  46. <li class="second-nav-item{{ if item2.children }} parent{{ /if}}"
  47. {{ if item2.children }}
  48. {{ if item2.is_current || item2.is_parent }}
  49. x-data="{ subnavOpen2: true }"
  50. {{ else }}
  51. x-data="{ subnavOpen2: false }"
  52. {{ /if}}
  53. {{ /if}}
  54. >
  55. <a href="{{ item2.url }}"{{ if item2.is_current }} class="active"{{ /if }}>
  56. {{ item2.title }}
  57. {{ if item2.children }}
  58. <button class="toogle-submenu" @click.prevent="subnavOpen2 = !subnavOpen2">
  59. <svg :class="{ 'rotate-180': subnavOpen2 }" aria-hidden="true">
  60. <use xlink:href="#icon-angle-down-small"></use>
  61. </svg>
  62. </button>
  63. {{ /if }}
  64. </a>
  65. {{ if item2.children }}
  66. <ul class="second-nav"
  67. x-show="subnavOpen2"
  68. x-cloak
  69. >
  70. {{ item2.children }}
  71. <li class="second-nav-item">
  72. <a href="{{ url }}"{{ if is_current }} class="active"{{ /if }}>{{ title }}</a>
  73. </li>
  74. {{ /item2.children }}
  75. </ul>
  76. {{ /if }}
  77. </li>
  78. {{ /item.children }}
  79. </ul>
  80. {{ /if }}
  81. </li>
  82. {{ /children }}
  83. </ul>
  84. {{ else }}
  85. {{ if children }}
  86. {{ *recursive children* }}
  87. {{ /if }}
  88. {{ /if }}
  89. {{ /nav }}
  90. {{ /if }}
  91. </div> <!-- .sidebar -->
  92.  
Advertisement
Add Comment
Please, Sign In to add comment