V
V
Vasily Lis2019-02-16 22:15:04
Pug
Vasily Lis, 2019-02-16 22:15:04

Please tell me how to write a cycle in PUG in a mixin that adds numbers to li classes?

mixin li(img, title, p, liList)
.WorkingProcessContainer__li.WorkingProcessContainer__li#{liList}
i(.img, aria-hidden="true")
h5.ul__h5 #{title}
p.ul__p #{p}
a.ul__a # [i.fa.fa-plus(aria-hidden="true")] Know More
Can you please tell me how to write a loop that adds a value in the second line in liList? What classes would be
.WorkingProcessContainer__li WorkingProcessContainer__li1
.WorkingProcessContainer__li WorkingProcessContainer__li2
.WorkingProcessContainer__li WorkingProcessContainer__li3
.WorkingProcessContainer__li WorkingProcessContainer__li4
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
yarnstart, 2019-02-16
@lis159

- for(var i = 1; i < 5; i++) {
  .WorkingProcessContainer__li(class=`WorkingProcessContainer__li${i}`) content
- }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question