add possibility to define static elements which can be translated and included almost everywhere
the build was successful Details

This commit is contained in:
Max Mehl 2018-11-24 17:39:27 +01:00
parent 3906ec1e6d
commit 892282a701
Signed by: max.mehl
GPG Key ID: 2704E4AB371E2E92
4 changed files with 41 additions and 27 deletions

View File

@ -40,5 +40,11 @@
<xsl:with-param name="nb-items" select="4"/>
</xsl:call-template>
</xsl:template>
<!-- Static elements which can be included everywhere -->
<xsl:template match="static-element">
<xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
<xsl:copy-of select="/buildinfo/document/set/element[@id=$id]" />
</xsl:template>
</xsl:stylesheet>

View File

@ -78,34 +78,8 @@
<hr/>
<h2>Support the fsfe</h2>
<static-element id="video" />
<video
crossorigin="crossorigin"
poster="https://download.fsfe.org/videos/supporter/posters/cryptie.jpg"
controls="controls"
width="100%">
<source
media="screen and (max-device-width:999px)"
type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;"
src="https://download.fsfe.org/videos/supporter/cryptie_mobile.mp4"/>
<source
media="screen and (max-device-width:999px)"
type="video/webm; codecs=&quot;vp9, opus&quot;"
src="https://download.fsfe.org/videos/supporter/cryptie_mobile.webm"/>
<track default="default" label="English" srclang="en" kind="subtitles" src="https://download.fsfe.org/videos/supporter/subtitles/cryptie.vtt"/>
</video>
<small class="news-supporter-media-title">
Cryptie fsfe supporter
</small>
<p>
By becoming a supporter of the FSFE you empower our work and help to assure our financial independence.
</p>
<div class="share-buttons-sidebar">
<a target="_blank" href="https://facebook.com/thefsfe">
<button class="share-button-sidebar share-support">Support us</button>
</a>
</div>
</div>
</sidebar>

View File

@ -1,3 +1,4 @@
news/*/news:[]
news/generated_xml/:[]
news/nl/nl:[]
tools/static-elements/element-:[]

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<elementset>
<element id="video">
<h2>Support the fsfe</h2>
<video
crossorigin="crossorigin"
poster="https://download.fsfe.org/videos/supporter/posters/cryptie.jpg"
controls="controls"
width="100%">
<source
media="screen and (max-device-width:999px)"
type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;"
src="https://download.fsfe.org/videos/supporter/cryptie_mobile.mp4"/>
<source
media="screen and (max-device-width:999px)"
type="video/webm; codecs=&quot;vp9, opus&quot;"
src="https://download.fsfe.org/videos/supporter/cryptie_mobile.webm"/>
<track default="default" label="English" srclang="en" kind="subtitles" src="https://download.fsfe.org/videos/supporter/subtitles/cryptie.vtt"/>
</video>
<small class="news-supporter-media-title">
Cryptie fsfe supporter
</small>
<p>
By becoming a supporter of the FSFE you empower our work and help to assure our financial independence.
</p>
<div class="share-buttons-sidebar">
<a target="_blank" href="https://facebook.com/thefsfe">
<button class="share-button-sidebar share-support">Support us</button>
</a>
</div>
</element>
</elementset>