Answer the question
In order to leave comments, you need to log in
How to make markup with pug?
each item, index in title
li(class="mobile-categories__item" + ((item == "Контурная пластика (Инъекционная коррекция)") ? " mobile-categories-item_active" : ""))
span.mobile-categories__icon
img(src=icons[index] alt = alt[index])
span(class='mobile-categories__text'+ ((item == "Контурная пластика (Инъекционная коррекция)") ? " mobile-categories-text_active" : ""))= item
.mobile-close2.mobile-close2_position
Answer the question
In order to leave comments, you need to log in
each item, index in title
- var isActive = ( item === "Контурная пластика (Инъекционная коррекция)" );
li.mobile-categories__item(class=( isActive ? 'mobile-categories-item_active' : false ))
span.mobile-categories__icon
img(src=icons[index] alt=alt[index])
span.mobile-categories__text(class=( isActive ? 'mobile-categories-text_active' : false ))= item
if isActive
.mobile-close2.mobile-close2_position
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question