Skip to content

Instantly share code, notes, and snippets.

@Cybolic
Created January 10, 2013 16:05
Show Gist options
  • Save Cybolic/4503227 to your computer and use it in GitHub Desktop.
Save Cybolic/4503227 to your computer and use it in GitHub Desktop.
Jade template: Iterate over sequence in pairs.
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