source: stylesheets/xhtml/lfs-navigational.xsl@ 6d3af72

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 6d3af72 was 9fd2b20, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Several changes in the CSS code and navigational stuff.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3700 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 8.4 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 version="1.0">
6
7 <!-- Dropping the HEAD links -->
8 <xsl:template name="html.head">
9 <head>
10 <xsl:call-template name="system.head.content"/>
11 <xsl:call-template name="head.content"/>
12 <xsl:call-template name="user.head.content"/>
13 </head>
14 </xsl:template>
15
16 <!-- Header Navigation-->
17 <xsl:template name="header.navigation">
18 <xsl:param name="prev" select="/foo"/>
19 <xsl:param name="next" select="/foo"/>
20 <xsl:param name="nav.context"/>
21 <xsl:variable name="home" select="/*[1]"/>
22 <xsl:variable name="up" select="parent::*"/>
23 <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
24 and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
25 <xsl:if test="$row and $home != .">
26 <div class="navheader">
27 <xsl:if test="$home != .">
28 <div class="headertitles">
29 <h4>
30 <xsl:apply-templates select="$home" mode="object.title.markup"/>
31 <xsl:text> - </xsl:text>
32 <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
33 </h4>
34 <xsl:if test="$up != $home">
35 <h3>
36 <xsl:apply-templates select="$up" mode="object.title.markup"/>
37 </h3>
38 </xsl:if>
39 </div>
40 </xsl:if>
41 <ul class="headerlinks">
42 <xsl:if test="count($prev)&gt;0 and $prev != $home">
43 <li class="prev">
44 <a accesskey="p">
45 <xsl:attribute name="href">
46 <xsl:call-template name="href.target">
47 <xsl:with-param name="object" select="$prev"/>
48 </xsl:call-template>
49 </xsl:attribute>
50 <xsl:attribute name="title">
51 <xsl:value-of select="$prev/title"/>
52 </xsl:attribute>
53 <xsl:call-template name="navig.content">
54 <xsl:with-param name="direction" select="'prev'"/>
55 </xsl:call-template>
56 </a>
57 <p>
58 <xsl:value-of select="$prev/title"/>
59 </p>
60 </li>
61 </xsl:if>
62 <xsl:if test="count($next)&gt;0">
63 <li class="next">
64 <a accesskey="n">
65 <xsl:attribute name="href">
66 <xsl:call-template name="href.target">
67 <xsl:with-param name="object" select="$next"/>
68 </xsl:call-template>
69 </xsl:attribute>
70 <xsl:attribute name="title">
71 <xsl:value-of select="$next/title"/>
72 </xsl:attribute>
73 <xsl:call-template name="navig.content">
74 <xsl:with-param name="direction" select="'next'"/>
75 </xsl:call-template>
76 </a>
77 <p>
78 <xsl:value-of select="$next/title"/>
79 </p>
80 </li>
81 </xsl:if>
82 <li class="up">
83 <xsl:if test="count($up)&gt;0 and $up != $home">
84 <a accesskey="u">
85 <xsl:attribute name="href">
86 <xsl:call-template name="href.target">
87 <xsl:with-param name="object" select="$up"/>
88 </xsl:call-template>
89 </xsl:attribute>
90 <xsl:attribute name="title">
91 <xsl:apply-templates select="$up" mode="object.title.markup"/>
92 </xsl:attribute>
93 <xsl:call-template name="navig.content">
94 <xsl:with-param name="direction" select="'up'"/>
95 </xsl:call-template>
96 </a>
97 </xsl:if>
98 <xsl:text>.</xsl:text>
99 </li>
100 <li class="home">
101 <a accesskey="h">
102 <xsl:attribute name="href">
103 <xsl:call-template name="href.target">
104 <xsl:with-param name="object" select="$home"/>
105 </xsl:call-template>
106 </xsl:attribute>
107 <xsl:attribute name="title">
108 <xsl:value-of select="$home/bookinfo/title"/>
109 <xsl:text> - </xsl:text>
110 <xsl:value-of select="$home/bookinfo/subtitle"/>
111 </xsl:attribute>
112 <xsl:call-template name="navig.content">
113 <xsl:with-param name="direction" select="'home'"/>
114 </xsl:call-template>
115 </a>
116 </li>
117 </ul>
118 </div>
119 </xsl:if>
120 </xsl:template>
121
122 <!-- Footer Navigation-->
123 <xsl:template name="footer.navigation">
124 <xsl:param name="prev" select="/foo"/>
125 <xsl:param name="next" select="/foo"/>
126 <xsl:param name="nav.context"/>
127 <xsl:variable name="home" select="/*[1]"/>
128 <xsl:variable name="up" select="parent::*"/>
129 <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
130 or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
131 <xsl:if test="$row">
132 <div class="navfooter">
133 <ul>
134 <xsl:if test="count($prev)&gt;0 and $prev != $home">
135 <li class="prev">
136 <a accesskey="p">
137 <xsl:attribute name="href">
138 <xsl:call-template name="href.target">
139 <xsl:with-param name="object" select="$prev"/>
140 </xsl:call-template>
141 </xsl:attribute>
142 <xsl:attribute name="title">
143 <xsl:value-of select="$prev/title"/>
144 </xsl:attribute>
145 <xsl:call-template name="navig.content">
146 <xsl:with-param name="direction" select="'prev'"/>
147 </xsl:call-template>
148 </a>
149 <p>
150 <xsl:value-of select="$prev/title"/>
151 </p>
152 </li>
153 </xsl:if>
154 <xsl:if test="count($next)&gt;0">
155 <li class="next">
156 <a accesskey="n">
157 <xsl:attribute name="href">
158 <xsl:call-template name="href.target">
159 <xsl:with-param name="object" select="$next"/>
160 </xsl:call-template>
161 </xsl:attribute>
162 <xsl:attribute name="title">
163 <xsl:value-of select="$next/title"/>
164 </xsl:attribute>
165 <xsl:call-template name="navig.content">
166 <xsl:with-param name="direction" select="'next'"/>
167 </xsl:call-template>
168 </a>
169 <p>
170 <xsl:value-of select="$next/title"/>
171 </p>
172 </li>
173 </xsl:if>
174 <li class="up">
175 <xsl:if test="count($up)&gt;0 and $up != $home">
176 <a accesskey="u">
177 <xsl:attribute name="href">
178 <xsl:call-template name="href.target">
179 <xsl:with-param name="object" select="$up"/>
180 </xsl:call-template>
181 </xsl:attribute>
182 <xsl:attribute name="title">
183 <xsl:apply-templates select="$up" mode="object.title.markup"/>
184 </xsl:attribute>
185 <xsl:call-template name="navig.content">
186 <xsl:with-param name="direction" select="'up'"/>
187 </xsl:call-template>
188 </a>
189 </xsl:if>
190 <xsl:text>.</xsl:text>
191 </li>
192 <li class="home">
193 <xsl:if test="$home != .">
194 <a accesskey="h">
195 <xsl:attribute name="href">
196 <xsl:call-template name="href.target">
197 <xsl:with-param name="object" select="$home"/>
198 </xsl:call-template>
199 </xsl:attribute>
200 <xsl:attribute name="title">
201 <xsl:value-of select="$home/bookinfo/title"/>
202 <xsl:text> - </xsl:text>
203 <xsl:value-of select="$home/bookinfo/subtitle"/>
204 </xsl:attribute>
205 <xsl:call-template name="navig.content">
206 <xsl:with-param name="direction" select="'home'"/>
207 </xsl:call-template>
208 </a>
209 </xsl:if>
210 <xsl:text>.</xsl:text>
211 </li>
212 </ul>
213 </div>
214 </xsl:if>
215 </xsl:template>
216
217</xsl:stylesheet>
218
219
Note: See TracBrowser for help on using the repository browser.