Answer the question
In order to leave comments, you need to log in
How to write a cycle for slider layout?
You want pug to compile the following output
<div class="slideshow">
<ul class="slideshow__list">
<li class="slideshow__item slideshow__item--active">1 слайд</li>
<li class="slideshow__item">2 слайд</li>
<li class="slideshow__item">3 слайд</li>
</ul>
</div>
.slideshow
ul.slideshow__list
each slide, value, index in slides
if index === 0
li.slideshow__item.slideshow__item--active= slide.text
else li.slideshow__item= slide.text
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question