Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Last active December 15, 2015 12:39
Show Gist options
  • Select an option

  • Save Wolfr/5261504 to your computer and use it in GitHub Desktop.

Select an option

Save Wolfr/5261504 to your computer and use it in GitHub Desktop.
Share Jekyll snippets! (1)
<!--
This snippet uses Jekyll to generate a data table
The data is pseudo randomized using cycle tags
We use the 'for' tag to generate 20 table rows
-->
<table>
<thead>
<tr>
<th>Lorem</th>
<th>Ipsum</th>
<th>Dolor</th>
<th>Amet</th>
</tr>
</thead>
<tbody>
{% for num in (1...20) %}
<tr>
<td>{% cycle 'Termination', 'Termination', 'Rent revision', 'Renewal', 'Registration', 'Other', 'Maintenance' %}</td>
<td>
{% cycle 'To be registered before', 'Undetermined status ', 'Confirm departure ', ' Terminate (three-year period)', 'Waiting for landlord response', 'Landlord response before' %}
</td>
<td>
{% cycle '12/04/2013', '15/04/2013', '18/04/2013', '22/04/2013', '25/04/2013', '03/05/2013', '14/05/2013', '22/05/2013', '26/05/2013', '29/05/2013', '05/06/2013', '11/06/2013', '12/07/2013' %}
</td>
<td>
{% cycle '2', '4', '7', '9', '12', '16', '21', '27', '30', '40', '45', '89', '120', '130', '135', '140, '142', '142', '143', '150' %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
@bengie
Copy link
Copy Markdown

bengie commented Mar 28, 2013

nice one, used it immediately.
PS you have a closing too much on line #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment