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; 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; color: white;
} }
#portal .upcoming ul { #portal .upcoming ul, #portal .chaosupdates ul {
list-style-type: none; list-style-type: none;
font-size: small; font-size: small;
margin: 2em 0 0; margin: 2em 0 0;
padding: 0 0 0 1.5em; padding: 0 0 0 1.5em;
} }
#portal .upcoming ul li { #portal .upcoming ul li, #portal .chaosupdates ul li {
line-height: 1.5em; line-height: 1.5em;
margin-top: .5em; margin-top: .5em;
} }

View File

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

View File

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