Fix CSS paths rev #2#2124
Fix CSS paths rev #2#2124marjohn56 wants to merge 1 commit intoopnsense:masterfrom marjohn56:Fix-CSS-paths-#2
Conversation
change css paths in default.volt and head.inc to use theme paths. Copy *.css files from opensense/www/css to opnsense/www/themes/opnsense/build/csss EXCEPT the *font.css
|
So I agree with this, but we need to make sure we put a symbolic link to the old location in order to not break any other pages that would expect those files where they are. Let me take care of this post-merge this afternoon. |
|
I revise that last comment: break existing themes that users may have created and that are missing those files... a symbolic link will not entirely fix it... mhhh... |
|
I did do a global search for all references and I think I have got them all. That was also the reason for leaving the existing css files where they are too. :) |
|
I agree we should move all css into the theme directory, but we should add some glue here to use the default when there's none specified to avoid breakage. I'll let this here for a moment, as soon I'll have time to fix the "use default" I will pull this in. |
…ersal theme_file_or_default() template function. The legacy code will still use a plain file_exists() for the optional theme.js, which keeps both in a working state after this commit. To be able to move more files into the template directories for #2124 we need to keep existing plugins functional, so we could integrate these changes into a minor release.
|
@marjohn56 I would like to suggest that we don't rename the files that are in there now to retain backwards compatibility with the theme's already in place, cbcb9da contains a fix to use theme versions as overrides. To overlay jquery.tokenize.css in the new code, we can now use the following:
Shall I rewrite the template files (both new and legacy) to support both, or do you want to give it a try? |
|
It will take you far less time to do it than me and it will be correct first time. :) |
|
@marjohn56 ok, no problem, I'll keep this PR open until it's fixed. |
|
The only other part of the themes that needs correction, but will need a full re-write as it's old style is the gateways.php files. Currently they are using fixed colours and I have no idea where to start on that. |
… new and legacy code, for #2124
|
@marjohn56 this 2461ca2 should provide you with the possibility to override the css files in your theme. @fichtner this won't solve the duplication of fonts, because their compiled into the theme css. Maybe we better leave those as they are. |
change css paths in default.volt and head.inc to use theme paths.
Copy *.css files from opensense/www/css to opnsense/www/themes/opnsense/build/csss EXCEPT the *font.css