portal: chaosupdates tile

This commit is contained in:
Astro 2013-11-13 02:05:35 +01:00
parent f7c713e8fd
commit 032efe62b7
3 changed files with 44 additions and 30 deletions

View File

@ -507,20 +507,20 @@ abbr.dtstart, abbr.dtend {
background: url(//www.hq.c3d2.de/status.png) 50% 50% no-repeat;
}
/* -- Upcoming -- */
/* -- Upcoming, Chaosupdates -- */
#portal .upcoming h3 a {
#portal .upcoming h3 a, #portal .chaosupdates h3 a {
color: white;
}
#portal .upcoming ul {
#portal .upcoming ul, #portal .chaosupdates ul {
list-style-type: none;
font-size: small;
margin: 2em 0 0;
padding: 0 0 0 1.5em;
}
#portal .upcoming ul li {
#portal .upcoming ul li, #portal .chaosupdates ul li {
line-height: 1.5em;
margin-top: .5em;
}

View File

@ -213,29 +213,28 @@
</div>
</xsl:template>
<!-- Chaosupdates in sidebar -->
<!-- Chaosupdates in tile -->
<xsl:template name="chaosupdates">
<xsl:param name="limit" select="5"/>
<div id="news">
<h2>
<a href="{document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:link}">
<xsl:value-of select="document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:title"/>
</a>
</h2>
<ul>
<xsl:for-each select="document('../chaosupdates.xml')/rdf:RDF/rss:item[position() &lt;= $limit]">
<li>
<a href="{rss:link}">
<xsl:value-of select="rss:title"/>
</a>
</li>
</xsl:for-each>
</ul>
</div> <!-- id="news" -->
<h3>
<a href="{document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:link}">
<xsl:value-of select="document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:title"/>
</a>
</h3>
<ul>
<xsl:for-each select="document('../chaosupdates.xml')/rdf:RDF/rss:item[position() &lt;= $limit]">
<li>
<a href="{rss:link}">
<xsl:value-of select="rss:title"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<!-- Calendar in sidebar -->
<!-- Calendar in tile -->
<xsl:template name="calendar-events">
<xsl:param name="limit" select="5"/>

View File

@ -303,7 +303,11 @@
</xsl:template>
<xsl:template match="/page/portal">
<!-- Portal tiles -->
<section id="portal">
<!-- Items 1..2 -->
<xsl:apply-templates select="item[position() &lt;= 2]"/>
<!-- Upcoming events -->
<article class="upcoming">
<h3>
@ -314,14 +318,10 @@
</xsl:call-template>
</article>
<!-- TODO:
chaosupdates
pentaradios?
space status
-->
<xsl:apply-templates select="item[position() &lt; 4]"/>
<!-- Items 3..4 -->
<xsl:apply-templates select="item[position() &gt;= 3 and position() &lt;= 4]"/>
<!-- Hackerspace -->
<article class="space">
<a href="space.html">
<h3>Hackerspace</h3>
@ -329,7 +329,22 @@
</a>
</article>
<xsl:apply-templates select="item[position() &gt;= 4 and position() &lt;= 32]"/>
<xsl:apply-templates select="item[position() &gt;= 5 and position() &lt;= 7]"/>
<!-- Hackerspace -->
<article class="chaosupdates">
<xsl:call-template name="chaosupdates">
<xsl:with-param name="limit" select="3"/>
</xsl:call-template>
<p class="footer">ccc.de</p>
</article>
<!-- 8..30 -->
<xsl:apply-templates select="item[position() &gt;= 8 and position() &lt;= 30]"/>
<!-- TODO:
pentaradios?
-->
</section>
</xsl:template>