From c4f3ebf833cf7f4fe93ebd91d20151ec91e6ae86 Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Sun, 30 Jul 2023 18:11:43 -0600 Subject: [PATCH] Fix permalinks --- partials/garbage/list.html | 2 +- partials/garbage/show.tmpl | 2 +- server.go | 28 ++++++++++++++++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/partials/garbage/list.html b/partials/garbage/list.html index b12a256..a367b74 100644 --- a/partials/garbage/list.html +++ b/partials/garbage/list.html @@ -1,6 +1,6 @@
{{range .Posts}} - {{ template "show.tmpl" (PostWrapper . $.UserID $.ApiBaseUrl) }} + {{ template "show.tmpl" (argsfn "Garbage" . "UserID" $.UserID "ApiBaseUrl" $.ApiBaseUrl "argsfn" argsfn) }} {{end}}
diff --git a/partials/garbage/show.tmpl b/partials/garbage/show.tmpl index e2ed448..30edb6c 100644 --- a/partials/garbage/show.tmpl +++ b/partials/garbage/show.tmpl @@ -3,7 +3,7 @@

{{if .Url}}{{.Title}} (link){{else}}{{.Title}}{{ end }}

- {{ template "uplevel_button.tmpl" (PostWrapper . $.UserID $.ApiBaseUrl) }} + {{ template "uplevel_button.tmpl" (argsfn "Garbage" . "UserID" $.UserID "ApiBaseUrl" $.ApiBaseUrl) }} Submitter: {{ .Username }} {{ if eq .OwnerID.String $.UserID }}