mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-22 02:41:23 +02:00
Allow setting custom footer
This commit is contained in:
parent
f57bdeec12
commit
7ffca9c3f1
@ -65,9 +65,13 @@
|
|||||||
|
|
||||||
{{ if not .App.Config.Branding.HideFooter }}
|
{{ if not .App.Config.Branding.HideFooter }}
|
||||||
<div class="footer flex items-center flex-column">
|
<div class="footer flex items-center flex-column">
|
||||||
|
{{ if eq "" .App.Config.Branding.CustomFooter }}
|
||||||
<div>
|
<div>
|
||||||
<a class="size-h3" href="https://github.com/glanceapp/glance" target="_blank" rel="noreferrer">Glance</a> {{ if ne "dev" .App.Version }}<a class="visited-indicator" title="Release notes" href="https://github.com/glanceapp/glance/releases/tag/{{ .App.Version }}" target="_blank" rel="noreferrer">{{ .App.Version }}</a>{{ else }}({{ .App.Version }}){{ end }}
|
<a class="size-h3" href="https://github.com/glanceapp/glance" target="_blank" rel="noreferrer">Glance</a> {{ if ne "dev" .App.Version }}<a class="visited-indicator" title="Release notes" href="https://github.com/glanceapp/glance/releases/tag/{{ .App.Version }}" target="_blank" rel="noreferrer">{{ .App.Version }}</a>{{ else }}({{ .App.Version }}){{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
{{ .App.Config.Branding.CustomFooter }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html/template"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -50,6 +51,7 @@ type Server struct {
|
|||||||
|
|
||||||
type Branding struct {
|
type Branding struct {
|
||||||
HideFooter bool `yaml:"hide-footer"`
|
HideFooter bool `yaml:"hide-footer"`
|
||||||
|
CustomFooter template.HTML `yaml:"custom-footer"`
|
||||||
LogoText string `yaml:"logo-text"`
|
LogoText string `yaml:"logo-text"`
|
||||||
LogoURL string `yaml:"logo-url"`
|
LogoURL string `yaml:"logo-url"`
|
||||||
FaviconURL string `yaml:"favicon-url"`
|
FaviconURL string `yaml:"favicon-url"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user