Hamburger Theme Selector


(Sam Saffron) #1


repo: GitHub - discourse/discourse-hamburger-theme-selector


This theme component adds a theme selector in the hamburger menu provided there is more than 1 user selectable theme. This selector works with both logged on users and anonymous users.

Install guide

How to install a theme or theme component

Automatic Day/Night Mode (theme) switch when it is actually night
Allow users to select dark / light theme
Font size theme
How to have skin selection in the hamburger dropdown like THIS forum?
Dark theme activated but cannot be selected
Allowing user to select theme
How to change theme on the fly?
Need a little help getting theme and other items setup
Better theme settings on user front-end
Link to switch themes (light/dark) without having to go in to user settings
Button on header to toggle dark theme
Discourse Classic Theme
Issue changing themes
Configure tag color
Font size - can members edit this?
(Cee Kay) #2

There should be some title or heading(Like Categories in the hamburger)to inform n00bie users that this is the list of user selectible themes.

(Sam Saffron) #3

Feel free to form my theme and try it out, not sure about this suggestion cause there is nowhere to link that text. “Categories” actually links to the categories page.

(Jo0Lz) #5

Did it break with one of the recent Discourse updates? The menu items still show, but clicking on them doesn’t do anything…

I was thinking of some seperate button (light switch?) or something to make it even easier to switch, something like this:

Would that be easy to accomplish?

(Sam Saffron) #6

It sure did, and I just fixed it.

The light switch is doable but would require hardcoded theme keys so its not that easy to share.

(Iceman) #7

Edited to not bother Sam, sorry for the inconvenience.

(Jo0Lz) #8

Hey iceman, you can just copy the HTML from the HTML file on the git and add it to the theme HTML :upside_down_face:

(Iceman) #9

Thanks a lot, don’t know why I totally forgot about the process… sorry for the inconvenience and my n00bness.

Thanks again.

(Jo0Lz) #10

Hey, we’re all here to learn and help, that’s the purpose of this site! :call_me_hand:t3: Glad you got it sorted!

(Republic Wireless) #11

I added this component and it works well when logged in but when not logged in it refreshes the page without applying the chosen theme. Thought?

(Jeff Atwood) #12

There is no concept of per-user theming without being logged in, since there is no user in the anonymous case. So the bug is that it should only show up for logged in users.

(Republic Wireless) #13

OK, that make sense.

This text might need changing then:

(Jeff Atwood) #14

Hmm yeah I have no idea how this would work with anon users, @sam will have to answer that. Maybe he had some weirdo cookie hack in before for site-wide themes or something.

(Sam Saffron) #15

It should work with anon I just need to fiddle with it a bit, the cookie keeps track of the theme

(Sam Saffron) #16

A 4 letter regression in core is now fixed :wink:

Will deploy republic later today @Sean_R


The selector still only works with logged in users… Is it still broken or am I doing something wrong?

(Sam Saffron) #18

Great catch, this is fixed now in latest, it was a bug in core. I will backport it to stable.

(Nigel Tatschner) #19

Hi All,

I’m being stupid, I’ve added this via the template upload function and it appears in the list but it’s not working.

Please help, i’m being special.


After you import the Hamburger Theme Selector you need to add the Hamburger Theme Selector as a Theme Component.

(Yegor) #21

Hi guys!

Our themes do not appear in the hamburger menu, so the users (and the admin aswell) cannot switch between themes. What could be wrong?