mirror of
https://github.com/Luzifer/ots.git
synced 2025-04-19 06:55:51 -04:00
Customize HTML page title
The existing customize feature only changed the title in the navbar.
This commit is contained in:
parent
48d16f3543
commit
faccb174e3
@ -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")
|
||||
|
@ -30,7 +30,7 @@
|
||||
rel="stylesheet"
|
||||
>
|
||||
|
||||
<title>OTS - One Time Secrets</title>
|
||||
<title>{{ .Customize.AppTitle }}</title>
|
||||
|
||||
<script nonce="{{ .InlineContentNonce }}">
|
||||
window.getTheme = () => localStorage.getItem('set-color-scheme') || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
|
||||
|
Loading…
x
Reference in New Issue
Block a user