CHOO CHOO
git-svn-id: http://yolanda.mister-muffin.de/svn@246 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
c1b5da6646
commit
e7d4d653a4
2 changed files with 147 additions and 24 deletions
109
trunk/xsl/xhtml/head.xsl
Normal file
109
trunk/xsl/xhtml/head.xsl
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
>
|
||||
|
||||
<xsl:template name="xhtml-head">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(//@embed)">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="//@stylesheet" />
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
</xsl:when>
|
||||
<xsl:when test="//@embed='video'">
|
||||
<!--
|
||||
embedded stylesheet should rather be done through URL like
|
||||
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
|
||||
-->
|
||||
<link rel="stylesheet" type="text/css">
|
||||
<xsl:attribute name="href">
|
||||
/style/embedded.css
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:if test="boolean(//results)">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="$locale_strings[@id='rss_title_results_this_page']" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$site_strings[@id='path_root']" />
|
||||
<xsl:value-of select="$site_strings[@id='path_results']" />
|
||||
<xsl:value-of select="//results/@query" />
|
||||
&pagesize=<xsl:value-of select="//results/@pagesize" />
|
||||
&page=<xsl:value-of select="//results/@page" />
|
||||
&xslt=rss
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
|
||||
<link rel="alternate" type="application/rss+xml">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="$locale_strings[@id='rss_title_results_all_pages']" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$site_strings[@id='path_root']" />
|
||||
<xsl:value-of select="$site_strings[@id='path_results']" />
|
||||
<xsl:value-of select="//results/@query" />
|
||||
&pagesize=99999
|
||||
&page=1
|
||||
&xslt=rss
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
|
||||
</xsl:if>
|
||||
|
||||
<link
|
||||
rel="search"
|
||||
type="application/opensearchdescription+xml"
|
||||
>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$site_strings[@id='path_root']" />?xslt=opensearch
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="$site_strings[@id='site_name']" />
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
|
||||
<title>
|
||||
<xsl:choose>
|
||||
<xsl:when test="boolean(//frontpage)">
|
||||
<xsl:value-of select="$site_strings[@id='site_name']" />
|
||||
-
|
||||
<xsl:value-of select="$site_strings[@id='site_motto']" />
|
||||
</xsl:when>
|
||||
<xsl:when test="boolean(//resultspage)">
|
||||
<xsl:value-of select="$site_strings[@id='site_name']" />
|
||||
-
|
||||
<xsl:value-of select="$locale_strings[@id='results_for_query']" />
|
||||
"<xsl:value-of select="//resultspage/@query" />"
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--
|
||||
this seems to be fail
|
||||
should be fixed somehow
|
||||
-->
|
||||
<xsl:value-of select="$site_strings[@id='site_name']" />
|
||||
-
|
||||
<xsl:value-of select="$site_strings[@id='site_motto']" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</title>
|
||||
</head>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -42,30 +42,14 @@
|
|||
|
||||
function hide_movie()
|
||||
{
|
||||
var _video = document.getElementbyId('video');
|
||||
document.removeChild(_video);
|
||||
var _video = document.getElementById('video');
|
||||
_video.style.display = 'none';
|
||||
}
|
||||
|
||||
|
||||
function show_movie()
|
||||
{
|
||||
var _container = document.getElementById('container');
|
||||
var _thumbnail = document.getElementById('thumbnail');
|
||||
_container.removeChild(_thumbnail);
|
||||
|
||||
_film = document.createElement('object');
|
||||
_film.type = "application/ogg";
|
||||
]]>
|
||||
</xsl:text>
|
||||
<xsl:value-of select="concat('_film.data = "',//video/rdf:RDF/cc:Work/@rdf:about,'view=true','";')" />
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
<![CDATA[
|
||||
_film.height = "480";
|
||||
_film.width = "640";
|
||||
_film_alt = document.createTextNode('LOL OGG');
|
||||
_film.appendChild(_film_alt);
|
||||
_container.appendChild(_film);
|
||||
}
|
||||
document.getElementById('video').style.display = 'block';
|
||||
}
|
||||
|
||||
]]]]></xsl:text>
|
||||
<xsl:text disable-output-escaping="yes">></xsl:text>
|
||||
|
@ -74,16 +58,46 @@
|
|||
<div class="video" id="container">
|
||||
|
||||
<div id="thumbnail">
|
||||
thumbnail
|
||||
<input type="button" value="playback" onclick="show_movie()" />
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="//video/@thumbnail" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="//video/@height" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="widht">
|
||||
<xsl:value-of select="//video/@width" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
<form method="get">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="//video/rdf:RDF/cc:Work/@rdf:about" />
|
||||
</xsl:attribute>
|
||||
<button
|
||||
name="playback"
|
||||
type="button"
|
||||
value="playback"
|
||||
onclick="show_movie()">
|
||||
<img src="/images/tango/media-playback-start.png" alt="playback" />
|
||||
</button>
|
||||
<button
|
||||
name="download"
|
||||
type="submit"
|
||||
value="download">
|
||||
<img src="/images/tango/document-save.png" alt="download" />
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<object type="application/ogg" style="float: left;" id="video">
|
||||
<object type="application/ogg" style="display: none;" id="video">
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="//video/@width" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="//video/@height + 16" />
|
||||
<xsl:value-of select="//video/@height" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="data">
|
||||
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/@rdf:about,'view=true')" />
|
||||
|
|
Loading…
Reference in a new issue