Add tables template

master
kts of kettek (nyaa) 2021-05-28 22:10:20 -07:00
parent e22e606d2d
commit 9c7a50835c
1 changed files with 49 additions and 0 deletions

49
views/tables.dot 100644
View File

@ -0,0 +1,49 @@
{{? !it.type }}
<h1>Gear</h1>
{{ for(var cat in it.db) { }}
<h2>{{=cat}}</h2>
<table>
</table>
{{ } }}
{{?? true }}
<h1>{{=it.type}}</h1>
{{? it.type === "weapons"}}
<table>
<thead>
<tr>
<th>Name</th>
<th>Attack</th>
<th>Damage</th>
<th>Type</th>
<th>Range</th>
<th>Radius</th>
<th>Capacity</th>
<th>Duration</th>
<th>Properties</th>
</tr>
</thead>
<tbody>
{{~it.db[it.type] :item:index}}
<tr>
<td>{{=item.name}}</td>
<td>{{=item.attack}}</td>
<td>{{=item.damage}}</td>
<td>{{=item.damagetype}}</td>
<td>{{=item.range}}</td>
<td>{{=item.radius}}</td>
<td>{{=item.capacity}}</td>
<td>{{=item.duration}}</td>
<td>{{=item.properties}}</td>
</tr>
{{~}}
</tbody>
</table>
{{?? it.type === "consumables"}}
argh
{{?? true }}
Bad type
{{?}}
{{?}}