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"?> <?xml version="1.0"?>
<calendar> <calendar>
<event title="Chaosdienstag"> <event title="Perl Mongers Treffen">
<start>2006-10-17T19:00:00</start> <start>2006-10-05T20:00:00</start>
<location>Dresden</location> <location>Medienkulturhaus Dresden</location>
<link>http://dresden-pm.org/cgi-bin/twiki/view/PM/TermineTreffen</link>
</event> </event>
<event title="Chaosdienstag"> <event title="Wikipedia-Tag Dresden">
<start>2006-10-24T19:00:00</start> <start>2006-10-06T15:00:00</start>
<location>Dresden</location> <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> </event>
</calendar> </calendar>

View File

@ -320,6 +320,50 @@ abbr.dtstart, abbr.dtend {
border-bottom: none; 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 -- */ /* -- Search Engine -- */
div.search div.estform { div.search div.estform {
margin: 0.8em 1.0em; padding: 0em 1.0em; margin: 0.8em 1.0em; padding: 0em 1.0em;

View File

@ -18,14 +18,17 @@
<!-- Events aus den News ziehen --> <!-- Events aus den News ziehen -->
<xsl:for-each select="document('../news.xml')/page/news/newsfile"> <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> </xsl:for-each>
</calendar-summary> </calendar-summary>
</page> </page>
</xsl:template> </xsl:template>
<xsl:template match="event"> <xsl:template match="event">
<xsl:param name="link"/>
<event> <event>
<title> <title>
<xsl:choose> <xsl:choose>
@ -38,6 +41,12 @@
</title> </title>
<date><xsl:value-of select="start"/></date> <date><xsl:value-of select="start"/></date>
<location><xsl:value-of select="location"/></location> <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 --> <!-- TODO: Link -->
</event> </event>
</xsl:template> </xsl:template>

View File

@ -39,7 +39,6 @@
</tr> </tr>
<xsl:variable name="nextweek" select="date:add($date, 'P7D')"/> <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:if test="date:month-in-year($nextweek) != $stopmonth">
<xsl:call-template name="output-week"> <xsl:call-template name="output-week">
<xsl:with-param name="date" select="$nextweek"/> <xsl:with-param name="date" select="$nextweek"/>
@ -69,12 +68,18 @@
<xsl:otherwise>3</xsl:otherwise> <xsl:otherwise>3</xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </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> <ul>
<xsl:for-each select="event"> <xsl:for-each select="event">
<xsl:sort select="date"/> <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))"> <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:if>
</xsl:for-each> </xsl:for-each>
</ul> </ul>