testing campaigns in xsl

svn path=/branches/test/; revision=27503
This commit is contained in:
hugo 2014-01-24 10:37:10 +00:00
parent 2ea486c387
commit 2328bdc728
4 changed files with 62 additions and 4 deletions

View File

@ -13,15 +13,15 @@
<div id="campaigns-boxes" class="cycle-slideshow" data-cycle-pause-on-hover="true" data-cycle-speed="500" data-cycle-timeout="9000" data-cycle-slides="a" data-cycle-fx="scrollHorz" data-cycle-swipe="true">
<div class="cycle-pager"></div>
<!--TODO campaigns-box /-->
<campaigns />
<a href="/donate/donate.html" class="campaign-box" id="zacchiroli">
<!--a href="/donate/donate.html" class="campaign-box" id="zacchiroli">
<img src="http://fsfe.org/donate/zacchiroli.jpg" alt="" /><p class="text">A world without Free Software is a world where we are all hostages of proprietary software vendors that run our lives. To fight such a nightmare scenario we need organisations like Free Software Foundation Europe.</p><span class="author">Stefano "Zack" Zacchiroli, Former Debian Project Leader</span>
</a>
<a href="//documentfreedom.org" class="campaign-box" id="dfd">
<img src="//documentfreedom.org/graphics/dove-header.png" alt="" /><p class="text">Celebrating information accessibility and raising awareness of Open Standards.</p>
</a>
</a-->
</div>
<div id="feeds">

View File

@ -6,7 +6,7 @@
<xsl:import href="tools/xsltsl/tagging.xsl" />
<xsl:import href="tools/xsltsl/translations.xsl" />
<xsl:import href="tools/xsltsl/static-elements.xsl" />
<xsl:import href="tools/xsltsl/quotes.xsl" />
<!-- TODO xsl:import href="tools/xsltsl/campaigns.xsl" /-->
<xsl:import href="fsfe.xsl" />
<xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
@ -105,6 +105,25 @@
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="campaigns">
<div id="campaigns-boxes" class="cycle-slideshow" data-cycle-pause-on-hover="true" data-cycle-speed="500" data-cycle-timeout="9000" data-cycle-slides="a" data-cycle-fx="scrollHorz" data-cycle-swipe="true">
<div class="cycle-pager"/>
<xsl:for-each select=" /buildinfo/textset/campaigns/campaign[ @id = 'zacchiroli' or @id = 'dfd' ] ">
<a href="{link}" class="campaign-box" id="{@id}">
<img src="{photo}" alt="" />
<p class="text">
<xsl:value-of select=" text " />
</p>
<span class="author">
<xsl:value-of select=" author " />
</span>
</a>
</xsl-for-each>
</div>
</xsl:template>
<!-- display campaign box 4 -->
<xsl:template match="campaign-box4">

View File

@ -294,6 +294,13 @@
<author>Stefano "Zack" Zacchiroli, Former Debian Project Leader</author>
<link>/donate/donate.html</link>
</campaign>
<campaign id="dfd">
<photo>//documentfreedom.org/graphics/dove-header.png</photo>
<text>
Celebrating information accessibility and raising awareness of Open Standards.
</text>
<link>//documentfreedom.org</link>
</campaign>
<campaign id="ganten" tag="donors fellowship" pos="2">
<photo>/donate/ganten.jpg</photo>
<txt>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="translations.xsl" />
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<xsl:template name="campaigns">
<div id="campaigns-boxes" class="cycle-slideshow" data-cycle-pause-on-hover="true" data-cycle-speed="500" data-cycle-timeout="9000" data-cycle-slides="a" data-cycle-fx="scrollHorz" data-cycle-swipe="true">
<div class="cycle-pager"/>
<!--xsl:for-each select=" /buildinfo/textset/campaigns/campaign "-->
<xsl:for-each select=" /buildinfo/textset/campaigns/campaign[ @id = 'zacchiroli' or @id = 'dfd' ] ">
<!--TODO select only campaigns asked from index.xsl-->
<a href="{link}" class="campaign-box" id="{@id}">
<img src="{photo}" alt="" />
<p class="text">
<xsl:value-of select=" text " />
</p>
<span class="author">
<xsl:value-of select=" author " />
</span>
</a>
</xsl-for-each>
</div>
</xsl:template>
</xsl:stylesheet>