El mar, 18-10-2005 a las 13:28 +0200, Thorsten Scherler escribió:
> El mar, 18-10-2005 a las 10:06 +0100, Ross Gardler escribió:
> > Thorsten Scherler wrote:
> > > Kevin, very cool.
> >
> > ...
> >
> > > That leads to another contract that I want to create. genericCss.ft,
> > > which will bring back the extra-css from the skinconf.xml back. It would
> > > just take the css definition from the view and pass them into an inline
> > > css. More or less the same could be done with the colors from the old
> > > skinconf.
> >
> > Why a contract for this? Wouldn't it be better to define the extra-css
> > in the *.fv?
Yes, you are right. I thought about this and I remembered that when we
came up with
<forrest:css url="profile.css" media="screen" title="Pelt"/>
I original wanted to allow:
<forrest:css media="screen">
/* Extra css */
#header {
background: #ffffff;
border-bottom: thick solid #002b3d;
}
</forrest:css>
I will do that if no one speaks up.
BTW I propose to change @title to @theme, that reflects the function of
the attribute better.
<forrest:css url="profile.css" media="screen" theme="Pelt"/>
To the color profiling, I think that should be better done by a
contract.
<forrest:contract name="branding-theme-profiler">
<forrest:properties contract="branding-theme-profiler">
<forrest:property name="branding-theme-profiler">
<!--Copied from skinconf.xml-->
<color name="tab-selected" value="#4a6d8c" link="#0F3660"
vlink="#0F3660" hlink="#000066"/>
<color name="tab-unselected" value="#b5c7e7" link="#0F3660"
vlink="#0F3660" hlink="#000066"/>
<color name="subtab-selected" value="#4a6d8c" link="#0F3660"
vlink="#0F3660" hlink="#000066"/>
<color name="subtab-unselected" value="#4a6d8c" link="#0F3660"
vlink="#0F3660" hlink="#000066"/>
</forrest:property>
</forrest:properties>
</forrest:contract>
where we really have to change the naming to either contract or hook
names to easier understand which parts of the view this colors will
change.
In leather-dev or pelt old fashion skins the profile.css is generated
from profiling.css.xslt. This is and the forrest.css.xslt should be the
base for this contract.
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
format="html" name="branding-theme-profiler" inputFormat="xsl"
body="false" head="true"/>
If somebody want to provide a patch that would be awesome. That would as
well be good as extension of the how-to about writing contracts. ;-)
As soon I finished the rewriting I can do it if nobody beats me to it.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)