Browse Source

allow campaign banners to contain arbitrary layout

svn path=/branches/test/; revision=33770
tags/stw2018
paul 3 years ago
parent
commit
25e706c5b3
2 changed files with 14 additions and 36 deletions
  1. 11
    32
      index.xsl
  2. 3
    4
      tools/frontpage/summit2016.en.xml

+ 11
- 32
index.xsl View File

@@ -117,10 +117,18 @@
<xsl:template match="campaign" mode="slideshow">
<a href="{link}" class="campaign-box">
<xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute>

<!-- If you use the content tag, you can define boxes arbitrarily,
but you shouldn't use photo/author/copyright then -->
<xsl:if test=" content != '' ">
<xsl:apply-templates select="content/@* | content/node()"/>
</xsl:if>

<xsl:if test=" photo != '' "><img src="{photo}" alt="" /></xsl:if>
<p class="text">
<xsl:value-of select="text" />
</p>

<xsl:if test=" text != '' ">
<p class="text"><xsl:value-of select="text" /></p>
</xsl:if>
<!-- Author (if existing) -->
<xsl:if test="author != ''">
@@ -136,37 +144,8 @@
<!-- display campaign box 4 -->
<xsl:template match="campaign-box4">
<!--div id="campaign-box-4"-->
<!--
Here are two codes snippets that will provide for a graphical and a text banner.
/!\ comment out one of the two, you probably only want one banner on the front page.
-->
<!-- graphical banner -->
<!--<a href="/campaigns/ilovefs/ilovefs.html">
<img src="/graphics/valentine.png" />
</a>-->
<!--
Text banner
The ids used here are needed to fetch the correct texts in /tools/texts-content.**.xml
/!\ the text with given IDs *must* exist there!
-->
<!--div class="banner-border">
<p>
<a href="http://www.defectivebydesign.org/no-drm-in-html5">
<xsl:call-template name="gettext">
<xsl:with-param name="id" select="'no-drm-in-html5'" />
</xsl:call-template>
</a>
</p>
</div -->
<!--/div-->
</xsl:template>
<!--display labels-->
<!--translated word "newsletter"-->

+ 3
- 4
tools/frontpage/summit2016.en.xml View File

@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<campaigns>
<campaign running="yes" id="summit16">
<!--photo>/graphics/summit2016.jpg</photo-->
<text>
<link>/community/events/2016/summit/frontpage.en.html</link>
<content>
<img src="/graphics/fsfe-summit-header-logo.png" align="left" />
<img src="/graphics/fsfe-summit-header-date.png" align="right" />
</text>
<link>/community/events/2016/summit/frontpage.en.html</link>
</content>
</campaign>
</campaigns>

Loading…
Cancel
Save