As described in https://github.com/kalvn/Shaarli-Material/issues/68 as the /data folder is protected via .htaccess, the file user.css cannot be loaded by browsers.
I guess the best solution would be to move the file user.css in another folder as /data must remain protected.
Not a major issue since very few people use this file
Suggestion, have a user asset folder not tracked by git (and with access allowed) such as data/assets or inc/assets.
Couldn't we use the tpl/ folder to this effect? This would provide a single place for users to install custom themes/templates
You mean to leave template managing the import of this file? Or to create a specific folder under tpl/ for this file?
The first option could make sense as a user.css is only relevant in the context of one specific theme. If I create one for the vintage theme, it'll of course not work for the default theme.
The second option wouldn't be a good option as it is expected that all folders in tpl/ contain themes and nothing else.
So I would say, let's indeed let themes handle that. The only thing is that the documentation must be adapted accordingly to first inform theme developers that the user.css file use is under their responsibility, and second to inform users that user.css might not work depending on the theme used.
I'm not sure how many users actually use the user.css feature, especially now that 1/ Shaarli features a modern, nice-looking theme and 2/ there is support for full-fledged 3rd-party templates.
As of now, the content of user.css is loaded no matter which theme is used, which can lead to undesired effects indeed :)
What I'm suggesting is to look for this file under tpl/user.css, thus keeping the current behavior.
Looking at recent discussions, this seems not to be the best approach as users might want to bring _theme-specific_ customizations, in which case it would be preferable to let theme maintainers decide what can be customized, and where to change values (and adapt the theme's .gitignore accordingly).
Why not create a specific plugin to edit and load custom css? It is a different approach of the user.css file but maybe interesting.
About the current use of the user.css (vs full template), I think this way shouldn't be neglected. Maintaining template for Shaarli is currently hard because there are frequent change in the main code. CSS are more resilient in case a change and have a great potential to bring custom theme easily.
I like the idea of moving theme customization to a plugin, this would allow users to specify the active CSS file(s) from the plugin management UI :)
The Nginx configuration ("modular" and "https") examples, as well as configuration used by Docker images, is working as expected (CSS can be accessed).
TODO:
- [ ] update Docker images' configuration
- [ ] update example Nginx configuration
This should be fixed with https://github.com/shaarli/Shaarli/pull/996
Why not create a specific plugin to edit and load custom css?
Thanks, I've moved this to https://github.com/shaarli/Shaarli/issues/1000. ISSUE 1000 :tada:
Most helpful comment
Why not create a specific plugin to edit and load custom css? It is a different approach of the user.css file but maybe interesting.
About the current use of the user.css (vs full template), I think this way shouldn't be neglected. Maintaining template for Shaarli is currently hard because there are frequent change in the main code. CSS are more resilient in case a change and have a great potential to bring custom theme easily.