sw show fix

This commit is contained in:
2026-01-27 21:46:36 +01:00
parent 645c8966c4
commit b79570f301
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -35,7 +35,7 @@ func (c *SoftwareController) index(w http.ResponseWriter, r *http.Request) {
type SoftwareShowData struct {
Software *domain.Software
LatestVersion string
LatestRelease *domain.Release
}
func (c *SoftwareController) show(w http.ResponseWriter, r *http.Request) {
@@ -61,9 +61,13 @@ func (c *SoftwareController) show(w http.ResponseWriter, r *http.Request) {
return
}
tmpl, _ := template_utils.GetTemplate("software_show", "http/views/shared/layout.html", "http/views/software/show.html")
tmpl, err := template_utils.GetTemplate("software_show", "http/views/shared/layout.html", "http/views/software/show.html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
tmpl.Execute(w, SoftwareShowData{
Software: software,
LatestVersion: latest_release.Version,
LatestRelease: latest_release,
})
}
+1 -1
View File
@@ -22,7 +22,7 @@
<a class="nav-link" href="/" style="color: limegreen;">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/softwares" style="color: limegreen;">Softwares</a>
<a class="nav-link" href="/software" style="color: limegreen;">Softwares</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.youtube.com/@teletypegames" target="_blank" style="color: limegreen;">Youtube</a>