2017-06-22 Build
* Use 'https://github.com/mjibson/esc' for embedded assets * Pull database name out of siteData object * Load site config from database, if available * Allow customizing site config from command line arguments * Clean up some templates * Update Readme (it still needs a lot of updating) * Started work on vote accumulation/management
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
<table id="games-table" class="hidden sortable pure-table pure-table-bordered center">
|
||||
{{ if not .TemplateData.Games }}
|
||||
<div>No games have been created</div>
|
||||
{{ else }}
|
||||
<table id="games-table" class="sortable pure-table pure-table-bordered center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Game Name</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Game Name</th>
|
||||
<th>Team Name</th>
|
||||
<th>Screenshots</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $i, $v := .TemplateData.Games }}
|
||||
<tr>
|
||||
<td>{{ $v.Name }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ range $i, $v := .TemplateData.Games }}
|
||||
<tr>
|
||||
<td>{{ $v.Name }}</td>
|
||||
<td></td>
|
||||
<td>{{ len $v.Screenshots }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
snack.ready(function() {
|
||||
var tableBody = document.querySelector("#games-table>tbody");
|
||||
if(tableBody.children.length>0) {
|
||||
// Show the table
|
||||
document.getElementById('games-table').classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user