portal: colorful wiki tiles
This commit is contained in:
parent
91b227d771
commit
92a5d5d8c8
|
@ -3,7 +3,8 @@
|
|||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:date="http://exslt.org/dates-and-times"
|
||||
exclude-result-prefixes="xsl">
|
||||
xmlns:crypto="http://exslt.org/crypto"
|
||||
exclude-result-prefixes="xsl date crypto">
|
||||
|
||||
|
||||
<xsl:include href="common.xsl" />
|
||||
|
@ -358,10 +359,18 @@
|
|||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@class = 'wiki'">
|
||||
<xsl:variable name="number"
|
||||
select="translate(
|
||||
crypto:md5(content-text),
|
||||
'abcdefABCDEF', '123456123456')"/>
|
||||
<xsl:attribute name="style">
|
||||
background-color: rgb(<xsl:value-of select="240 - 3 *
|
||||
string-length(content-text)"/>, <xsl:value-of select="252
|
||||
- 4 * string-length(content-text)"/>, 255);
|
||||
<xsl:text>background-color: rgb(</xsl:text>
|
||||
<xsl:value-of select="255 - number(substring($number, 1, 2))"/>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:value-of select="255 - number(substring($number, 3, 2))"/>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:value-of select="255 - number(substring($number, 5, 2))"/>
|
||||
<xsl:text>);</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
|
|
Loading…
Reference in New Issue