Created
May 3, 2016 20:44
-
-
Save robsmith1776/7d3cfb8d1a6351242420d47c2c7f27cf to your computer and use it in GitHub Desktop.
Jinja Table
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
<div class="table-title"> | |
<table class="table-fill"> | |
<thead> | |
<tr> | |
{% for col in table[0] %} | |
<th>{{ col }}</th> | |
{% endfor %} | |
</tr> | |
</thead> | |
<tbody> | |
{% for row in table %} | |
<tr class="{{ loop.cycle('odd', 'even') }}"> | |
{% set rowloop = loop %} | |
{% for col in row %} | |
<td id="cell-{{ rowloop.index }}-{{ loop.index }}">{{ row[col] }}</td> | |
{% endfor %} | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment