This commit is contained in:
parent
77197c4977
commit
2e1d0c607c
1
content/static/images/news/rnd
Symbolic link
1
content/static/images/news/rnd
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/new1.jpg
|
1
content/static/images/news/rnd1
Symbolic link
1
content/static/images/news/rnd1
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/old1.jpg
|
1
content/static/images/news/rnd2
Symbolic link
1
content/static/images/news/rnd2
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/old2.jpg
|
1
content/static/images/news/rnd3
Symbolic link
1
content/static/images/news/rnd3
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/pano1.jpg
|
1
content/static/images/news/rnd4
Symbolic link
1
content/static/images/news/rnd4
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/pano3.jpg
|
1
content/static/images/news/rnd5
Symbolic link
1
content/static/images/news/rnd5
Symbolic link
|
@ -0,0 +1 @@
|
|||
gchq-hdr.jpg
|
1
content/static/images/news/rnd6
Symbolic link
1
content/static/images/news/rnd6
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hq/schalter.jpg
|
1
content/static/images/news/rnd7
Symbolic link
1
content/static/images/news/rnd7
Symbolic link
|
@ -0,0 +1 @@
|
|||
./zentralwerk_bau.jpg
|
1
content/static/images/news/rnd8
Symbolic link
1
content/static/images/news/rnd8
Symbolic link
|
@ -0,0 +1 @@
|
|||
../hqdefault.jpg
|
1
content/static/images/news/rnd9
Symbolic link
1
content/static/images/news/rnd9
Symbolic link
|
@ -0,0 +1 @@
|
|||
gchq-werkbank.jpg
|
|
@ -4,7 +4,8 @@
|
|||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:date="http://exslt.org/dates-and-times"
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
exclude-result-prefixes="xsl date str">
|
||||
xmlns:crypto="http://exslt.org/crypto"
|
||||
exclude-result-prefixes="xsl date str crypto">
|
||||
|
||||
|
||||
<xsl:include href="common.xsl" />
|
||||
|
@ -379,6 +380,8 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="/page/portal/item">
|
||||
<!-- 1 (not really) random character 1-9 and blank -->
|
||||
<xsl:variable name="random" select="translate(substring(crypto:sha1(.),1,1),'0abcdef','')"/>
|
||||
<article>
|
||||
<xsl:if test="@class">
|
||||
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
|
||||
|
@ -393,10 +396,10 @@
|
|||
</xsl:when>
|
||||
<xsl:otherwise><!-- Fallback image -->
|
||||
<xsl:choose><!-- depending on class -->
|
||||
<!-- todo: random image from list (filenames might be links), maybe based on hash() -->
|
||||
<xsl:when test="@class = 'news'"><xsl:attribute name="style">background-image: url('images/news/gchq-hdr.jpg');</xsl:attribute></xsl:when>
|
||||
<!-- "random" image from list (filenames should be links) -->
|
||||
<xsl:when test="@class = 'news'"><xsl:attribute name="style">background-image: url('images/news/rnd<xsl:value-of select="$random"/>');</xsl:attribute></xsl:when>
|
||||
<!--
|
||||
<xsl:when test="@class = 'wiki'"><xsl:attribute name="style">background-image: url('images/news/wikidata.png');</xsl:attribute></xsl:when>
|
||||
<xsl:when test="@class = 'news'"><xsl:attribute name="style">background-image: url('images/news/gchq-hdr.jpg');</xsl:attribute></xsl:when>
|
||||
-->
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
|
|
Loading…
Reference in New Issue
Block a user