summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/admin/themes.md30
-rw-r--r--docs/api/swagger.yaml50
-rw-r--r--docs/assets/user-settings-profile-info.pngbin140661 -> 104092 bytes
-rw-r--r--docs/user_guide/settings.md18
4 files changed, 96 insertions, 2 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.
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index e962c6724..e17e3f479 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -294,6 +294,10 @@ definitions:
description: Account has been suspended by our instance.
type: boolean
x-go-name: Suspended
+ theme:
+ description: Filename of user-selected CSS theme to include when rendering this account's profile or statuses. Eg., `blurple-light.css`.
+ type: string
+ x-go-name: Theme
url:
description: Web location of the account's profile page.
example: https://example.org/@some_user
@@ -2463,6 +2467,24 @@ definitions:
type: object
x-go-name: Tag
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
+ theme:
+ properties:
+ description:
+ description: User-facing description of this theme.
+ type: string
+ x-go-name: Description
+ file_name:
+ description: FileName of this theme in the themes directory.
+ type: string
+ x-go-name: FileName
+ title:
+ description: User-facing title of this theme.
+ type: string
+ x-go-name: Title
+ title: Theme represents one user-selectable preset CSS theme.
+ type: object
+ x-go-name: Theme
+ x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
wellKnownResponse:
description: See https://webfinger.net/
properties:
@@ -3448,6 +3470,34 @@ paths:
summary: Search for accounts by username and/or display name.
tags:
- accounts
+ /api/v1/accounts/themes:
+ get:
+ operationId: accountThemes
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: Array of themes.
+ schema:
+ items:
+ $ref: '#/definitions/theme'
+ type: array
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "404":
+ description: not found
+ "406":
+ description: not acceptable
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - read:accounts
+ summary: See preset CSS themes available to accounts on this instance.
+ tags:
+ - accounts
/api/v1/accounts/update_credentials:
patch:
consumes:
diff --git a/docs/assets/user-settings-profile-info.png b/docs/assets/user-settings-profile-info.png
index 1b9ab6aea..fd4623143 100644
--- a/docs/assets/user-settings-profile-info.png
+++ b/docs/assets/user-settings-profile-info.png
Binary files differ
diff --git a/docs/user_guide/settings.md b/docs/user_guide/settings.md
index d82b2c084..390e5c209 100644
--- a/docs/user_guide/settings.md
+++ b/docs/user_guide/settings.md
@@ -22,6 +22,15 @@ A preview of the image as it will appear on your profile will be shown. If you'r
If you navigate to your profile and refresh the page, your new avatar / header will be shown. It might take a bit longer for the update to federate out to remote instances.
+### Select Theme
+
+GoToSocial provides themes for you to choose from for the web view of your profile, to change your profile's appearance and vibe.
+
+To choose a theme, just select it from the profile settings page, and click/tap "Save profile info" at the bottom of the page. When you look at your profile in the web view (you may need to refresh the page), you'll see the new theme applied, and so will anyone else visiting your profile.
+
+!!! tip "Adding more themes"
+ Instance admins can add more themes by dropping css files into the `web/assets/themes` folder. See the [themes](../admin/themes.md) part of the admin docs for more information.
+
### Basic Information
#### Display Name
@@ -109,9 +118,14 @@ Turning on the discoverable flag may take a week or more to propagate; your acco
#### Custom CSS
-If enabled on your instance by the instance administrator, [Custom CSS](./custom_css.md) allows you to theme the way your profile looks when visited through a browser.
+If enabled on your instance by the instance administrator, custom CSS allows you to further customize the way your profile looks when visited through a browser.
-When this setting is not enabled by the instance administrator, the text input box is read-only.
+When this setting is not enabled by the instance administrator, the text input box is read-only and custom CSS will not be applied.
+
+See the [Custom CSS](./custom_css.md) page for some tips on writing custom CSS for your profile.
+
+!!! tip
+ Any custom CSS you add in this box will be applied *after* your selected theme, so you can pick a preset theme that you like and then make your own tweaks!
## Post Settings