highlights on the front page
recent news as listing the hightlights are styled according to the first used tag
This commit is contained in:
+6
-2
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<html>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
|
||||
<head>
|
||||
<title>FSFE - Free Software Foundation Europe</title>
|
||||
@@ -24,8 +24,12 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="press">
|
||||
<dynamic-content-press />
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
Our Latest News
|
||||
More News
|
||||
<a class="learn-more" href="/news/index.html">Read more...</a>
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
<!-- Dynamic list of news items -->
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<xsl:template match="dynamic-content-news">
|
||||
<xsl:template match="dynamic-content-press">
|
||||
<xsl:for-each select="/buildinfo/document/set/news[
|
||||
translate(@date, '-', '') <= translate(/buildinfo/@date, '-', '')
|
||||
translate(@date, '-', '') <= translate(/buildinfo/@date, '-', '') and
|
||||
tags/tag/@key = 'highlights'
|
||||
]">
|
||||
<xsl:sort select="@date" order="descending"/>
|
||||
<xsl:if test="position() <= 3">
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
<!-- Image (with or without link) -->
|
||||
<xsl:element name="div">
|
||||
<xsl:attribute name="class">image</xsl:attribute>
|
||||
<xsl:attribute name="class">image <xsl:value-of select="tags/tag[1]/@key"/></xsl:attribute>
|
||||
<xsl:call-template name="news-image"/>
|
||||
</xsl:element><!-- div/image -->
|
||||
|
||||
@@ -32,15 +33,11 @@
|
||||
<xsl:element name="h3">
|
||||
<xsl:call-template name="news-title"/>
|
||||
</xsl:element><!-- h3 -->
|
||||
|
||||
<!-- Date -->
|
||||
<xsl:element name="p">
|
||||
<xsl:attribute name="class">date</xsl:attribute>
|
||||
<xsl:call-template name="news-date"/>
|
||||
</xsl:element><!-- p/date -->
|
||||
|
||||
<!-- Teaser -->
|
||||
<xsl:call-template name="news-teaser"/>
|
||||
<xsl:attribute name="class">tag</xsl:attribute>
|
||||
<xsl:value-of select="tags/tag[1]"/>
|
||||
</xsl:element><!-- p/tag -->
|
||||
|
||||
</xsl:element><!-- div/text -->
|
||||
|
||||
@@ -50,6 +47,32 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dynamic-content-news">
|
||||
<xsl:for-each select="/buildinfo/document/set/news[
|
||||
translate(@date, '-', '') <= translate(/buildinfo/@date, '-', '')
|
||||
]">
|
||||
<xsl:sort select="@date" order="descending"/>
|
||||
<xsl:if test="position() <= 3">
|
||||
<xsl:element name="div">
|
||||
<xsl:element name="p">
|
||||
<xsl:attribute name="class">text</xsl:attribute>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
|
||||
<xsl:value-of select="title"/>
|
||||
|
||||
<xsl:value-of select="news-teaser"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="br"/>
|
||||
<xsl:element name="span">
|
||||
<xsl:attribute name="class">date</xsl:attribute>
|
||||
<xsl:value-of select="@date"/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- Dynamic list of testimonial quotes -->
|
||||
|
||||
@@ -79,7 +79,7 @@ body.frontpage {
|
||||
// News section
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
.news {
|
||||
.press {
|
||||
.three-columns;
|
||||
|
||||
// Show the image to the left on tablet-sized screens, to the top
|
||||
@@ -110,7 +110,23 @@ body.frontpage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// colorful borders depending on the category of an article
|
||||
|
||||
.community img {
|
||||
border: 5px solid #d0f400;
|
||||
}
|
||||
.news img {
|
||||
border: 5px solid #6eb53d;
|
||||
}
|
||||
.press img {
|
||||
border: 5px solid #00c1eb;
|
||||
}
|
||||
.podcast img {
|
||||
border: 5px solid #1f80bb;
|
||||
}
|
||||
.newsletter img {
|
||||
border: 5px solid #202e79;
|
||||
}
|
||||
// Keep everything except the image in a block and put it where it
|
||||
// belongs.
|
||||
.text {
|
||||
@@ -122,8 +138,12 @@ body.frontpage {
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.date {
|
||||
}
|
||||
}
|
||||
.press, .news {
|
||||
.text {
|
||||
.date,
|
||||
.tag {
|
||||
.text-muted;
|
||||
.small;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user