Updated game savefiles table format.

This commit is contained in:
chris062689@gmail.com 2018-11-15 22:06:05 -05:00
parent dde4dadfb1
commit 870e3234b4

View File

@ -137,9 +137,29 @@
</table> </table>
{{ end }} {{ end }}
<h2>Screenshots</h2> {{ if gt (len .Params.savefiles) 0 }}
<h2>Savefiles</h2>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{{ range .Params.savefiles }}
<tr>
<td><a href="/savefiles/{{ $gameName }}/{{ .basename }}.zip">{{ .title }}</a></td>
<td>{{ .description }}</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
{{ $columns := 3 }} {{ $columns := 3 }}
{{ if (where (readDir "/static/images/screenshots0") "Name" .File.BaseFileName) }} {{ if (where (readDir "/static/images/screenshots0") "Name" .File.BaseFileName) }}
<h2>Screenshots</h2>
<div class="baguetteBox"> <div class="baguetteBox">
<div class="tile is-ancestor"> <div class="tile is-ancestor">
{{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }} {{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }}
@ -160,8 +180,6 @@
{{ end }} {{ end }}
</div> </div>
</div> </div>
{{ else }}
<p>No screenshots have been uploaded for this game.</p>
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}