Datum für news.html wird jetzt in xsl/xhtml.xsl ausgerechnet (WIP!)

git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@53 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
toidinamai 2005-12-20 19:37:51 +00:00
parent 651ac870ad
commit 95162fb152
2 changed files with 42 additions and 36 deletions

View File

@ -2,44 +2,11 @@
<page title="News">
<news>
<item title="22C3: Private Investigation is around the corner" date="Sat, 05 Nov 2005 23:05:50 CET" nicedate="Samstag, 5. November" author="Fnordic walker" category="Allgemein">
<item title="22C3: Private Investigation is around the corner" date="1131228350" author="Fnordic walker" category="Allgemein">
<p>
<image class="left" title="22C3">http://www.c3d2.de/typo3temp/pics/8de5efab18.png</image>
Der jährlich ausgetragene Chaos Communication Congress beginnt seine Magie auszustreuen. Pflicht!
</p>
</item>
<item title="Linux-Info-Tag" date="Thu, 06 Oct 2005 23:05:50 CET" nicedate="Donnerstag, 6. Oktober" author="Fnordic walker" category="Allgemein">
<p>
<image class="right" title="Dicker Pinguin">http://www.c3d2.de/uploads/pics/tux_01.png</image>
Am 29. Oktober findet der diesjährige Linux-Info-Tag in Dresden statt. Der c3d2 ist mit einem Stand, Vorträgen und Workshops dabei. CU.
</p>
</item>
<item title="Mailingliste" date="Tue, 23 Aug 2005 23:05:50 CET" nicedate="Dienstag, 23. August" author="Fnordic walker" category="Allgemein">
<p>
<image class="left" title="Delivered by mailman">http://www.c3d2.de/typo3temp/pics/9cc3346202.jpg</image>
Achtung! die Mailinglistenadresse hat sich gerade geändert. Bitte nutzt <link href="mailto:c3d2@mail.skyhub.de">c3d2@mail.skyhub.de</link>.
Archive sind auch noch da. Siehe <link href="https://mail.skyhub.de/mailman/listinfo/c3d2">Listeninfo</link>.
</p>
</item>
<!--item title="TA: Hacktivismus" date="Thu, 30 Jul 2005 23:05:50 CEST" nicedate="Donnerstag, 30. Juni" author="Fnordic walker" category="Themenabend">
<p>
Wegen des großen Erfolges des Vortrags Hacktivismus im <link href="https://berlin05.ccc.de/blog/">Camp Discordia</link> auf der Berlin05 gibt es diesen am 4. Juli ab 20 Uhr im <link href="http://www.azconni.de/">AZ Conni</link> nochmal, noch besser und mit Euch!
</p>
</item-->
<item title="Datenspuren Audio-Tracks 05" date="Mon, 30 May 2005 23:05:50 CEST" nicedate="Montag, 30. Mai" author="Fnordic walker" category="Allgemein">
<p>
<image class="right" title="Bild einer Datenspur">http://www.c3d2.de/typo3temp/pics/294776b4ed.gif</image>
Alle <link href="http://datenspuren.dresden.ccc.de/">Datenspuren</link> Audio-Mitschnitte endlich zum Download. Per ftp über <link>ftp://ftp.skyhub.de/datenspuren/2005/</link>.
</p>
</item>
<item title="Silc.dresden.ccc.de" date="Wed, 13 Apr 2005 05:23:05 CEST" nicedate="Mittwoch, 13. April" author="Fnordic walker" category="Allgemein">
<pre>/connect silc.dresden.ccc.de
/connect -6 silc.dresden.ccc.de
/join c3d2</pre>
<p>
<image class="right" title="Secure Internet Live Conferencing">http://www.c3d2.de/typo3temp/pics/aa268d9e62.gif</image>
Dunno what <link href="http://www.silcnet.net/">silc</link> is? Go <link href="http://de.wikipedia.org/wiki/SILC">here</link>.
</p>
</item>
</news>
</page>

View File

@ -200,10 +200,49 @@
<small class="news_author">
<xsl:value-of select="@author"/>
</small>
<!-- Magie: Datum aus Unix-Timestamp noch Deutsch transformieren... -->
<xsl:variable name="date_dayofweek">
<xsl:value-of select="floor((@date mod 604800) div 86400) + 3 mod 7"/>
</xsl:variable>
<xsl:variable name="date_dayofweekstring">
<xsl:choose>
<xsl:when test="$date_dayofweek = 0">
Montag
</xsl:when>
<xsl:when test="$date_dayofweek = 1">
Dienstag
</xsl:when>
<xsl:when test="$date_dayofweek = 2">
Mittwoch
</xsl:when>
<xsl:when test="$date_dayofweek = 3">
Donnerstag
</xsl:when>
<xsl:when test="$date_dayofweek = 4">
Freitag
</xsl:when>
<xsl:when test="$date_dayofweek = 5">
Samstag
</xsl:when>
<xsl:when test="$date_dayofweek = 6">
Sonntag
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="date_dayofmonth" />
<xsl:variable name="date_monthstring" />
<xsl:variable name="date_year" />
<xsl:variable name="datestring">
<xsl:value-of select="concat($date_dayofweekstring, ', ', $date_dayofmonth, '. ', $date_monthstring, ' ', $date_year)" />
</xsl:variable>
<xsl:element name="small">
<xsl:attribute name="class">news_date</xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="@nicedate"/></xsl:attribute>
@ <xsl:value-of select="@date"/>
<!--
<xsl:attribute name="title"><xsl:value-of select="@date"/></xsl:attribute>
-->
@ <xsl:value-of select="$datestring"/>
</xsl:element>
<div class="news">
<xsl:apply-templates/>