forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: skinconf text elements in group.svg
Date Sun, 03 Apr 2005 11:07:04 GMT
Hi Kevin,

http://svn.apache.org/viewcvs?view=rev&rev=159868

Rick commited some code to make
forrest/trunk/main/webapp/resources/stylesheets/project2text.xsl more
generic.

If you make an svn up your problem may be already solved. ;-)

Changing the stopping color may be easier to change directly in the
*.svg code.

HTH
thorsten

On Sat, 2005-04-02 at 21:45 +0200, Thorsten Scherler wrote:
> On Sat, 2005-04-02 at 14:04 +0100, Kevin wrote:
> > Hi,
> > 
> > I'm using 0.7-dev and wondered if it was possible
> > to use other text elements from processed skinconf
> > as done in group.svg and project.svg.
> > 
> > ie. from
> > 
> > forrest run
> > 
> > http://localhost:port/images/group.png
> > 
> > shows the skinconf text in group.svg:
> > 
> > <for:group-name />
> > 
> > --
> > 
> > The 'for' namespace allowed <for:project-name />
> > but not <for:year /> which was in skinconf too?
> > 
> 
> Yes and no. 
> 
> The for:group-name will be matches later on in
> {forrest-trunk}/main/webapp/resources/stylesheets/project2text.xsl
> 
> Here you find:
> <xsl:template match="for:project-name">
>     <xsl:value-of select="$config/project-name"/>
>   </xsl:template>
> 
> <xsl:template match="for:group-name">
>     <xsl:value-of select="$config/group-name"/>
>   </xsl:template>
> </xsl:stylesheet>
> 
> ...and no <for:year />!
> 
> You would need to add new matches here if you want to extend the
> functionality.
> 
> > After a refresh I expected group.png to show the
> > year as it did changing group-name to project-name?
> > 
> 
> Yes and no.
> 
> Actually for project-name the match was on the project.svg which has
> <for:project-name/>
> 
> > Could someone help with my understanding of how
> > this works. Thanks.
> > 
> 
> You will need into the above xsl's and where we match them to really
> understand what is going on. ;-)
> 
> HTH
> 
> > --
> > 
> > My aim was to get the svg linearGradient stop-colors
> > in skinconf (from colors.color.tab-selected etc.) eg.
> > <svg-stop-color-1>#4c6c8f</svg-stop-color-1>
> > <svg-stop-color-2>#e5e4d9</svg-stop-color-2>
> > so the project and group logo colors would match the
> > skin.
> > 
> 
> An easy way would be (I had no time to test!) but it gives you the idea
> (I hope ;-)):
> 
> a) extend the skinconf.dtd to allow and add to skinconf.xml:
> <svg-stop>
>   <stop style="stop-color:white" offset="0"/>
>   <stop style="stop-color:lightgreen" offset="1"/>
> </svg-stop>
> 
> b) change project.svg and group.svg and change:
>     <linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
>       <stop style="stop-color:white" offset="0"/>
>       <stop style="stop-color:lightgreen" offset="1"/>
>     </linearGradient>
> 
> to:
>     <linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
>       <for:stop />
>     </linearGradient>
> 
> c) change project2text.xsl and add
>   <xsl:template match="for:stop">
>     <xsl:copy-of select="$config/svg-stop/*"/>
>   </xsl:template>
> 
> This solution would change the project and group logo the same way. If
> you want to have it different you need to do something like :
> 
> in skinconf.xml
> <project-svg-stop>
>   <stop style="stop-color:white" offset="0"/>
>   <stop style="stop-color:lightgreen" offset="1"/>
> </project-svg-stop>
> 
> ...and change all above to match the new situation. ;-)
> 
> > Used in an an svg <style> element:
> > 
> > <style type="text/css">
> > .svg-stop-color2 {
> >                stop-color: <for:svg-stop-color-2 />;
> > }
> > .svg-stop-color1 {
> >                stop-color: <for:svg-stop-color-1 />;
> > }
> > </style>
> > 
> 
> That is as well possible but will cost a wee bit much work.
> 
> > The above shows the idea probably need CDATA tags.
> > 
> 
> HTH and if it is working please create a patch, add it to our issue
> tracker and we will apply the patch.
> 
> > --
> > 
> > Kevin.
> > 
> 
> salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message