diff --git a/components/02-molecules/menus/_menu-item.twig b/components/02-molecules/menus/_menu-item.twig index d819b4e9..99e4f01b 100644 --- a/components/02-molecules/menus/_menu-item.twig +++ b/components/02-molecules/menus/_menu-item.twig @@ -18,21 +18,26 @@ {% endfor %} {% embed "@atoms/lists/_list-item.twig" with { - "list_item_label": item_label, - "li_base_class": item_base_class|default(menu_class ~ '__item'), - "li_modifiers": item_modifiers, - "li_blockname": item_blockname, + list_item_label: item_label, + li_base_class: item_base_class|default(menu_class ~ '__item'), + li_modifiers: item_modifiers, + li_blockname: item_blockname, } %} {% block list_item_content %} - {% include "@atoms/links/link/link.twig" with { - "link_content": item.title, - "link_url": item.url, - "link_base_class": item_base_class|default(menu_class ~ '__link'), - "link_modifiers": item_modifiers, - } %} + {# if drupal #} + {% if directory %} + {{ link(item.title, item.url, bem(item_base_class|default(menu_class ~ '__link'), item_modifiers)) }} + {% else %} + {% include "@atoms/links/link/link.twig" with { + link_content: item.title, + link_url: item.url, + link_base_class: item_base_class|default(menu_class ~ '__link'), + link_modifiers: item_modifiers, + } %} + {% endif %} {% if item.below %} - {{ menus.menu_links(item.below, attributes, menu_level + 1, menu_class, menu_modifiers, menu_blockname, item_base_class, original_item_modifiers, item_blockname) }} + {{ menus.menu_links(item.below, attributes, menu_level + 1, menu_class, menu_modifiers, menu_blockname, item_base_class, original_item_modifiers, item_blockname, directory) }} {% endif %} {% endblock %} {% endembed %} diff --git a/components/02-molecules/menus/_menu.twig b/components/02-molecules/menus/_menu.twig index 4c80d515..f058e232 100644 --- a/components/02-molecules/menus/_menu.twig +++ b/components/02-molecules/menus/_menu.twig @@ -23,8 +23,7 @@ We call a macro which calls itself to render the full tree. @see http://twig.sensiolabs.org/doc/tags/macro.html #} - -{% macro menu_links(items, attributes, menu_level, menu_class, menu_modifiers, menu_blockname, item_base_class, item_modifiers, item_blockname) %} +{% macro menu_links(items, attributes, menu_level, menu_class, menu_modifiers, menu_blockname, item_base_class, item_modifiers, item_blockname, directory) %} {% import _self as menus %} {% if items %} @@ -58,4 +57,4 @@ {% import _self as menus %} -{{ menus.menu_links(items, attributes, 0, menu_class, menu_modifiers, menu_blockname, item_base_class, item_modifiers, item_blockname) }} +{{ menus.menu_links(items, attributes, 0, menu_class, menu_modifiers, menu_blockname, item_base_class, item_modifiers, item_blockname, directory) }} diff --git a/components/02-molecules/menus/main-menu/_02-main-menu-link.scss b/components/02-molecules/menus/main-menu/_02-main-menu-link.scss index c4d34991..03c55129 100644 --- a/components/02-molecules/menus/main-menu/_02-main-menu-link.scss +++ b/components/02-molecules/menus/main-menu/_02-main-menu-link.scss @@ -16,7 +16,7 @@ border-bottom: none; display: inline-block; font-size: 1.1rem; - padding: $space $space-double $space $space; + padding: $space; text-transform: none; position: relative; width: auto; @@ -31,6 +31,7 @@ color: $white; display: inline-block; content: '>'; + margin-left: 0.5rem; } &--sub::after {