diff options
Diffstat (limited to 'templates/du2html.xsl')
-rw-r--r-- | templates/du2html.xsl | 106 |
1 files changed, 73 insertions, 33 deletions
diff --git a/templates/du2html.xsl b/templates/du2html.xsl index 07521a6..6d30510 100644 --- a/templates/du2html.xsl +++ b/templates/du2html.xsl @@ -60,6 +60,15 @@ <t t="navlinks" l="it">Documenti correlati</t> <t t="navlinks" l="en">Related documents</t> <t t="navtags" l="it">Alcuni tag</t> <t t="navtags" l="en">Some tags</t> <t t="alltags" l="it">Tutti i tag</t> <t t="alltags" l="en">All tags</t> +<t t="attention" l="it">Attenzione!</t> <t t="attention" l="en">Attention!</t> +<t t="caution" l="it">Cautela!</t> <t t="caution" l="en">Caution!</t> +<t t="danger" l="it">!PERICOLO!</t> <t t="danger" l="en">!DANGER!</t> +<t t="error" l="it">Errore</t> <t t="error" l="en">Error</t> +<t t="hint" l="it">Suggerimento</t> <t t="hint" l="en">Hint</t> +<t t="important" l="it">Importante</t> <t t="important" l="en">Important</t> +<t t="note" l="it">Nota</t> <t t="note" l="en">Note</t> +<t t="tip" l="it">Trucco</t> <t t="tip" l="en">Tip</t> +<t t="warning" l="it">Avvertenza</t> <t t="warning" l="en">Warning</t> </x:variable> <x:variable name="const-tr" select="e:node-set($const-tr-rtf)/node()" /> @@ -95,7 +104,7 @@ <x:choose> <x:when test="@refuri and string(.)=string(@refuri)"> - <x:apply-templates select="wc:title-for($langs,ancestor::document/@source,@refuri)"/> + <x:apply-templates select="wc:title-for($langs,ancestor::document/@source,@refuri)/node()"/> </x:when> <x:otherwise> <x:apply-templates /> @@ -105,15 +114,30 @@ </x:template> <x:template match="target[@refid and not(@refuri)]"> - <a name="{@refid}"/> + <a name="{@refid}"> + <x:apply-templates/> + </a> </x:template> - <x:template match="target[@names and not(@refuri)]"> - <x:for-each select="s:split(@names,' ')/token"> - <a name="{.}"/> + <x:template match="target[@ids and not(@refuri)]"> + <x:variable name="this" select="."/> + <x:for-each select="s:split(@ids,' ')/token"> + <a name="{.}"> + <x:apply-templates select="$this/node()"/> + </a> </x:for-each> </x:template> + <x:template match="wc:title/title"> + <x:copy-of select="parent::node()"/> + <x:apply-templates/> + </x:template> + + <x:template match="*" mode="admonition-title"> + <x:variable name="n" select="local-name()"/> + <x:value-of select="$const-tr[@t=$n and @l=$language]"/> + </x:template> + <!-- qui ce ne freghiamo del @source, tanto viene usata solo per i documenti stand-alone --> @@ -122,6 +146,7 @@ <head> <title><x:value-of select="title"/></title> <link rel="stylesheet" type="text/css" href="/layout.css" /> + <link rel="stylesheet" type="text/css" href="/html4css1.css" /> <link rel="stylesheet" type="text/css" href="/content.css" /> <x:for-each select="docinfo/field[field_name='css']/field_body/*/list_item|docinfo/field[field_name='css']/field_body/paragraph"> <link rel="stylesheet" type="text/css" href="{normalize-space(.)}" /> @@ -134,30 +159,45 @@ <x:apply-templates select="docinfo" mode="nav-links" /> </head> <body> - <div id="title"> - <h1> - <x:apply-templates select="title/node()"/> - </h1> - <x:apply-templates select="docinfo" mode="tags" /> - <x:call-template name="alternate-langs" /> - <x:apply-templates select="docinfo" mode="nav-block" /> - </div> - <div id="content"> - <x:apply-templates/> - </div> - <x:call-template name="dates" /> - <div class="nav" id="nav-tags"> - <span class="title"><x:value-of select="$const-tr[@t='navtags' and @l=$language]" /></span> - <ul> - <li><x:call-template name="taglink"><x:with-param name="tag">software</x:with-param></x:call-template></li> - <x:if test="$language = 'it'"> <!-- non ci sono racconti in inglese, per ora --> - <li><x:call-template name="taglink"><x:with-param name="tag">racconti</x:with-param></x:call-template></li> + <div id="wrapper"> + <div id="title"> + <h1 class="title"> + <x:apply-templates select="title/node()"/> + </h1> + <x:if test="subtitle"> + <h2 class="subtitle"> + <x:apply-templates select="subtitle/node()"/> + </h2> </x:if> - <li><x:call-template name="taglink"><x:with-param name="tag">viaggi</x:with-param></x:call-template></li> - </ul> - <a href="{wc:dst-uri-for('/tags/')}"><x:value-of select="$const-tr[@t='alltags' and @l=$language]"/></a> - <hr /> - <a href="{wc:dst-uri-for('/contacts/')}"><x:value-of select="wc:title-for($language,$filename,'/contacts/')" /></a> + </div> + <div id="main-col"> + <x:apply-templates select="docinfo" mode="tags" /> + <x:call-template name="alternate-langs" /> + <div id="content"> + <x:apply-templates/> + </div> + <x:call-template name="dates" /> + </div> + <div id="sidebar"> + <x:apply-templates select="docinfo" mode="nav-block" /> + <div class="nav" id="nav-tags"> + <span class="title"><x:value-of select="$const-tr[@t='navtags' and @l=$language]" /></span> + <ul> + <li><x:call-template name="taglink"><x:with-param name="tag">software</x:with-param></x:call-template></li> + <x:if test="$language = 'it'"> <!-- non ci sono racconti in inglese, per ora --> + <li><x:call-template name="taglink"><x:with-param name="tag">racconti</x:with-param></x:call-template></li> + </x:if> + <li><x:call-template name="taglink"><x:with-param name="tag">viaggi</x:with-param></x:call-template></li> + </ul> + <a href="{wc:dst-uri-for('/tags/')}"><x:value-of select="$const-tr[@t='alltags' and @l=$language]"/></a> + <hr /> + <a href="{wc:dst-uri-for('/contacts/')}"><x:apply-templates select="wc:title-for($language,$filename,'/contacts/')/node()" /></a> + </div> + </div> + <div id="push"></div> + </div> + <div id="footer"> + blah blah blah blah </div> </body> </html> @@ -166,7 +206,7 @@ <x:template name="taglink"> <x:param name="tag"/> <a href="{wc:dst-uri-for(concat('/tags/',$tag,'/'))}"> - <x:value-of select="wc:title-for($language,$filename,concat('/tags/',$tag,'/'))"/> + <x:apply-templates select="wc:title-for($language,$filename,concat('/tags/',$tag,'/'))/node()"/> </a> </x:template> @@ -216,7 +256,7 @@ <dt> <span class="tag title"> <a href="{concat('/tags/',@name,'/')}"> - <x:apply-templates select="wc:title-for($language,$filename,concat('/tags/',@name,'/'))"/> + <x:apply-templates select="wc:title-for($language,$filename,concat('/tags/',@name,'/'))/node()"/> </a> </span> </dt> @@ -229,7 +269,7 @@ <x:template match="wc:doc"> <li> - <a class="tag doc" href="{@uri}"><x:apply-templates select="wc:title-for($language,$filename,@uri)"/></a> + <a class="tag doc" href="{@uri}"><x:apply-templates select="wc:title-for($language,$filename,@uri)/node()"/></a> (<span class="tag doc langs"><x:apply-templates/></span>) </li> </x:template> @@ -265,7 +305,7 @@ <li> <span class="tag"> <a href="{concat('/tags/',$tag-name,'/')}"> - <x:apply-templates select="wc:title-for($language,$filename,concat('/tags/',$tag-name,'/'))"/> + <x:apply-templates select="wc:title-for($language,$filename,concat('/tags/',$tag-name,'/'))/node()"/> </a> </span> </li> @@ -298,7 +338,7 @@ </dt> <dd class="nav-link-{$rel}"> <a class="nav-link-{$rel}" href="{normalize-space(.)}"> - <x:apply-templates select="wc:title-for($langs,ancestor::document/@source,normalize-space(.))"/> + <x:apply-templates select="wc:title-for($langs,ancestor::document/@source,normalize-space(.))/node()"/> </a> </dd> </x:template> |