Sidebar theme toggle

:discourse2: Summary Sidebar Theme Toggle adds a theme selector in the sidebar menu’s footer provided there is more than 1 user selectable theme. This selector works with both logged-on users and anonymous users. Be sure to add this to all your user-selectable themes for easy toggling.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-sidebar-theme-toggle
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Screen Shot 2022-10-24 at 10.44.04 AM

We may do some additional work here in the future to make this a more comprehensive menu that allows users to choose colors, font-sizes, and theme from one menu — but for now this grants sites the same basic behavior as the Hamburger Theme Selector! :rocket:

19 Likes

Will it work someday with iPhone/iPad too?

2 Likes

It should already work on mobile devices, but let us know if there are any issues!

3 Likes

Well… it doesn’t :wink: Not here, not on my own.

2 Likes

ah I see, I’ll have to double check the app, looks like the footer’s getting cut off there… thanks for mentioning it!

3 Likes

You are totally right. The issue is the Hub.

1 Like

This is a great idea for a component, but I’m having a little difficulty getting it to work. I’ve installed it and included it in all my themes but the drop-down doesn’t appear. If I toggle the “hide theme name” setting, the keyboard shortcut icon moves from the left side of the sidebar footer to the right, but no theme selector.

1 Like

Thanks Kris, unfortunately it’s not working on my site. Did a hard refresh of course, tried different themes that have no other components, don’t see anything relevant in the console or logs…

1 Like

Rebuild your instance. It will fix all of the issues mentioned above so far.

2 Likes

oh yes, I should have mentioned that if you haven’t updated Discourse in the past few days you should do that as well

4 Likes

I think I’m on the most recent version…

Screenshot 2022-10-24 at 18.32.16

I’ll try rebuilding later. Our users tend to freak out a bit if the site goes offline with no warning.

3 Likes

You should consider this :sunglasses:

2 Likes

What about a dark theme selector? For light, dark and auto. That seems broken since I switched to the sidebar.

1 Like

A post was merged into an existing topic: While loading a new component on the site, the site is down