# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1304176019 -7200
# Node ID 02bad17b45907dcca2c374e8df3bba7b6c037335
# Parent  addd255c39c9a39f99ff6c67c34d429052d5c747
Logo v záhlaví → odkaz na titulní stránku (makro pro interní odkazy).

diff -r addd255c39c9 -r 02bad17b4590 vstup/css/styl.css
--- a/vstup/css/styl.css	Sat Apr 30 12:48:19 2011 +0200
+++ b/vstup/css/styl.css	Sat Apr 30 17:06:59 2011 +0200
@@ -5,6 +5,10 @@
     font-size: 16px;
 }
 
+a img {
+	border: none;
+}
+
 #tělo {
     width: 900px;
     text-align: left;
diff -r addd255c39c9 -r 02bad17b4590 vstup/záhlaví.inc
--- a/vstup/záhlaví.inc	Sat Apr 30 12:48:19 2011 +0200
+++ b/vstup/záhlaví.inc	Sat Apr 30 17:06:59 2011 +0200
@@ -1,7 +1,9 @@
-<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
+<stránka
+	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
+	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
 	<text xmlns="http://www.w3.org/1999/xhtml">
 		<p class="logo">
-			<img src="grafika/logo.png" alt="XML Web generátor"/>
+			<m:a href="index" title="Klikněte pro přechod na úvodní stránku"><img src="grafika/logo.png" alt="XML Web generátor"/></m:a>
 		</p>
     </text>    
 </stránka>
diff -r addd255c39c9 -r 02bad17b4590 šablona/stránka.xsl
--- a/šablona/stránka.xsl	Sat Apr 30 12:48:19 2011 +0200
+++ b/šablona/stránka.xsl	Sat Apr 30 17:06:59 2011 +0200
@@ -3,11 +3,12 @@
 	xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:h="http://www.w3.org/1999/xhtml"
 	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
+	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 	xmlns:fn="http://www.w3.org/2005/xpath-functions"
 	xmlns:svg="http://www.w3.org/2000/svg"
 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
-	exclude-result-prefixes="fn h g xs">
+	exclude-result-prefixes="fn h g xs m">
 	<xsl:output 
 		method="xml" 
 		indent="yes" 
@@ -92,6 +93,21 @@
     <xsl:template match="g:web/g:css">
     	<link href="{text()}" type="text/css" rel="StyleSheet" />
     </xsl:template>
+   
+    <!--
+    	Makro pro převod interních odkazů:
+    		- doplnění správné přípony
+    		- URL kódování znaků
+    -->
+    <xsl:template match="m:a">
+    	<a>
+    		<xsl:copy-of select="@*"/>
+    		<xsl:attribute name="href">
+    			<xsl:value-of select="fn:encode-for-uri(concat(@href, $výstupníPřípona))"/>
+    		</xsl:attribute>
+    		<xsl:apply-templates/>
+    	</a>
+    </xsl:template>
     
     <!-- Ukázka vlastního „makra“: -->
     <xsl:template match="g:měřák">