Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Template themes and CSS changes in GLinks 3.0 RC

Quote Reply
Template themes and CSS changes in GLinks 3.0 RC
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:
Code:
/path/to/static/
+ luna/
+ images/
+ ...
+ luna.css
+ luna_core.css
Firstly, 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:
Code:
/path/to/static/
+ luna/
+ images/
+ summer/
+ paging-first.gif
+ ...
+ paging-first.gif
+ ...
+ luna.css
+ luna_core.css
+ summer.css
Where /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
Subject Author Views Date
Thread Template themes and CSS changes in GLinks 3.0 RC brewt 6281 Mar 21, 2005, 8:32 PM
Thread Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
ATKOgirl 6097 Mar 22, 2005, 2:25 PM
Thread Re: [ATKOgirl] Template themes and CSS changes in GLinks 3.0 RC
brewt 6106 Mar 22, 2005, 3:11 PM
Post Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
ATKOgirl 6123 Mar 22, 2005, 6:36 PM
Post Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
HyperTherm 6113 Mar 23, 2005, 3:27 AM
Thread Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
lancerasmussen 6047 Mar 24, 2005, 12:08 AM
Thread Re: [lancerasmussen] Template themes and CSS changes in GLinks 3.0 RC
brewt 6031 Mar 24, 2005, 1:25 AM
Post Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
Jag 6028 Mar 24, 2005, 3:18 PM
Thread Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
lancerasmussen 6032 Mar 24, 2005, 4:10 PM
Post Re: [lancerasmussen] Template themes and CSS changes in GLinks 3.0 RC
brewt 5970 Mar 24, 2005, 4:45 PM
Thread Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
rgbworld 5971 Mar 25, 2005, 5:12 PM
Thread Re: [rgbworld] Template themes and CSS changes in GLinks 3.0 RC
brewt 5961 Mar 25, 2005, 5:39 PM
Post Re: [brewt] Template themes and CSS changes in GLinks 3.0 RC
rgbworld 5958 Mar 25, 2005, 6:11 PM