generate links/anchors so we can link to particular items v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 20 Sep 2019 23:21:21 +0200
branchv_0
changeset 16 131b90c4909e
parent 15 96fc2f42b1e1
child 17 355edb728822
generate links/anchors so we can link to particular items
ssm.xsl
style.css
--- a/ssm.xsl	Fri Sep 20 23:14:44 2019 +0200
+++ b/ssm.xsl	Fri Sep 20 23:21:21 2019 +0200
@@ -65,6 +65,8 @@
 	<xsl:template match="m:chapter">
 		<h2>
 			<xsl:value-of select="m:name"/>
+			<xsl:text> </xsl:text>
+			<a href="#${m:id}" id="${m:id}" class="anchor">#</a>
 		</h2>
 		<ul>
 			<xsl:apply-templates select="m:item"/>
@@ -75,6 +77,8 @@
 	<xsl:template match="m:item">
 		<li>
 			<xsl:apply-templates select="m:text"/>
+			<xsl:text> </xsl:text>
+			<a href="#${m:id}" id="${m:id}" class="anchor">#</a>
 			<xsl:if test="m:item">
 				<ul>
 					<xsl:apply-templates select="m:item"/>
--- a/style.css	Fri Sep 20 23:14:44 2019 +0200
+++ b/style.css	Fri Sep 20 23:21:21 2019 +0200
@@ -1,6 +1,8 @@
 body {
 	font-family: FreeSerif;
 	font-size:  20px;
+	background-color: white;
+	color: black;
 }
 
 h1,h2,h3 {
@@ -11,3 +13,8 @@
 h1 {
 	text-align: center;
 }
+
+a.anchor {
+	color: #eee;
+	text-decoration: none;
+}
\ No newline at end of file