You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,23 +18,30 @@ Secure settings such as database credentials, API keys, email settings etc. can
18
18
TeSS' UI is built on [Bootstrap 3](https://getbootstrap.com/docs/3.4/). To customize the appearance of TeSS, go into
19
19
the themes folder (`app/assets/stylesheets/themes`) and make a copy of the default theme file (`default.scss`).
20
20
In your copy, you can tweak any of the existing variables, add overrides for any Bootstrap variables
21
-
([reference](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss)) and add
22
-
new CSS/Sass styles.
21
+
([reference](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss)) and add new CSS/Sass styles (look at the other themes in that directory, and the `mixins/_modern_base.scss` mixin for reference).
23
22
24
-
To enable your theme, edit `app/assets/stylesheets/mixins/variables.scss` and change the line:
25
-
```scss
26
-
@import"../themes/default";
27
-
```
28
-
to point to your new theme file...
29
-
```scss
30
-
@import"../themes/new_theme";
23
+
To use your theme as the site default, edit your `config/tess.yml` config file and change
24
+
(or add if not present) the `default_theme` variable under the `site` section to reference your new theme file (sans the `.scss` extension):
25
+
26
+
```yml
27
+
default: &default
28
+
# ...
29
+
site:
30
+
# ...
31
+
default_theme: my_theme
31
32
```
32
33
34
+
Additionally, you will need to create a symlink for the theme's images:
Be sure to recompile assets (`bundle exec rake assets:recompile`), or rebuild your docker image,
34
39
and restart the application to apply the new styles.
35
40
36
41
You can visit <http://localhost:3000/theme_showcase> on your local instance to see various Bootstrap elements with the
37
-
current theme applied.
42
+
current theme applied.
43
+
44
+
You can also add a query parameter `theme_preview` to the URL of any page to preview different themes, e.g. <http://localhost:3000/theme_showcase?theme_preview=blue>
0 commit comments