Loading includes/menu.inc +11 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,17 @@ function radix_preprocess_links__dropbutton(&$variables) { // Remove first link from links. array_shift($links); foreach ($links as $key => $link) { $links[$key]['link']['#options']['attributes']['class'][] = 'dropdown-item'; } } elseif (isset($link['text'])) { $button = $link['text']; $variables['button'] = $button; // Remove first link from links. array_shift($links); } // Add required classes. Loading src/components/form/dropbutton-wrapper.twig 0 → 100644 +22 −0 Original line number Diff line number Diff line {# /** * @file * Default theme implementation for a dropbutton wrapper. * * Available variables: * - children: Contains the child elements of the dropbutton menu. * * @see template_preprocess() * * @ingroup themeable */ #} {% if children %} {% apply spaceless %} <div class="dropbutton-wrapper"> <div class="dropbutton-widget"> {{ children }} </div> </div> {% endapply %} {% endif %} src/components/nav/links--dropbutton.twig +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ {{ button }} {% endif %} </button> <div class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right"> {%- for item in links -%} {%- if item.link -%} {{ item.link }} Loading @@ -28,6 +28,6 @@ {{ item.text }} {%- endif -%} {%- endfor -%} </div> </ul> {% endif %} </div> src/kits/default/templates/navigation/links--dropbutton.html.twigdeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line {% include '@radix/nav/links--dropbutton.twig' %} No newline at end of file templates/navigation/dropbutton-wrapper.html.twig 0 → 100644 +1 −0 Original line number Diff line number Diff line {% include '@radix/form/dropbutton-wrapper.twig' %} No newline at end of file Loading
includes/menu.inc +11 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,17 @@ function radix_preprocess_links__dropbutton(&$variables) { // Remove first link from links. array_shift($links); foreach ($links as $key => $link) { $links[$key]['link']['#options']['attributes']['class'][] = 'dropdown-item'; } } elseif (isset($link['text'])) { $button = $link['text']; $variables['button'] = $button; // Remove first link from links. array_shift($links); } // Add required classes. Loading
src/components/form/dropbutton-wrapper.twig 0 → 100644 +22 −0 Original line number Diff line number Diff line {# /** * @file * Default theme implementation for a dropbutton wrapper. * * Available variables: * - children: Contains the child elements of the dropbutton menu. * * @see template_preprocess() * * @ingroup themeable */ #} {% if children %} {% apply spaceless %} <div class="dropbutton-wrapper"> <div class="dropbutton-widget"> {{ children }} </div> </div> {% endapply %} {% endif %}
src/components/nav/links--dropbutton.twig +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ {{ button }} {% endif %} </button> <div class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right"> {%- for item in links -%} {%- if item.link -%} {{ item.link }} Loading @@ -28,6 +28,6 @@ {{ item.text }} {%- endif -%} {%- endfor -%} </div> </ul> {% endif %} </div>
src/kits/default/templates/navigation/links--dropbutton.html.twigdeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line {% include '@radix/nav/links--dropbutton.twig' %} No newline at end of file
templates/navigation/dropbutton-wrapper.html.twig 0 → 100644 +1 −0 Original line number Diff line number Diff line {% include '@radix/form/dropbutton-wrapper.twig' %} No newline at end of file