From 7ffca9c3f1462b18d4ef80eae55b6d20c4e09578 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:09:26 +0100 Subject: [PATCH] Allow setting custom footer --- internal/assets/templates/page.html | 4 ++++ internal/glance/glance.go | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/internal/assets/templates/page.html b/internal/assets/templates/page.html index d0add29..73a1c56 100644 --- a/internal/assets/templates/page.html +++ b/internal/assets/templates/page.html @@ -65,9 +65,13 @@ {{ if not .App.Config.Branding.HideFooter }}
{{ end }} diff --git a/internal/glance/glance.go b/internal/glance/glance.go index c48fe38..a88effb 100644 --- a/internal/glance/glance.go +++ b/internal/glance/glance.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + "html/template" "log/slog" "net/http" "path/filepath" @@ -49,10 +50,11 @@ type Server struct { } type Branding struct { - HideFooter bool `yaml:"hide-footer"` - LogoText string `yaml:"logo-text"` - LogoURL string `yaml:"logo-url"` - FaviconURL string `yaml:"favicon-url"` + HideFooter bool `yaml:"hide-footer"` + CustomFooter template.HTML `yaml:"custom-footer"` + LogoText string `yaml:"logo-text"` + LogoURL string `yaml:"logo-url"` + FaviconURL string `yaml:"favicon-url"` } type Column struct {