Initial commit
Test / test (push) Successful in 7m5s
Release / gates (push) Successful in 7m28s
Release / build (amd64, freebsd) (push) Successful in 2m52s
Release / build (amd64, linux) (push) Successful in 2m46s
Release / build (arm64, freebsd) (push) Successful in 2m22s
Release / build (arm64, linux) (push) Successful in 2m38s
Release / build (loong64, linux) (push) Successful in 2m7s
Release / build (riscv64, linux) (push) Successful in 2m17s
Release / release (push) Successful in 1m0s
Test / test (push) Successful in 7m5s
Release / gates (push) Successful in 7m28s
Release / build (amd64, freebsd) (push) Successful in 2m52s
Release / build (amd64, linux) (push) Successful in 2m46s
Release / build (arm64, freebsd) (push) Successful in 2m22s
Release / build (arm64, linux) (push) Successful in 2m38s
Release / build (loong64, linux) (push) Successful in 2m7s
Release / build (riscv64, linux) (push) Successful in 2m17s
Release / release (push) Successful in 1m0s
Assisted-by: GLM 5.3
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
|
||||
|
||||
package web
|
||||
|
||||
import "slices"
|
||||
|
||||
// Themes are the colour schemes the admin UI ships, in the order the
|
||||
// settings switch lists them. Each scheme takes its values from the
|
||||
// stops of the matplotlib colour map of the same name.
|
||||
var Themes = []string{"viridis", "plasma", "magma"}
|
||||
|
||||
// DefaultTheme is the scheme an account without a choice renders in.
|
||||
const DefaultTheme = "viridis"
|
||||
|
||||
// ThemeCookie carries the colour scheme across the login screen, where
|
||||
// no account is known yet.
|
||||
const ThemeCookie = "volumen_admin_theme"
|
||||
|
||||
// ValidTheme reports whether the value is a shipped colour scheme.
|
||||
func ValidTheme(theme string) bool {
|
||||
return slices.Contains(Themes, theme)
|
||||
}
|
||||
Reference in New Issue
Block a user