Created
January 10, 2013 16:05
-
-
Save Cybolic/4503227 to your computer and use it in GitHub Desktop.
Jade template: Iterate over sequence in pairs.
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
n = 1 | |
for item, i in list | |
- if (i%2 == 0) // even | |
- if (i != 0) // not first | |
!= "</div>" | |
!= "<div class=\"pairNr" + n + "\">" | |
- n++ | |
.item | |
| Here's item number #{i+1}. | |
| It's a beautiful item, containing #{item}. | |
!= "</div>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment