diff options
author | 2024-03-25 18:32:24 +0100 | |
---|---|---|
committer | 2024-03-25 17:32:24 +0000 | |
commit | 8953f57d887c060c3b58f83c38d2010d27a45ef3 (patch) | |
tree | 05f8b1157a86afaa3ed0d6d0b87c9d0d37030362 /docs/admin/themes.md | |
parent | [feature] Add healthcheck endpoints `/livez` and `/readyz` (#2783) (diff) | |
download | gotosocial-8953f57d887c060c3b58f83c38d2010d27a45ef3.tar.xz |
[feature] User-selectable preset CSS themes for accounts (#2777)
* [feature] User-selectable preset themes
* docs, more theme stuff
* lint, tests
* fix css name
* correct some little issues
* add another theme
* fix poll background
* okay last theme i swear
* make retrieval of apimodel themes more conventional
* preallocate stylesheet slices
Diffstat (limited to 'docs/admin/themes.md')
-rw-r--r-- | docs/admin/themes.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/admin/themes.md b/docs/admin/themes.md new file mode 100644 index 000000000..a3ef11b05 --- /dev/null +++ b/docs/admin/themes.md @@ -0,0 +1,30 @@ +# Themes + +Users on your instance can select a theme for their profile from any css files present in the `web/assets/themes` directory. + +GoToSocial comes with some theme files already, but you can add more yourself by doing the following: + +1. Create a file in `web/assets/themes` called (for example) `new-theme.css`. +2. (Optional) Include the following comment at the top of your theme file to title and describe your theme: + ```css + /* + theme-title: My New Theme + theme-description: This is an example theme + */ + ``` + You can use any text you like for these fields, but bear in mind whatever you write here will appear in the settings panel to help users when selecting a theme, so keep it short and sweet. +3. Fill out your custom CSS in the rest of the file. You can use one of the existing CSS files to guide you. Also see [this page](../user_guide/custom_css.md) for some rough guidelines about how to write accessible CSS. +4. Restart your instance so that the new CSS file is picked up. + +!!! info + If you're using Docker for your deployment, you can mount theme files from the host machine into your GoToSocial `web/assets/themes` directory instead, by including entries for them in the `volumes` section of your Docker configuration. + + For example, say you've created a theme on your host machine at `~/gotosocial/my-themes/new-theme.css`, you could mount that theme into the GoToSocial Docker container in the following way: + + ```yaml + volumes: + [.... some other volume entries ...] + - "~/gotosocial/my-themes/new-theme.css:/gotosocial/web/assets/themes/new-theme.css" + ``` + + Bear in mind if you mount an entire directory to `/gotosocial/web/assets/themes` instead of mounting individual theme files, you'll override the default themes. |