Add file viewer branding options

This commit is contained in:
2022-02-07 12:00:22 +01:00
parent 1de3bb49c5
commit af82d45c6e
20 changed files with 477 additions and 103 deletions

View File

@@ -9,7 +9,7 @@ import (
"time"
)
func userStyle(r *http.Request) (s pixeldrainStyleSheet) {
func userStyleFromRequest(r *http.Request) (s pixeldrainStyleSheet) {
// Get the chosen style from the URL
var style = r.URL.Query().Get("style")
@@ -20,6 +20,10 @@ func userStyle(r *http.Request) (s pixeldrainStyleSheet) {
}
}
return userStyle(style)
}
func userStyle(style string) (s pixeldrainStyleSheet) {
switch style {
case "classic":
s = pixeldrainClassicStyle