portal fixes

This commit is contained in:
Astro 2013-10-30 00:37:16 +01:00
parent 4f5df99c8d
commit a7f9a435ef
3 changed files with 19 additions and 8 deletions

View File

@ -458,11 +458,11 @@ abbr.dtstart, abbr.dtend {
position: absolute;
left: 0;
right: 0;
height: 1.3em;
height: 1.2em;
margin: 0;
padding: 0;
font-size: medium;
line-height: 1.3em;
line-height: 1.2em;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 100;
@ -503,6 +503,9 @@ abbr.dtstart, abbr.dtend {
color: #333;
text-shadow: -1px 0 1.5px white, 0 1px 1.5px white, 1px 0 1.5px white, 0 -1px 1.5px white;
}
#portal a:hover h4 {
color: black;
}
/* -- Calendar -- */
table.calendar {

View File

@ -16,7 +16,7 @@
<xsl:for-each select="document('../news.xml')//newsfile">
<xsl:apply-templates select="document(concat('../', .))/item" mode="news">
<xsl:with-param name="link"
select="concat(substring-before(., '.xml'), '.html')"/>
select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
</xsl:apply-templates>
</xsl:for-each>
</portal>
@ -58,17 +58,24 @@
<header>News</header>
<footer>by <xsl:value-of select="@author"/></footer>
<content-text><xsl:value-of select="@title"/></content-text>
<xsl:apply-templates select="image[1]" mode="news"/>
<xsl:apply-templates select=".//image[1]" mode="news"/>
<link><xsl:value-of select="$link"/></link>
</item>
</xsl:template>
<xsl:template match="image[contains(., '//')]" mode="news">
<content-image>
<xsl:value-of select="."/>
</content-image>
</xsl:template>
<xsl:template match="item/image[1]" mode="news">
<content-image>
<xsl:text>images/news/</xsl:text>
<xsl:value-of select="."/>
</content-image>
</xsl:template>
<xsl:template match="image" mode="news">
<content-image>
<xsl:choose>
<xsl:when test="contains(., '//')"></xsl:when>
<xsl:otherwise>images/news/</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="."/>
</content-image>
</xsl:template>

View File

@ -325,6 +325,7 @@
<xsl:if test="content-image">
<xsl:attribute name="style">
background: url('<xsl:value-of select="content-image"/>') 50% 50% no-repeat;
background-size: cover;
</xsl:attribute>
</xsl:if>