restructure html templates

This commit is contained in:
2025-12-07 15:15:00 +01:00
parent fb37a2677c
commit fcd21a7ffa
8 changed files with 5 additions and 9 deletions
+28
View File
@@ -0,0 +1,28 @@
{{define "content"}}
<h1 class="my-4">Softwares</h1>
<div class="row">
{{range .}}
<div class="col-12 mb-4">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">{{.Title}}</h5>
<h6 class="card-subtitle mb-2 text-muted">{{.Author}}</h6>
<p class="card-text">{{.Desc}}</p>
<p class="card-text"><strong>Version:</strong> {{.LatestRelease.Version}}</p>
<p class="card-text"><strong>License:</strong> {{.License}}</p>
<p class="card-text"><a href="{{.Site}}" target="_blank">Website</a></p>
</div>
<div class="card-footer">
<div class="btn-group d-flex justify-content-end" role="group" aria-label="Operations">
<a href="/download/{{.Name}}/source" class="btn btn-primary btn-sm">Source</a>
<a href="/download/{{.Name}}/cartridge" class="btn btn-primary btn-sm">Cartridge</a>
<a href="/releases/{{.Name}}" class="btn btn-primary btn-sm">Releases</a>
<a href="/play/{{.Name}}" class="btn btn-primary btn-sm">Play</a>
</div>
</div>
</div>
</div>
{{end}}
</div>
{{end}}
+31
View File
@@ -0,0 +1,31 @@
{{define "content"}}
<h1 class="my-4">Releases for {{.Software.Title}}</h1>
<div class="table-responsive">
<table class="table table-striped table-hover table-bordered">
<thead class="bg-dark text-success">
<tr>
<th>Version</th>
<th>Released At</th>
<th>Downloads</th>
</tr>
</thead>
<tbody>
{{range .Software.Releases}}
<tr>
<td>{{.Version}}</td>
<td>{{.CreatedAt.Format "2006-01-02 15:04:05"}}</td>
<td>
<div class="btn-group" role="group" aria-label="Download options">
<a href="/download/{{$.Software.Name}}/{{.Version}}/source" class="btn btn-primary btn-sm">Source</a>
<a href="/download/{{$.Software.Name}}/{{.Version}}/cartridge" class="btn btn-primary btn-sm">Cartridge</a>
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<p><a href="/" class="btn btn-primary">Back to Softwares</a></p>
{{end}}