Totara Learn Open Discussions

All about custom theme

 
GoRocky
All about custom theme
GoRocky 发表于 2022年03月9日 Wednesday 09:28
 

Hi there,

I have a couple of questions regarding custom theme in Totara 14/15.

1. How to change the default color as seen in 'colors' tab on the theme settings page, ie. Primary brand color is default to #4b7e2b. Where to change this value? I've tried overriding the variable through /client/component as well as /server to no avail.

2. Is it possible to add more theme settings? In totara 12, I used to create my own theme settings but I couldn't figure out a way to do this using Ventura theme. I would like to retain the current Ventura's theme settings, but add more tabs to it.

Thank you for the help.


Regards,

Rocky

ChesterSimon
Re: All about custom theme
ChesterSimon 发表于 2022年03月10日 Thursday 19:54
小组 Totara

Hi Rocky,

To change the default colours, you'll need to set them in the global_styles/_variables.scss file in the client/component folder for your theme, and they'll be picked up from there.

Have a look at theme_ventura's one for an example: client/component/theme_ventura/src/global_styles/_variables.scss

To add more theme settings, currently this can be done by overriding the core theme settings components in your theme.

There are some examples of both of the above in our example theme repository: https://git.totaralearning.com/projects/EXAMPLE/repos/theme_example/browse

Cheers,

Simon

LechAleksander
Re: All about custom theme
LechAleksander 发表于 2022年12月20日 Tuesday 02:20
小组 2022 Learner of the Year (Bronze)小组 TXP Site Administrator

Hi Simon,

I'm trying to overwrite the default ventura colours as per your suggestion but with no luck. 
Other than editing the file component/THEME/global_styles/_variables.scss is it anything more in terms of configuration or scripting that should be done?

My overriden scss value is not present on the theme settings page.


Thanks

Olek