We've been looking into ways of making themes and the management of the style sheets easier, and this is what we've come up with (and is going to be included in the RC release, which by the way, will be delayed till tomorrow). Please note that you don't have to use this system, and the previous system of specifying t=<templatename> still works.
We have deprecated the use of the build_images_url directory in favour of keeping all static files (images, css, javascript, etc) in a single directory. We have added a build_static_url and build_static_path (more on this later). The layout in this path is as follows:
+ luna/
+ images/
+ ...
+ luna.css
+ luna_core.cssFirstly, core.css has been renamed to luna_core.css and custom.css has been renamed to luna.css. luna.css inherits its styles from luna_core.css with an @import declaration at the top of the file, and so any styles declared in this file will override any defined in luna_core.css like before.
Themes allow you to use a single template set with multiple style sheets. A theme uses a separate css file (you can inherit from the luna_core.css or luna.css files if you wish), and images in the templates (images referenced in the style sheets are your responsibility) also use simple inheritance. Image inheritance is done by generating the image url's instead of making them static. The code checks if the image exists in build_static_url/<template set>/images/<theme name>, then in build_static_url/<template set>/images. This allows you to use the base template's image, and override the images that you need for the theme. For example, if you created a 'summer' theme, and you wanted to override the paging images, then the layout would be like this:
+ luna/
+ images/
+ summer/
+ paging-first.gif
+ ...
+ paging-first.gif
+ ...
+ luna.css
+ luna_core.css
+ summer.cssWhere /path/to/static/luna/images/summer/paging-first.gif would be used instead of /path/to/static/luna/images/paging-first.gif.
I hope this wasn't too confusing! I'll talk about specifics after we release the release candidate.
Adrian
We have deprecated the use of the build_images_url directory in favour of keeping all static files (images, css, javascript, etc) in a single directory. We have added a build_static_url and build_static_path (more on this later). The layout in this path is as follows:
Code:
/path/to/static/ + luna/
+ images/
+ ...
+ luna.css
+ luna_core.css
Themes allow you to use a single template set with multiple style sheets. A theme uses a separate css file (you can inherit from the luna_core.css or luna.css files if you wish), and images in the templates (images referenced in the style sheets are your responsibility) also use simple inheritance. Image inheritance is done by generating the image url's instead of making them static. The code checks if the image exists in build_static_url/<template set>/images/<theme name>, then in build_static_url/<template set>/images. This allows you to use the base template's image, and override the images that you need for the theme. For example, if you created a 'summer' theme, and you wanted to override the paging images, then the layout would be like this:
Code:
/path/to/static/ + luna/
+ images/
+ summer/
+ paging-first.gif
+ ...
+ paging-first.gif
+ ...
+ luna.css
+ luna_core.css
+ summer.css
I hope this wasn't too confusing! I'll talk about specifics after we release the release candidate.
Adrian