templates/includes/shared/navigation.html.twig line 1

Open in your IDE?
  1. {# navigation ul #}
  2. {# - item ( Onze oplossingen ) ul>ul #}
  3. {# - subitem ( [icon] koel en vriescellen ) ul>ul>ul #}
  4. {# - subsubitem (Koelen) #}
  5. {# - subsubitem (vriezen) #}
  6. {# - subsubitem (speciale toepassingen) #}
  7. {# - subitem ( [icon] ProcesKoeling ) ul>ul>ul #}
  8. {# - subsubitem (2-a) #}
  9. {# - subsubitem (2-b) #}
  10. {# - subitem ( [icon] Klimaatbeheersing ) ul>ul>ul #}
  11. {# - subsubitem (3-a) #}
  12. {# - subsubitem (3-b) #}
  13. {# - subitem ( [icon] Klimaatbeheersing ) ul>ul>ul #}
  14. {# - subsubitem (4-a) #}
  15. {# - subsubitem (4-b) #}
  16. {# - subsubitem (4-c) #}
  17. {# - item (branches) ul>ul #}
  18. {# - voedingsindustrie #}
  19. {# - subitem #}
  20. {# - subitem #}
  21. {# - item (actueel) #}
  22. {# - item (projecten) #}
  23. {# - item (over Coolworld) ul>ul #}
  24. {# - subitem #}
  25. {# - subitem #}
  26. {# - subitem #}
  27. {#- item (Werken bij) #}
  28. <ul class="{{ editmode ? "" : "lg:flex font-bold text-base" }}">
  29.     {% for mainNavigationItem in pimcore_block('mainNavigationItems', {'limit': 6,'class':"navigation editmode-iterator-styling" }).iterator %}
  30.         <li
  31.             class="px-5 border-b w-full py-2.5 border-b-gray-200 lg:border-none lg:px-0 lg:py-0 lg:mr-4 lg:border-red xl:mr-6 lg:w-auto"
  32.             x-data="{ isOpen: false }"
  33.             @mouseover="window.innerWidth > 1024 ? isOpen = true : ''"
  34.             @mouseover.away = "isOpen = false"
  35.         >
  36.             <div class="flex items-center justify-between lg:justify-start">
  37.                 {{ pimcore_link('link', {'class': "lg:text-white no-underline relative py-2"}) }}
  38.                 {% if pimcore_block('subnavigationitems').getCount %}
  39.                     <button
  40.                         class="ml-2 cursor-pointer text-gray lg:text-white py-1 px-1.5"
  41.                         :class="{ 'rotate-180': isOpen }"
  42.                         @click="isOpen = !isOpen"
  43.                         >
  44.                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="10"><path fill="currentColor" fill-rule="evenodd" d="m.39 2.36 6.73 6.964c.24.248.575.388.926.388.35 0 .685-.14.925-.388l6.732-6.964a1.206 1.206 0 0 0-.068-1.748l-.114-.09a1.297 1.297 0 0 0-1.669.154L8.045 6.684 2.239.677A1.295 1.295 0 0 0 .456.612 1.205 1.205 0 0 0 .389 2.36Z"/></svg>
  45.                     </button>
  46.                 {% endif %}
  47.             </div>
  48.             {% if editmode or pimcore_block('subnavigationitems').getCount %}
  49.                 <ul
  50.                     class="{{ editmode ?: "subnavigation" }} font-normal pt-2.5 lg:z-30 lg:-ml-6 lg:absolute lg:drop-shadow-2xl lg:bg-white lg:rounded-md lg:py-6 lg:pl-6 lg:min-w-[200px]"
  51.                     x-show="isOpen"
  52.                     {% if not editmode %}{# Anders verspringt dit block bij het openen van de pagina voordat Alpine wordt uitgevoerd. #}
  53.                         style="display:none;"
  54.                     {% endif %}
  55.                 >
  56.                     {% for subNavigationItem in pimcore_block('subnavigationitems', {'class':"subnavigation editmode-iterator-styling"}).iterator %}
  57.                         <li
  58.                             class="flex flex-col items-center py-3.5 text-gray-900 border-t border-b-gray-200 lg:border-none relative lg:py-0.5 lg:pr-6 "
  59.                             x-data="{ isOpen: false }"
  60.                             @mouseover="window.innerWidth > 1024 ? isOpen = true : ''"
  61.                             @mouseover.away = "isOpen = false"
  62.                         >
  63.                             <div class="flex items-center w-full group">
  64.                                 {% if not pimcore_image('inline-icon').isEmpty() or editmode %}
  65.                                     <span class="flex items-center w-8 h-8 mr-2 lg:w-5 lg:h-5 shrink-0">
  66.                                         {{ pimcore_image('inline-icon', {
  67.                                             'class': 'inline-block editor-inline-icon',
  68.                                             "thumbnail": "navigation-icon",
  69.                                             "title": "(optioneel) Icoon",
  70.                                             "width": 32,
  71.                                             "height": 32,
  72.                                             'hidetext': true,
  73.                                             'pictureAttributes':
  74.                                             {
  75.                                                 'class': 'block'
  76.                                             }
  77.                                         }) }}
  78.                                     </span>
  79.                                 {% endif %}
  80.                                 <span class="flex items-center justify-between w-full text-gray-900 group-hover:text-blue">
  81.                                     {{ pimcore_link('sublink', {'class': "lg:w-1/2 lg:grow lg:font-normal font-bold lg:mr-4"}) }}
  82.                                     {% if pimcore_block('subsubnavigationitems').getCount %}
  83.                                         <button
  84.                                             class="py-1 px-1.5 mr-1 lg:mr-0 text-gray lg:rotate-0 cursor-pointer group-hover:text-blue"
  85.                                             :class="isOpen ? '-rotate-90' : 'rotate-90 lg:rotate-0'"
  86.                                             @click="isOpen = !isOpen"
  87.                                         >
  88.                                             <svg xmlns="http://www.w3.org/2000/svg" width="10" height="16"><path fill="currentColor" fill-rule="evenodd" d="m2.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L2.406.343A1.206 1.206 0 0 0 .657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L6.731 8 .722 13.807a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z"/></svg>
  89.                                         </button>
  90.                                     {% endif %}
  91.                                 </span>
  92.                             </div>
  93.                             {% if pimcore_block('subsubnavigationitems').getCount %}
  94.                                 <ul
  95.                                     class="subsubnavigation {{ editmode ?: "w-full px-0 mt-3 lg:absolute lg:top-0 bg-white lg:py-6 lg:px-6 lg:-mt-6 lg:translate-x-full lg:rounded-md lg:drop-shadow-2xl" }}"
  96.                                     x-show="isOpen"
  97.                                 >
  98.                             {% endif %}
  99.                                 {% for subSubNavigationItem in pimcore_block('subsubnavigationitems', {'class':"subsubnavigation editmode-iterator-styling"}).iterator %}
  100.                                     <li class="py-3 border-t border-gray-200 lg:border-none lg:py-0">
  101.                                         {{ pimcore_link('subsublink', {'class': "text-gray-900 hover:text-blue py-0.5 block"}) }}
  102.                                     </li>
  103.                                 {% endfor %}
  104.                             {% if pimcore_block('subsubnavigationitems').getCount %}
  105.                                 </ul>
  106.                             {% endif %}
  107.                         </li>
  108.                     {% endfor %}
  109.                 </ul>
  110.             {% endif %}
  111.         </li>
  112.     {% endfor %}
  113. </ul>
  114. <style>
  115.     .editmode-iterator-styling {
  116.         background-color: white;
  117.         font-family: 'Aller', sans-serif;
  118.         padding: 1rem;
  119.     }
  120.     .editmode-iterator-styling a {
  121.         color: #000;
  122.         text-decoration: none;
  123.     }
  124.     .editmode-iterator-styling a:hover {
  125.         text-decoration: underline;
  126.     }
  127.     .editmode-iterator-styling.navigation,
  128.     .editmode-iterator-styling.subnavigation,
  129.     .editmode-iterator-styling.subsubnavigation {
  130.         border: 1px dashed #ccc;
  131.         border-radius: 5px;
  132.         margin-bottom: 10px;
  133.     }
  134.     .editmode-iterator-styling.subnavigation,
  135.     .editmode-iterator-styling.subsubnavigation {
  136.         margin-top: 20px;
  137.     }
  138.     .inline-icon {
  139.         display: inline-block;
  140.     }
  141.     .editor-inline-icon {
  142.         min-width: 125px;
  143.         margin-bottom: 10px;
  144.     }
  145.     .pimcore_block_buttons {
  146.         margin: 5px 0 10px 0;
  147.     }
  148.     /*ul {*/
  149.     /*    list-style: none;*/
  150.     /*    padding: 0;*/
  151.     /*}*/
  152. </style>