Skip to content

Instantly share code, notes, and snippets.

@derekdowling
Last active December 11, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekdowling/4559832 to your computer and use it in GitHub Desktop.
Save derekdowling/4559832 to your computer and use it in GitHub Desktop.
Dynamically Generate Content In A Grid Rows Using Jade
- var row = 0;
each tweet, t in twitter
if t % 3 == 0
.row-fluid.tweets
- row = row + 1
each rowElement in twitter.slice(t, t + 3)
.span4
if row % 2 == 0
.span3.image
img(src='../public/img/twitter/#{tweet.handle}.jpg')
.span9.tweet.right #{tweet.tweet}
else
.span9.tweet.left #{tweet.tweet}
.span3.image
img(src='../public/img/twitter/#{tweet.handle}.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment