Assistance with Creating a Customizable Web Template.

Hello everyone,

I’m reaching out to the community because I’m currently employed as a front-end developer and I’ve run into a challenge at my job that I’m hoping you can help me solve.

I’ve been tasked with creating a customizable web template, but I’ve been having some difficulty getting it to work the way I want it to. I’ve noticed that the functionality on this website is exactly what I’ve been aiming to achieve in my project.

To give you a bit more context, It is a laravel web application and is running on version 10 framework for my styling I am using bootstrap 5. I have setting for dark or light mode theme but I need it to allow the user to choose a specific color theme, font style and size.

If anyone has experience with creating customizable web templates, could you share some guidance or point me towards any resources that might help me understand better? I would really appreciate any advice you can provide.

Thank you in advance for your time and help.

Best,
Taliwe

Hi Menzi! When you mention customizable web template, do you have an example of a template whose similar customizations you would like to expose?

There are many ways to customize a template, and the sky’s the limit on how deep you want to go there :slight_smile:

1 Like

I’m seeing the following once I log-in:


I click the theme switcher, and I see that most of the content switches appropriately.

Are you looking to make the theme switching work differently?

Thanks,
Kirupa


Actually, This is the functionality I need…

Thanks,
Menzi

Ah! Here is how your current dark/light mode is implemented:

Notice that your root html tag has the attribute data-bs-theme="dark" set on it when you switch to dark mode. Your styles have the appropriate selectors set to become active when that happens. You are setting CSS custom properties whose values are going to vary depending on the light/dark mode you end up choosing.

Do you have access to modifying the JavaScript and the CSS for your template?

Cheers,
Kirupa

1 Like

can I email?

No, please use the forums. Note that we likely can’t do the full work for you, but we can guide you in the right direction.

Can you be more specific about the area you are having difficulty with?

including multiple color options for the theme layout option, That is what I want to do?

Yes. I gave you a general approach for how you can do this. What you need is a series of CSS style selectors that are designed for the various color options that you want. You can trigger them based on an attribute change in the HTML. You have light and dark already implemented. This would be a copy/paste and rename to avoid naming collisions :slight_smile:

For the actual dialog that allows you to change the themes, if you want to reuse the one that I have, feel free to borrow it by viewing source / inspecting the CSS.

1 Like

Noted! I will try doing it that way.
Thank you for the guidance!

1 Like

Do share what the final results ends up looking like or if you need further guidance! :slight_smile:

Will Do