welcome {{ .User.Name }}
|
{{ component "link" (props . "To" (path "/admin/home")) }}home{{ end }}
|
{{ component "link" (props . "To" (path "/admin/logout")) }}logout{{ end }}
{{ slot }}
{{ end }}
{{ define "layout" }}
{{ range $flash := .Flashes }}
{{ $colour := "bg-green-200" }}
{{ if eq $flash.Type "warning" }}{{ $colour = "bg-red-200" }}{{ end }}
{{ component "icon" "circle-info" }}{{ end }}
{{ $flash.Message }}
{{ end }}
{{ slot }}
v{{ .Version }}
senan kelly, 2020
|
{{ component "ext_link" (props . "To" "https://github.com/sentriz/gonic") }}github{{ end }}
{{ end }}
{{/* from https://github.com/FortAwesome/Font-Awesome/tree/6.x/svgs/brand */}}
{{/* TODO: see if we can dynamically render templates based on a variable instead of this */}}
{{ define "icon" }}
{{ if (eq . "lastfm") }}