I have a photo gallery, which is organized as follows:
.container %li %a{src: image.src} %li %a{src: image.src} %li %a{src: image.src} .container %li %a{src: image.src} %li %a{src: image.src} %li %a{src: image.src}
Each container should have a maximum of 3 %li .
Say I have @images where @images.count => 4 .
.container - for image in @images do %li %a{src: image.src}
This code will break the page because in this case .container has 4 %li .
How can I make .container added every 3 %li ?
source share