openwebwork/webwork2 — pull request #436 by goehle (2014-06-27 15:33:57+00:00)
Title: Theme Overrides

The primary purpose of this pull request is to allow site administrators to change/override math4 in such a way as to be compatible with future upstream changes. The way it works is that system.template in math4 will include the files math4-overrides.css and math4-overrides.js after math4.css and math4.js, but only if they exist. These files are included in .gitignore and instead have .dist versions included in the pull request. This provides a great deal of flexibility since dedicated admins will be able to do almost anything using the .js/.css combo. On the other hand I also created the .dist files to be friendly for administrators who only want to change the primary theme colors and the header images. The first is done by doing a search/replace on the css (I had to change and simplify some coloring to make that work, but it wont affect vanilla math4) and the second via js. I also included a math4-green variant of math4 to show how the changes work in practice, and also to show how to create a variant theme that will still receive updates from git (using links for system.template/math4.css/math4.js/etc...).

Things to test:
- Test that the math4 system.template page doesn't complain when the override files are not present, but includes them when they are.
- Test that you can make changes to the override files and that they work properly. In particular, try to do copy and paste in the css override to change the primary theme colors and make sure the result reasonable.
- Test to see that I didn't miss anything that should be included in the math4-overrides.css.dist. This can be done by using the math4-green theme and visiting pages/doing things. Look for any leftover blue.
- I also deleted some leftover webwork3 files that aren't used. Peter should check that I didn't delete anything important.