Allg. calendar-Verbesserungen

calendar CSS
Events statt Chaosdienstage


git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@542 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2006-10-29 11:50:59 +00:00
parent 0f1d30ad23
commit d0ffc535f0
4 changed files with 88 additions and 11 deletions

View File

@ -1,11 +1,30 @@
<?xml version="1.0"?>
<calendar>
<event title="Chaosdienstag">
<start>2006-10-17T19:00:00</start>
<location>Dresden</location>
<event title="Perl Mongers Treffen">
<start>2006-10-05T20:00:00</start>
<location>Medienkulturhaus Dresden</location>
<link>http://dresden-pm.org/cgi-bin/twiki/view/PM/TermineTreffen</link>
</event>
<event title="Chaosdienstag">
<start>2006-10-24T19:00:00</start>
<location>Dresden</location>
<event title="Wikipedia-Tag Dresden">
<start>2006-10-06T15:00:00</start>
<end>2006-10-06T20:00:00</end>
<location>Hörsaalzentraum TU Dresden</location>
<link>http://de.wikipedia.org/wiki/Wikipedia:Wikipedia-Tag_Dresden</link>
</event>
<event title="C3LE Python-Vortrag">
<start>2006-10-25T20:00:00</start>
<location>linXXnet, Bornaische Straße 3d, Leipzig</location>
<link>http://wiki.c3le.de/wiki/Treffen</link>
</event>
<event title="RuPy">
<start>2007-04-07</start>
<end>2007-04-08</end>
<location>Adam Mickiewicz University, Poznan, Poland</location>
<link>http://rupy.wmid.amu.edu.pl/</link>
</event>
<event title="Kauf-Nix-Tag">
<start>2006-11-25</start>
<location>global</location>
<link>http://de.wikipedia.org/wiki/Kauf-Nix-Tag</link>
</event>
</calendar>

View File

@ -320,6 +320,50 @@ abbr.dtstart, abbr.dtend {
border-bottom: none;
}
/* -- Calendar -- */
table.calendar {
table-layout: fixed;
width: 100%;
border-collapse: collapse;
}
table.calendar tr td {
border: 1px solid black;
vertical-align: top;
}
table.calendar tr td span.day {
font-size: 200%;
font-weight: bold;
padding: 2px;
}
td.calweek1 {
color: black;
}
td.calsun1 {
color: red;
}
td.calweek2 {
color: #6f6f6f;
}
td.calsun2 {
color: #ff6f6f;
}
td.calweek3 {
color: #bfbfbf;
}
td.calsun3 {
color: #ffbfbf;
}
table.calendar tr td ul {
list-style-type: none;
font-size: 70%;
padding: 2px 0px;
margin: 0px;
}
/* -- Search Engine -- */
div.search div.estform {
margin: 0.8em 1.0em; padding: 0em 1.0em;

View File

@ -18,14 +18,17 @@
<!-- Events aus den News ziehen -->
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
<xsl:message>newsfile: <xsl:value-of select="."/></xsl:message>
<xsl:apply-templates select="document(concat('../', .))/item/event"/>
<xsl:apply-templates select="document(concat('../', .))/item/event">
<xsl:with-param name="link" select="substring-after(., 'content/')"/>
</xsl:apply-templates>
</xsl:for-each>
</calendar-summary>
</page>
</xsl:template>
<xsl:template match="event">
<xsl:param name="link"/>
<event>
<title>
<xsl:choose>
@ -38,6 +41,12 @@
</title>
<date><xsl:value-of select="start"/></date>
<location><xsl:value-of select="location"/></location>
<link>
<xsl:choose>
<xsl:when test="link"><xsl:value-of select="link"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$link"/></xsl:otherwise>
</xsl:choose>
</link>
<!-- TODO: Link -->
</event>
</xsl:template>

View File

@ -39,7 +39,6 @@
</tr>
<xsl:variable name="nextweek" select="date:add($date, 'P7D')"/>
<xsl:message>nextweek: <xsl:value-of select="$nextweek"/></xsl:message>
<xsl:if test="date:month-in-year($nextweek) != $stopmonth">
<xsl:call-template name="output-week">
<xsl:with-param name="date" select="$nextweek"/>
@ -69,12 +68,18 @@
<xsl:otherwise>3</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="date:day-in-month($date)"/>
<span class="day">
<xsl:value-of select="date:day-in-month($date)"/>
</span>
<ul>
<xsl:for-each select="event">
<xsl:sort select="date"/>
<xsl:if test="concat(date:year($date),'-',date:month-in-year($date),'-',date:day-in-month($date)) = concat(date:year(date),'-',date:month-in-year(date),'-',date:day-in-month(date))">
<li><xsl:value-of select="title"/></li>
<li>
<a href="{link}">
<xsl:value-of select="title"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>