CSS-Rollover für Locations mit Link zu Google Maps, bitte weitere Kartenanbieter einbauen

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@1151 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2008-04-17 15:29:02 +00:00
parent acf17de00f
commit e5abff67ba
2 changed files with 52 additions and 2 deletions

View File

@ -241,6 +241,23 @@ pre {
text-decoration: underline;
}
/* -- Location hints -- */
ul.location-hints {
display: none;
position: fixed;
background-color: white;
margin: 0;
padding: 0.1em 0.3em;
border: 2px solid #ebc63c;
}
ul.location-hints li {
list-style-type: none;
list-style-image: none;
}
dl:hover dd ul.location-hints {
display: inline;
}
/* -- Upcoming -- */
#upcoming {
text-align: left;

View File

@ -5,7 +5,8 @@
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="xsl rss rdf date">
xmlns:str="http://exslt.org/strings"
exclude-result-prefixes="xsl rss rdf date str">
<xsl:template match="pre">
<pre><xsl:apply-templates/></pre>
@ -251,7 +252,39 @@
<xsl:template match="item/event/location">
<dl>
<dt>Ort</dt>
<dd class="location"><xsl:apply-templates/></dd>
<dd>
<!-- Extra <span/>, damit die location-hints nicht mit ins
Microformat rutschen
-->
<span class="location">
<xsl:apply-templates/>
</span>
<ul class="location-hints">
<xsl:variable name="location">
<xsl:choose>
<!-- Extrem schmutziger Hack:
Google Maps versteht keine Raum-Angaben
-->
<xsl:when test="contains(., 'Raum')">
<xsl:value-of select="substring-before(., 'Raum')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="location-encoded"
select="str:encode-uri($location, true())"/>
<li>
<a href="http://maps.google.com/maps?q={$location-encoded}">Google Maps</a>
</li>
<!-- Hier bitte weitere Anbieter einfügen, wir sind
doch nicht Google-zentrisch. Ich habe nur gerade
keine akzeptablen gefunden. Astro
-->
</ul>
</dd>
</dl>
</xsl:template>