Light/Dark Mode

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
This tutorial only applies to 2.2 themes. These steps will not work for 2.3 themes.

Some xenfocus themes come in dark and light colour schemes. If you have purchased both colour schemes (or if you own the "Pro" version), you can enable a light/dark toggle switch which allows your members to easily switch between the two colour schemes. The switch is located in the user panel (next to your notifications and inbox icons), and in the footer (next to the Style selector).

1. To begin, you must first install both the light and dark versions of your theme.

2. Next, you need to find out the ID of your styles. To do this, visit the Styles page in your Admin Cpanel and click on "Style Properties" next to the Light version of your theme. The URL will look something like this:
https://site.com/admin.php?styles/dimension.5/style-properties

By looking at the URL, you'll notice the Style ID for the light theme is 5
Repeat these steps for the Dark theme to get its Style ID, which (for this example) is 6.
Keep these two values in mind.

3. Visit the Style Properties page for the Light theme and open the Xenfocus: Light/Dark Mode group. Enter the Style ID of the Dark theme (6), and press Save.

4. Repeat the above step but for the Dark theme. Open the Light/Dark Mode group and enter the Style ID of the Light theme. Press Save.

Done!
 
Last edited:

markbrule

New Member
Messages
1
I dont know how many times I tried until I noticed I was doing it the other way around. For the Dark Light I was using its same ID instead using the one to call the Dark Mode and viceversa.... :).

Apart from that, works as a charm!!!
 

allbuffs

New Member
Customer
Messages
6
I just imported the Uniform Style (both dark and light). I created a child style for each. I was able to configure the dark mode switch in the Uniform light style but I don't get the same options for the Dark Style
ab_light.jpeg


ab_dark.jpeg



styles2.jpeg
 

nodle

Active Member
Customer
Messages
270
Website
fluxoid.com
A suggestion or idea. Is there anyway to make the Light version of Uniform switch to Dark at a certain time setting? I remember one of your other themes would switch to the Dark version in the evening. Is there anyway to do this with Uniform? Or is it to complex to do?
 

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
@nodle Thats something I’ve actually been looking into recently but I’m not sure of a solution. I don’t know how to force the theme to be changed automatically without having the visitor click the theme link (either the Style picker or the dark/light toggle icon).

Also, I’m not sure how to change themes during (or even before) page load. For example, if you visited the site at midday, the light version would be shown. If you closed your browser and revisited the site at 9:00pm, the dark theme would ideally be shown, but it would need to be applied before the page is loaded which I don’t believe is possible (without the use of a plugin)

It’s a nice idea in theory but I just have no idea how to apply it unfortunately.
 

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
My apologies. The name varies across themes. But the top Style Property group (Xenfocus: Illuminate settings) literally mentions light/dark mode in the description, so you’ll find it in there
 
Top