From 0ab4d878869749e22677c7725efff078b829d815 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 18 Nov 2023 21:26:29 +0100 Subject: [PATCH] documented the theme variable --- webclient/README.md | 8 +++----- webclient/build.sh | 2 +- webclient/index.html | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/webclient/README.md b/webclient/README.md index 5269b6bb7..94f397b3e 100644 --- a/webclient/README.md +++ b/webclient/README.md @@ -77,17 +77,15 @@ Each of those files are similar but differ in some aspects. If you serve the release build with a webserver (such as Nginx) you need to select the correct files based on the request URL and headers. ```plain --.html - ↑ ↑ - │ └── The page language. Either "de" or "en" at the moment. - │ It should be selected based on the "lang" Cookie or else the "Accept-Language" header. +.html + ↑ └── The page theme. Either "light" or "dark" at the moment. It should be selected based on the "theme" Cookie ("light" by default). ``` The language-selector is working in development and this differentialtion is only happening in the build. For the theme we can not do so for some reason (If you know of a better way, hit us up). -To test a different theme, you can change `$theme` [here](./src/assets/variables.scss). Values are `light` and `dark`. +To test a different theme, you can change `$theme` [here](./src/assets/variables.scss) and `theme='...'` [here](./index.html). Values are `light` and `dark`. ## Architecture diff --git a/webclient/build.sh b/webclient/build.sh index 9fb983d6a..26b64aa24 100755 --- a/webclient/build.sh +++ b/webclient/build.sh @@ -9,7 +9,7 @@ for THEME in light dark do # make sure we are really only building the right theme sed -i "s/\$theme: .*/\$theme: \"${THEME}\";/" src/assets/variables.scss - sed -i "s/>THEME - +