Last active
April 16, 2020 15:57
-
-
Save linchpinstudios/437032c32bc4e684392a to your computer and use it in GitHub Desktop.
Loop through jade adding a row every around every two items.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- var perRow = 2; | |
- var columnAry = new Array(perRow); | |
- for(var i = 0, nbRows = items.length/perRow; i < nbRows; i++) { | |
.row | |
each item,index in columnAry | |
if items[perRow*i+index] | |
.item #{items[perRow*i+index]} | |
- } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment