Skip to content

Instantly share code, notes, and snippets.

@jensgro
Created January 22, 2020 13:14
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 jensgro/503a58ba1316f88a05f459f342cefac7 to your computer and use it in GitHub Desktop.
Save jensgro/503a58ba1316f88a05f459f342cefac7 to your computer and use it in GitHub Desktop.
table-folder in fractal
---
status: "wip"
handle: "table"
context:
tablehead:
- item: "AutorIn"
- item: "Titel"
- item: "Verlag"
rows:
- row:
- inlinelink: true
value: "Raphaela Edelbauer"
- inlinelink: true
value: "Das flüssige Land"
- value: "Klett-Cotta"
- row:
- inlinelink: true
value: "Miku Sophie Kühmel"
- inlinelink: true
value: "Kintsugi"
- value: "S. Fischer"
- row:
- value: "Tonio Schachinger"
- value: "Nicht wie ihr"
- value: "Kremayr & Scheriau"
- row:
- inlinelink: true
value: "Norbert Scheuer"
- inlinelink: true
value: "Winterbienen"
- value: "C. H. Beck"
- row:
- inlinelink: true
value: "Saša Stanišić"
- inlinelink: true
value: "Herkunft"
- value: "Luchterhand"
- row:
- inlinelink: true
value: "Jackie Thomae"
- inlinelink: true
value: "Brüder"
- value: "Hanser Berlin"
variants:
- name: "default"
hidden: true
label: "diese Tabelle sollte versteckt sein"
- name: "responsive"
label: "responsive Tabelle"
status: "ready"
context:
wrapperclass: "table-responsive"
{{#if wrapperclass}}<div class="{{wrapperclass}}">{{/if}}
<table class="table{{#if modifier}} {{modifier}}{{/if}}">
<thead>
<tr>
{{#tablehead}}
<th>{{item}}</th>
{{/tablehead}}
</tr>
</thead>
<tbody>
{{#each rows as |row|}}
<tr>
{{#each row.row as |item|}}
<td>
{{#if item.inlinelink}}
<a href="#" class="inline-link">{{item.value}}</a>
{{else}}
{{item.value}}
{{/if}}
</td>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
{{#if wrapperclass}}</div>{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment