mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2024-12-04 23:17:19 +01:00
Solved icon attribute bug
This commit is contained in:
parent
326390e7af
commit
be91684f7f
@ -26,9 +26,11 @@
|
||||
{%- set is_dropdown = attributes.dropdown|default(false) %}
|
||||
{%- set divider_prepend = attributes.divider_prepend|default(false) %}
|
||||
{%- set divider_append = attributes.divider_append|default(false) %}
|
||||
|
||||
{% if item.attribute('icon') is not empty %}
|
||||
{% set icon = item.attribute('icon') %}
|
||||
{% endif %}
|
||||
{# unset bootstrap specific attributes #}
|
||||
{%- set attributes = attributes|merge({'dropdown': null, 'divider_prepend': null, 'divider_append': null }) %}
|
||||
{%- set attributes = attributes|merge({'dropdown': null, 'divider_prepend': null, 'divider_append': null,'icon': null}) %}
|
||||
|
||||
{%- if divider_prepend %}
|
||||
{{ block('dividerElement') }}
|
||||
@ -138,8 +140,8 @@
|
||||
{% import _self as ownmacro %}
|
||||
{{ ownmacro.setCssClassAttribute(item, 'LabelAttribute', 'dropdown-header') }}
|
||||
<div {{ macros.attributes(item.labelAttributes) }}>
|
||||
{% if item.attribute('icon') is not empty %}
|
||||
<i class="{{ item.attribute('icon') }}"></i>
|
||||
{% if icon is defined %}
|
||||
<i class="{{ icon }}"></i>
|
||||
{% endif %}
|
||||
{{ block('label') }}
|
||||
</div>
|
||||
@ -162,8 +164,8 @@
|
||||
{% import _self as ownmacro %}
|
||||
{{ ownmacro.setCssClassAttribute(item, 'LinkAttribute', 'nav-link') }}
|
||||
<a href="{{ item.uri }}"{{ macros.attributes(item.linkAttributes) }}>
|
||||
{% if item.attribute('icon') is not empty %}
|
||||
<i class="{{ item.attribute('icon') }}"></i>
|
||||
{% if icon is defined %}
|
||||
<i class="{{ icon }}"></i>
|
||||
{% endif %}
|
||||
{{ block('label') }}
|
||||
</a>
|
||||
@ -174,8 +176,8 @@
|
||||
{% import _self as ownmacro %}
|
||||
{{ ownmacro.setCssClassAttribute(item, 'LabelAttribute', 'navbar-text') }}
|
||||
<span {{ macros.attributes(item.labelAttributes) }}>
|
||||
{% if item.attribute('icon') is not empty %}
|
||||
<i class="{{ item.attribute('icon') }}"></i>
|
||||
{% if icon is defined %}
|
||||
<i class="{{ icon }}"></i>
|
||||
{% endif %}
|
||||
{{ block('label') }}
|
||||
</span>
|
||||
@ -189,8 +191,8 @@
|
||||
{%- set attributes = attributes|merge({'class': classes|join(' ')}) %}
|
||||
{%- set attributes = attributes|merge({'data-toggle': 'dropdown'}) %}
|
||||
<a href="#"{{ macros.attributes(attributes) }}>
|
||||
{% if item.attribute('icon') is not empty %}
|
||||
<i class="{{ item.attribute('icon') }}"></i>
|
||||
{% if icon is defined %}
|
||||
<i class="{{ icon }}"></i>
|
||||
{% endif %}
|
||||
{{ block('label') }}
|
||||
<b class="caret"></b>
|
||||
|
Loading…
Reference in New Issue
Block a user