fix ul issue

pull/64/head
Akhil Gupta 4 years ago
parent c094c9e74d
commit b492ff91f2

@ -131,7 +131,7 @@
{{if .DownloadPath}} {{if .DownloadPath}}
<a <a
class="button" class="button"
href="/{{ .DownloadPath }}" href="{{ removeStartingSlash .DownloadPath }}"
download download
title="Download episode file" title="Download episode file"
><i class="fas fa-download"></i ><i class="fas fa-download"></i

@ -34,6 +34,13 @@ func main() {
r.Use(location.Default()) r.Use(location.Default())
funcMap := template.FuncMap{ funcMap := template.FuncMap{
"removeStartingSlash": func(raw string) string {
fmt.Println(raw)
if string(raw[0]) == "/" {
return raw
}
return "/" + raw
},
"isDateNull": func(raw time.Time) bool { "isDateNull": func(raw time.Time) bool {
return raw == (time.Time{}) return raw == (time.Time{})
}, },

Loading…
Cancel
Save