From faccb174e36a875c4430e1b34a1b1ca0926252b2 Mon Sep 17 00:00:00 2001 From: Vic Demuzere Date: Thu, 10 Aug 2023 17:07:17 +0200 Subject: [PATCH 1/2] Customize HTML page title The existing customize feature only changed the title in the navbar. --- customize.go | 6 ++++++ frontend/index.html | 2 +- main.go | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/customize.go b/customize.go index 9a99e48..87d18c7 100644 --- a/customize.go +++ b/customize.go @@ -49,6 +49,12 @@ func loadCustomize(filename string) (customize, error) { ) } +func (c *customize) defaults() { + if len(c.AppTitle) == 0 { + c.AppTitle = "OTS - One Time Secrets" + } +} + func (c customize) ToJSON() (string, error) { j, err := json.Marshal(c) return string(j), errors.Wrap(err, "marshalling JSON") diff --git a/frontend/index.html b/frontend/index.html index 8c887b8..d74eafb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -30,7 +30,7 @@ rel="stylesheet" > - OTS - One Time Secrets + {{ .Customize.AppTitle }}