jrgong
(jrgong)
May 20, 2021, 4:37pm
1
What would you like done?
I would like to give my users the ability to override the dark mode setting manually from the user avatar dropdown menu.
The idea is to use the exact same behaviour as the “Do not Disturb” Toggle.
When do you need it done?
May 15
What is your budget, in $ USD that you can offer for this task?
100-300 USD
3 Likes
Moin
May 20, 2021, 5:29pm
2
Not in a dropdown menu. But maybe an alternative.
[deprecated ]
Hey Discourse Community,
after a lot of requests I share a Theme Switcher component, encapsulated from my Alien Night Theme .
For now, once pressed the button it will switch your theme into a dark mode theme.
Later on I can maybe implement a setting page, where you can define your own global CSS class your theme should switch into.
Or just toggle between the first two themes you allowed for users to choose from…
Installation & Download
Preview
[image]
[image]
[image] …
1 Like
jrgong
(jrgong)
May 20, 2021, 5:48pm
3
As far as I am concerned, that component is outdated and doesn’t support the new dark theme feature.
Also in our use case we don’t have any extra space in our mobile header, so we prefer the user menu.
1 Like
th21
June 6, 2021, 7:07pm
4
What do you mean by overriding? We have a toggle on the header bar that allow user to switch between current theme and dark mode
1 Like
jrgong
(jrgong)
June 7, 2021, 2:04pm
5
That toggle doesn’t make use of the core dark mode functionality, doesn’t it? See the corresponding topic here, the component hasn’t been updated in a while:
Hey Sir I am using this theme component But after using it in classic default theme when i switch to dark mode The admin panel looks like this
[Screenshot (80)]
All text Goes invisible
i have tried changing secondary color but if i change that it Changes Full theme background also Changes Which i don’t want i only want to change secondary text color so it is visible
Please if u have any solutions share it plz
1 Like
nolo
(Manuel)
June 7, 2021, 3:03pm
6
No, it doesn’t make use of the dark color scheme you can set in the admin backend. It uses new css rules for it’s own dark scheme. So the name is a bit misleading, because it switches only to the Alien theme dark colors.
I’m not aware there’s a generic theme component to toggle color schemes right now. I guess it could be written similar to the Header Theme Toggle and using functions from discourse/lib/color-scheme-picker
. Can’t code it myself either though
3 Likes
th21
June 7, 2021, 5:42pm
7
it’s inspired by the theme switcher and
I’ve built a simple toggle for the header that switches between two themes on click.
[ezgif-1-3a57fa471d85]
Github repo : https://github.com/awesomerobot/discourse-header-theme-toggle
How do I install a Theme or Theme Component? - #44
In the theme component’s settings, you can define the two themes:
[image]
Please note
Both themes must have Theme can be selected by users enabled, and both themes must also have this theme component added.
…
so you can switch between whatever theme you are on and the drak theme (scheme defined in admin tool
1 Like
I am interested to take this up. Sending you a PM
1 Like
system
(system)
Closed
July 21, 2021, 3:19am
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.