Nun können Benutzer die neue Farbpalette auf ihrer jeweiligen Seite unter https://your-site.com/my/preferences/interface auswählen:
Zugriff auf Benutzereinstellungen: Benutzer können zu ihren Einstellungen navigieren, indem sie auf ihr Profilsymbol in der oberen rechten Ecke des Forums klicken und im Dropdown-Menü „Preferences“ (Einstellungen) auswählen.
Registerkarte „Interface“: Innerhalb der Einstellungen enthält die Registerkarte „Interface“ (Oberfläche) die Einstellung zur Auswahl einer Farbpalette für den hellen und dunklen Modus.
Farbpalettenauswahl: Benutzer können ihre bevorzugte Farbpalette aus dem bereitgestellten Dropdown-Menü auswählen.
Interface-Farbmodus: Benutzer können auch ihren bevorzugten Interface-Farbmodus auswählen – Auto (folgt den Systemeinstellungen), Light (Hell) oder Dark (Dunkel).
Änderungen speichern: Nach der Auswahl der gewünschten Farbpalette müssen die Benutzer auf die Schaltfläche „Save Changes“ (Änderungen speichern) am unteren Rand der Seite klicken, um die Änderungen zu übernehmen.
Great work! Simple to understand how to compose themes together quite nicely – I’m going to play around with themes soon, for sure!
Bit o’ feedback on this:
I’m seeing that there’s an option to import themes directly - What’s the structure that import-able themes should take? A repository with the .dcstyle.json file(s) at the root? It’s not clear, and the placeholder value – https://github.com/discourse/discourse/sample_theme - doesn’t lend any clues.
It also seems that exporting themes got a little more difficult as you can’t just export a theme with a single click if that theme is dependent on child themes. I understand why this might need to be this way, but I’m concerned about portability of themes with the added inheritance - will there be a way to export the theme as a bundle with all child themes attached as well?
This is fabulous. Thanks for adding this feature and for writing up this howto. Can you add instructions for specifying a different logo for the dark theme? That will be a common request I am sure.
Setting up a dark theme made me inquire into where this grey background colour comes from:
I do not have any black in my colour scheme so I suppose that the grey is calculated as a lighter version of the complementary colour of the primary colour (white, in my case).
While I can see the reasoning behind it, it doesn’t really work if your black theme is using anything outside the black/grey spectrum as secondary colour. Perhaps it’s a matter of taste, but I’d probably prefer that navigation button background colour (or whatever it’s called) to be based on the secondary colour.
I am not saying that every colour should be chosen manually (discourse is generally doing a great job in calculating colours - mainly shades and tints, I believe - based on the few customizable ones) but this particular formula seems a bit too constraining.
Perhaps it can be solved with a single switch that allows the user to switch the color base between primary and secondary colour?
Use secondary colour as base for button backgrounds
@tophee, I think the derivative colors make it really easy to use. For advanced color schemes you have to use advanced features—specifically custom CSS in this case. That seems like a logical ask to me.
Awesome. This makes browsing the discourse at night so much easier on the eyes, even with the new Windows 10 “night mode” the light theme is pretty bright.
Now the ability to switch the theme easily through a keyboard shortcut, menu item or other button, and we’re set!
In my testing I am noticing some peculiarities, and I even had another user on my site test this because this seemed to simple that I thought I was missing something, but here are my steps to reproduce:
Have no user selectable themes enabled.
Change your default theme.
Observed Result: The theme doesn’t change for the user until they go in to their Preferences > Interface and click Save Changes, even though that is the only theme available to them in the dropdown. Is anybody else seeing this?
Yeah, must just be a cookie refresh issue. I was doing a hard refresh clearing the cache, but I had two logged in tabs open so I think that may have played a part. I can reproduce in incognito, but not after a hard refresh, so this appears to be a non-issue. I will be more careful about testing in incognito mode before reporting again. Thanks for the quick reply.
Hello
I have try it but i am not able to change theme from menu (like on meta) i use discourse app and safari and still not show . I run the latest version of discourse .
My guess from looking at your CSS is that the padding-left: 150px; is the cause; your .logo-small is 40px wide, so you’d have 110px of space to the right of it because of that padding-left.