File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 134134 const prevMainContentTab = doc . querySelector ( `[data-id="${ prevHashId } "]` ) ;
135135 const currMainContentTab = doc . querySelector ( `[data-id="${ currHashId } "]` ) ;
136136
137- prevMainContentTab . classList . toggle ( 'ibexa-anchor-navigation__section-group--active' , false ) ;
138- currMainContentTab . classList . toggle ( 'ibexa-anchor-navigation__section-group--active' , true ) ;
137+ prevMainContentTab ? .classList . toggle ( 'ibexa-anchor-navigation__section-group--active' , false ) ;
138+ currMainContentTab ? .classList . toggle ( 'ibexa-anchor-navigation__section-group--active' , true ) ;
139139
140140 initFitSection ( ) ;
141141 } ) ;
Original file line number Diff line number Diff line change 8282 & --active {
8383 display : block ;
8484 }
85+
86+ & --no-border {
87+ border : 0 ;
88+ margin-top : 0 ;
89+ padding-top : 0 ;
90+ }
8591 }
8692
8793 & __sections-item-btn {
Original file line number Diff line number Diff line change 1818 <div class =" ibexa-anchor-navigation-menu__body" >
1919 {% block navigation_menu_body %}
2020 {% if items | default ([])| length > 1 %}
21- <ul class =" ibexa-anchor-navigation-menu__sections ibexa-anchor-navigation-menu__sections--active" >
21+ <ul class =" ibexa-anchor-navigation-menu__sections ibexa-anchor-navigation-menu__sections--active ibexa-anchor-navigation-menu__sections--no-border " >
2222 {% for item in items %}
2323 {% set item_label = item is iterable ? item .label : item %}
2424 {% set sanitized_item = item is iterable and item .target_id is defined ? item .target_id : item_label | slug %}
Original file line number Diff line number Diff line change 168168 {% for secondMenuItem in item .children %}
169169 {% if secondMenuItem .children | length > 1 %}
170170 {% set listAttributes = {
171- ' class' : ' tab-pane ibexa-anchor-navigation-menu__sections' ~ (loop .first ? ' ibexa-anchor-navigation-menu__sections--active active' : ' ' ),
171+ ' class' : ' tab-pane ibexa-anchor-navigation-menu__sections'
172+ ~ (loop .first ? ' ibexa-anchor-navigation-menu__sections--active active' : ' ' )
173+ ~ (item.count () == 1 ? ' ibexa-anchor-navigation-menu__sections--no-border' : ' ' ),
172174 ' id' : secondMenuItem.getAttribute (' data-target-id' ),
173175 ' role' : ' tabpanel'
174176 } %}
178180 {% set tagElement = ' div' %}
179181 {% set extraElements %}{% endset %}
180182
181- {{ block (' anchor_menu_list' ) -}}
183+ {% with { item : secondMenuItem } %}
184+ {{ block (' anchor_menu_list' ) -}}
185+ {% endwith %}
182186 {% endif %}
183187 {% endfor %}
184188 </div >
You can’t perform that action at this time.
0 commit comments