source: stylesheets/xhtml/lfs-navigational.xsl@ 28501c7

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.0 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 28501c7 was 4238149, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Navigational links: back again to use <ul>
and made a proper css code.

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

  • Property mode set to 100644
File size: 5.4 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns="http://www.w3.org/1999/xhtml"
7 version="1.0">
8
9 <!-- Dropping the HEAD links -->
10 <xsl:template name="html.head">
11 <head>
12 <xsl:call-template name="system.head.content"/>
13 <xsl:call-template name="head.content"/>
14 <xsl:call-template name="user.head.content"/>
15 </head>
16 </xsl:template>
17
18 <!-- Header Navigation-->
19 <xsl:template name="header.navigation">
20 <xsl:param name="prev" select="/foo"/>
21 <xsl:param name="next" select="/foo"/>
22 <xsl:param name="nav.context"/>
23 <xsl:variable name="home" select="/*[1]"/>
24 <xsl:variable name="up" select="parent::*"/>
25 <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
26 and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
27 <xsl:if test="$row and $home != .">
28 <div class="navheader">
29 <xsl:if test="$home != .">
30 <div class="headertitles">
31 <p>
32 <xsl:apply-templates select="$home" mode="object.title.markup"/>
33 <xsl:text> - </xsl:text>
34 <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
35 </p>
36 <xsl:if test="$up != $home">
37 <p><b>
38 <xsl:apply-templates select="$up" mode="object.title.markup"/>
39 </b></p>
40 </xsl:if>
41 </div>
42 </xsl:if>
43 <ul class="headerlinks">
44 <xsl:if test="count($prev)&gt;0 and $prev != $home">
45 <li class="prev">
46 <a accesskey="p">
47 <xsl:attribute name="href">
48 <xsl:call-template name="href.target">
49 <xsl:with-param name="object" select="$prev"/>
50 </xsl:call-template>
51 </xsl:attribute>
52 <xsl:text>Prev</xsl:text>
53 </a>
54 </li>
55 </xsl:if>
56 <xsl:if test="count($next)&gt;0">
57 <li class="next">
58 <a accesskey="n">
59 <xsl:attribute name="href">
60 <xsl:call-template name="href.target">
61 <xsl:with-param name="object" select="$next"/>
62 </xsl:call-template>
63 </xsl:attribute>
64 <xsl:text>Next</xsl:text>
65 </a>
66 </li>
67 <li class="home">
68 <a accesskey="h">
69 <xsl:attribute name="href">
70 <xsl:call-template name="href.target">
71 <xsl:with-param name="object" select="$home"/>
72 </xsl:call-template>
73 </xsl:attribute>
74 <xsl:text>Home</xsl:text>
75 </a>
76 </li>
77 </xsl:if>
78 </ul>
79 </div>
80 </xsl:if>
81 </xsl:template>
82
83 <!-- Footer Navigation-->
84 <xsl:template name="footer.navigation">
85 <xsl:param name="prev" select="/foo"/>
86 <xsl:param name="next" select="/foo"/>
87 <xsl:param name="nav.context"/>
88 <xsl:variable name="home" select="/*[1]"/>
89 <xsl:variable name="up" select="parent::*"/>
90 <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
91 or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
92 <xsl:if test="$row">
93 <div class="navfooter">
94 <ul>
95 <xsl:if test="count($prev)&gt;0 and $prev != $home">
96 <li class="prev">
97 <a accesskey="p">
98 <xsl:attribute name="href">
99 <xsl:call-template name="href.target">
100 <xsl:with-param name="object" select="$prev"/>
101 </xsl:call-template>
102 </xsl:attribute>
103 <xsl:text>Prev</xsl:text>
104 </a>
105 <p>
106 <xsl:apply-templates select="$prev" mode="object.title.markup"/>
107 </p>
108 </li>
109 </xsl:if>
110 <xsl:if test="count($next)&gt;0">
111 <li class="next">
112 <a accesskey="n">
113 <xsl:attribute name="href">
114 <xsl:call-template name="href.target">
115 <xsl:with-param name="object" select="$next"/>
116 </xsl:call-template>
117 </xsl:attribute>
118 <xsl:text>Next</xsl:text>
119 </a>
120 <p>
121 <xsl:apply-templates select="$next" mode="object.title.markup"/>
122 </p>
123 </li>
124 </xsl:if>
125 <xsl:if test="count($up)&gt;0 and $up != $home">
126 <li class="up">
127 <a accesskey="u">
128 <xsl:attribute name="href">
129 <xsl:call-template name="href.target">
130 <xsl:with-param name="object" select="$up"/>
131 </xsl:call-template>
132 </xsl:attribute>
133 <xsl:text>Up</xsl:text>
134 </a>
135 </li>
136 </xsl:if>
137 <xsl:if test="$home != .">
138 <li class="home">
139 <a accesskey="h">
140 <xsl:attribute name="href">
141 <xsl:call-template name="href.target">
142 <xsl:with-param name="object" select="$home"/>
143 </xsl:call-template>
144 </xsl:attribute>
145 <xsl:text>Home</xsl:text>
146 </a>
147 </li>
148 </xsl:if>
149 </ul>
150 </div>
151 </xsl:if>
152 </xsl:template>
153
154</xsl:stylesheet>
155
156
Note: See TracBrowser for help on using the repository browser.