Created
March 16, 2012 11:55
-
-
Save medwards/2049762 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{% set row_blocks = [] %} | |
{% for item in items %} | |
{%- if row_width + item.width > 12 %} | |
{%- include "rowofstuff.html" %} | |
{%- for rowitem in row_blocks %} | |
{%- set something = row_blocks.remove(rowitem) %} | |
{%- endfor %} | |
{%- set row_width = 0 %} | |
{%- endif %} | |
{%- set something = row_blocks.append(item) %} | |
{%- set row_width = row_width + item.width %} | |
{% endfor %} | |
{% if row_blocks %} | |
{%- include "rowofstuff.html" %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment