Choice of Light or Dark site theme

OK, done! After a visit to some truly appalling documentation, this forum and the main one now have two user-selectable themes. These are accessed via the ‘hamburger’ menu top right of any forum content page:

The ‘Light’ theme is the same as current and is the on load default. An asterisk shows the currently selected theme (above is it ‘Light’). Click a non-current theme, e.g. ‘Dark’ and the page reloads using that theme.

The users selected theme is remembered in their site setting. IOW, if you close re-open the site it should load using your last-choice of colour scheme. The colour schemes themselves are non-editable (by users).

All the above tested in Safari v16.1 on macOS 12.6.1. Using other browsers/OS versions YMMV.

7 Likes

There’s a minor problem with dark themes. If one uses discourse’s built-in dark theme, then it’s still possible to capture a webarchive of the whole site with DEVONthink.

Whole site captured via Clip to DEVONthink (with disourse dark theme):


But if one only wants to capture a part of a site (by selecting and dragging to DEVONthink’s icon in the dock) the discourse dark theme gets in the way. The font color is gray instead of black:


Most of the time I don’t want to capture a whole site and changing the discourse preferences before capturing is no way to go.

Best workaround I’ve found is Safari extension Dark Reader. Its dark theme can be toggled via a customizable shortcut. It also lets the user set up the dark theme, e.g. brightness and contrast (even for each site independently), and it’s possible to deactivate Dark Reader for a given site. There’s a iOS version too. After disabling Dark Reader via the shortcut I get the desired result:


Dark Reader is not free but really worth it :slight_smile:

Edit: Uhmm, I missed that you implemented a toggle in the hamburger menu. That’s of course fast enough to toogle before capturing. Note to self: read carefully…