mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
[WIP] theme selector
This commit is contained in:
parent
a7e52809dc
commit
11e164496b
74 changed files with 363 additions and 38 deletions
|
@ -63,6 +63,7 @@ func (h *Handler) Meta(w http.ResponseWriter, r *http.Request) {
|
|||
data.ConversionEndpoint = org.ConversionEndpoint
|
||||
data.Storage = h.Runtime.StoreProvider.Type()
|
||||
data.Location = h.Runtime.Flags.Location // reserved
|
||||
data.Theme = org.Theme
|
||||
|
||||
// Strip secrets
|
||||
data.AuthConfig = auth.StripAuthSecrets(h.Runtime, org.AuthProvider, org.AuthConfig)
|
||||
|
@ -277,3 +278,20 @@ type sitemapItem struct {
|
|||
type searchStatus struct {
|
||||
Entries int `json:"entries"`
|
||||
}
|
||||
|
||||
// Themes returns list of installed UI themes.
|
||||
func (h *Handler) Themes(w http.ResponseWriter, r *http.Request) {
|
||||
type theme struct {
|
||||
Name string `json:"names"`
|
||||
Primary string `json:"primary"`
|
||||
}
|
||||
|
||||
th := []theme{}
|
||||
|
||||
th = append(th, theme{Name: "Default", Primary: "#280A42"})
|
||||
th = append(th, theme{Name: "Blue", Primary: "#176091"})
|
||||
th = append(th, theme{Name: "Deep Orange", Primary: "#BF360C"})
|
||||
th = append(th, theme{Name: "Teal", Primary: "#00695C"})
|
||||
|
||||
response.WriteJSON(w, th)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue