shout icon indicating copy to clipboard operation
shout copied to clipboard

Add theme selector to settings

Open floogulinc opened this issue 8 years ago • 10 comments

Adds a theme selector to the settings that allows users to choose a different theme. Themes are managed in config.js and consist of only a CSS file. The default config.js now comes with the default theme and the other 3 that are come in the themes folder preconfigured.

After updating, admins should either add the new theme stuff and remove the old variable, or regenerate a new config.js.

Closes #452 and #90.

screen shot 2015-08-05 at 04 25 08

floogulinc avatar Aug 05 '15 23:08 floogulinc

:+1: I would love this! Although I feel that the theme list should be automatically detected from the theme folder. I like to create my own themes or modify existing ones after copying them to a different file. I understand this requires extra hassle on the server side, but I think detection would be optimal solution and offers the best user experience.

That said, I still feel this could be merged any time :)

richrd avatar Sep 24 '15 19:09 richrd

Well, adding themes with this setup only requires adding a few lines to the config file for your instance, It also allows for the theme file to be at any path, or even a URL to one hosted elsewhere.

It looks like this:

{
    "name": "Crypto", //Theme name displayed to user
    "path": "themes/crypto.css", //Theme path/URL
    "default": false //Should the theme be the default for new users
}

This also would allow for a feature in the future to allow users to install their own themes on the frontend just from a URL.

floogulinc avatar Sep 24 '15 19:09 floogulinc

Ok, looks good. For my requirements I just need config reloading after this is implemented :+1:

richrd avatar Sep 24 '15 20:09 richrd

FYI: Works for me, I've updated my files manually.

heubergen avatar Dec 15 '15 20:12 heubergen

Hey @floogulinc, thanks! I left a few comments inline, but I think we are very close to a shippable solution overall, great! :-)

astorije avatar Jan 06 '16 04:01 astorije

@astorije with all the whitespace stuff, I was just following what was already used in the rest of the file.

floogulinc avatar Jan 07 '16 18:01 floogulinc

Hey @floogulinc, actually, most of the code is func(arg1, arg2) and not func(arg1,arg2) so let's keep that version. :-) Also, I might have been unclear in my last comment, but the problem is some lines of defaults/config.js are using spaces for indentation where they should be using tabs as the rest of the project.

I can't wait to see this released!! :-)

astorije avatar Jan 08 '16 05:01 astorije

@astorije OH, thats what you meant, I thought you were talking about the indenting. I'll make some changes when I have the time. I'm going to be quite busy for the next 6 weeks or so.

floogulinc avatar Jan 08 '16 14:01 floogulinc

Argh, it's a shame, this is so close to a shippable solution :-(

astorije avatar Jan 10 '16 22:01 astorije

Noticed a potential duplicate: https://github.com/erming/shout/pull/386 I'll review and check if they are indeed duplicates or not.

astorije avatar Jan 13 '16 05:01 astorije