Totara Learn Open Discussions

V.18 Customize Theme

 
PinedaServando
V.18 Customize Theme
PinedaServando 发表于 2024年01月9日 Tuesday 15:21
小组 Helpful contributor 2024小组 Partners小组 TXP Site Administrator

Hi, In Totara V18 we tried to create a custom landing page. On Totara v17 we didn't have any problems, just change HTML and CSS code and it works! But on V18 with the VUE framework the landing page does not apply the custom code...

Do you have any idea how to apply the CCS code?

Craig Eves
Re: V.18 Customize Theme
Eves (Totara Support)Craig 发表于 2024年01月9日 Tuesday 19:14
小组 Totara

Hi Servanda

There is some documentation on overriding styles here

Can you describe what you mean by custom code - what sort of code is this?

regards

PinedaServando
Re: V.18 Customize Theme
PinedaServando 发表于 2024年01月10日 Wednesday 09:17
小组 Helpful contributor 2024小组 Partners小组 TXP Site Administrator

In loggingpage we used to create a tag inside a div. See the example.

Now we will try with the code in this file: cod_totara/client/component/core_auth/src/pages/Login.vue

But it doesn't work

Is it the right file?

I just want to add a little bit of HTML code to the login page.

Craig Eves
Re: V.18 Customize Theme
Eves (Totara Support)Craig 发表于 2024年01月10日 Wednesday 13:59
小组 Totara

Hi Servando

Thanks for the further details - this looks like you may need to rebuild TUI as detailed inhttps://totara.atlassian.net/wiki/spaces/DEV/pages/121188213/The+build+process .

Can you try this to see if this resolves the problem?

regards


PinedaServando
Re: V.18 Customize Theme
PinedaServando 发表于 2024年01月23日 Tuesday 09:57
小组 Helpful contributor 2024小组 Partners小组 TXP Site Administrator

Hi Craig.

Just to thank you. All works, we update the vue.js files with the NPM.

See you soon.

NormanAmanda
Re: V.18 Customize Theme
NormanAmanda 发表于 2024年02月13日 Tuesday 12:33
小组 Partners

hi, is it possible to override this login.vue file to my own folder in client?
(core_auth/src/components/pages/login.vue)

i have client/theme_mytheme/global_styles in client to define buttons.. but if i want to add something in login.php, i have to add it in login.vue.. but how can i create a pathway in my client folders to override the default file?



WalkerPaul
Re: V.18 Customize Theme
WalkerPaul 发表于 2024年08月12日 Monday 01:35
小组 Partners

As you've suggested, the best way to override the 'Login.vue' page is via your own component theme, and not editing core files (which is the answer provided by the OP).


To override a page (E.g): 'core_auth/src/components/pages/login.vue'

use

'theme_mytheme/src/pages/overrides/core_auth/login.vue'


to override a component (E.g): 'core_auth/src/components/login/LoginForm.vue'

use

'theme_mytheme/src/components/overrides/core_auth/login/LoginForm.vue'


Remember to build the files via NPM ('npm tui-build') after creating these paths.