+
- {% if params.button %}
- {% if params.variants == 'neutral' %}
- {% set buttonVariant = "ghost-dark" %}
- {% else %}
- {% set buttonVariant = "ghost" %}
+ {% if params.button %}
+ {% if params.variants == 'neutral' %}
+ {% set buttonVariant = "ghost-dark" %}
+ {% else %}
+ {% set buttonVariant = "ghost" %}
+ {% endif %}
+
+ {{
+ onsButton({
+ "text": params.button.text,
+ "classes": "ons-u-d-no@2xs@l" if params.navigation else "ons-u-d-no@2xs@m",
+ "variants": buttonVariant,
+ "name": params.button.name,
+ "attributes": params.button.attributes,
+ "url": params.button.url,
+ "iconType": "exit",
+ "iconPosition": "after"
+ })
+ }}
+
{% endif %}
-
- {{
- onsButton({
- "text": params.button.text,
- "classes": "ons-u-d-no@2xs@l" if params.navigation else "ons-u-d-no@2xs@m",
- "variants": buttonVariant,
- "name": params.button.name,
- "attributes": params.button.attributes,
- "url": params.button.url,
- "iconType": "exit",
- "iconPosition": "after"
- })
- }}
-
- {% endif %}
- {% if params.navigation or params.siteSearchAutosuggest %}
-
- {% if params.siteSearchAutosuggest %}
- {% if params.variants == 'neutral' %}
- {% set buttonVariant = ["small", "ghost-dark"] %}
- {% else %}
- {% set buttonVariant = ["small", "ghost"] %}
+ {% if params.navigation or params.siteSearchAutosuggest %}
+
+ {% if params.siteSearchAutosuggest %}
+ {% if params.variants == 'neutral' %}
+ {% set buttonVariant = ["small", "ghost-dark"] %}
+ {% else %}
+ {% set buttonVariant = ["small", "ghost"] %}
+ {% endif %}
+
+ {{
+ onsButton({
+ "text": "Search",
+ "classes": "ons-btn--search ons-u-ml-2xs ons-u-d-no ons-js-toggle-search",
+ "variants": buttonVariant,
+ "iconType": "search",
+ "iconPosition": "only",
+ "attributes": {
+ "aria-label": "Toggle search" ,
+ "aria-controls": "ons-site-search",
+ "aria-expanded": "false"
+ }
+ })
+ }}
+
{% endif %}
-
+ {% if params.navigation.toggleNavigationButton %}
+ {% set buttonVariant = ["mobile", "ghost"] %}
{{
onsButton({
- "text": "Search",
- "classes": "ons-btn--search ons-u-ml-2xs ons-u-d-no ons-js-toggle-search",
+ "text": params.navigation.toggleNavigationButton.text,
+ "classes": "ons-u-ml-2xs ons-u-d-no ons-js-navigation-button ons-u-d-no@l",
"variants": buttonVariant,
- "iconType": "search",
- "iconPosition": "only",
"attributes": {
- "aria-label": "Toggle search" ,
- "aria-controls": "ons-site-search",
+ "aria-label": params.navigation.toggleNavigationButton.ariaLabel | default("Toggle main menu") ,
+ "aria-controls": params.navigation.id,
"aria-expanded": "false"
}
})
}}
-
- {% endif %}
- {% if params.navigation.toggleNavigationButton %}
- {% set buttonVariant = ["mobile", "ghost"] %}
- {{
- onsButton({
- "text": params.navigation.toggleNavigationButton.text,
- "classes": "ons-u-ml-2xs ons-u-d-no ons-js-navigation-button ons-u-d-no@l",
- "variants": buttonVariant,
- "attributes": {
- "aria-label": params.navigation.toggleNavigationButton.ariaLabel | default("Toggle main menu") ,
- "aria-controls": params.navigation.id,
- "aria-expanded": "false"
- }
- })
- }}
- {% endif %}
-
- {% endif %}
+ {% endif %}
+
+ {% endif %}
+