Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6a8f6ae

Browse files
committed
doc: Don't hide the "Up" link when it is the same as "Home"
The original stylesheets seemed to think this was a good idea, but ourusers find it confusing and unhelpful, so undo that logic.Reported-by: Fabien COELHO <coelho@cri.ensmp.fr>Discussion:https://www.postgresql.org/message-id/flat/alpine.DEB.2.22.394.2006210914370.859381%40pseudo
1 parent4e10c0c commit6a8f6ae

File tree

1 file changed

+159
-4
lines changed

1 file changed

+159
-4
lines changed

‎doc/src/sgml/stylesheet.xsl

Lines changed: 159 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Customization of header
5252
<xsl:variablename="row1"select="$navig.showtitles != 0"/>
5353
<xsl:variablename="row2"select="count($prev)&gt; 0
5454
or (count($up)&gt; 0
55-
and generate-id($up) != generate-id($home)
5655
and $navig.showtitles != 0)
5756
or count($next)&gt; 0"/>
5857

@@ -90,8 +89,7 @@ Customization of header
9089
</td>
9190
<tdwidth="10%"align="{$direction.align.start}">
9291
<xsl:choose>
93-
<xsl:whentest="count($up)&gt;0
94-
and generate-id($up) != generate-id($home)">
92+
<xsl:whentest="count($up)&gt;0">
9593
<aaccesskey="u">
9694
<xsl:attributename="href">
9795
<xsl:call-templatename="href.target">
@@ -112,7 +110,6 @@ Customization of header
112110
<thwidth="60%"align="center">
113111
<xsl:choose>
114112
<xsl:whentest="count($up) > 0
115-
and generate-id($up) != generate-id($home)
116113
and $navig.showtitles != 0">
117114
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
118115
</xsl:when>
@@ -171,4 +168,162 @@ Customization of header
171168
</xsl:if>
172169
</xsl:template>
173170

171+
172+
<!--
173+
Customization of footer
174+
- don't hide redundant Up link
175+
- add tool tips to links
176+
177+
(overrides html/chunk-common.xsl)
178+
-->
179+
<xsl:templatename="footer.navigation">
180+
<xsl:paramname="prev"select="/foo"/>
181+
<xsl:paramname="next"select="/foo"/>
182+
<xsl:paramname="nav.context"/>
183+
184+
<xsl:variablename="home"select="/*[1]"/>
185+
<xsl:variablename="up"select="parent::*"/>
186+
187+
<xsl:variablename="row1"select="count($prev)&gt; 0
188+
or count($up)&gt; 0
189+
or count($next)&gt; 0"/>
190+
191+
<xsl:variablename="row2"select="($prev and $navig.showtitles != 0)
192+
or (generate-id($home) != generate-id(.)
193+
or $nav.context = 'toc')
194+
or ($chunk.tocs.and.lots != 0
195+
and $nav.context != 'toc')
196+
or ($next and $navig.showtitles != 0)"/>
197+
198+
<xsl:iftest="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
199+
<divclass="navfooter">
200+
<xsl:iftest="$footer.rule != 0">
201+
<hr/>
202+
</xsl:if>
203+
204+
<xsl:iftest="$row1 or $row2">
205+
<tablewidth="100%"summary="Navigation footer">
206+
<xsl:iftest="$row1">
207+
<tr>
208+
<tdwidth="40%"align="{$direction.align.start}">
209+
<xsl:iftest="count($prev)>0">
210+
<aaccesskey="p">
211+
<xsl:attributename="href">
212+
<xsl:call-templatename="href.target">
213+
<xsl:with-paramname="object"select="$prev"/>
214+
</xsl:call-template>
215+
</xsl:attribute>
216+
<xsl:attributename="title">
217+
<xsl:apply-templatesselect="$prev"mode="object.title.markup"/>
218+
</xsl:attribute>
219+
<xsl:call-templatename="navig.content">
220+
<xsl:with-paramname="direction"select="'prev'"/>
221+
</xsl:call-template>
222+
</a>
223+
</xsl:if>
224+
<xsl:text>&#160;</xsl:text>
225+
</td>
226+
<tdwidth="20%"align="center">
227+
<xsl:choose>
228+
<xsl:whentest="count($up)&gt;0">
229+
<aaccesskey="u">
230+
<xsl:attributename="href">
231+
<xsl:call-templatename="href.target">
232+
<xsl:with-paramname="object"select="$up"/>
233+
</xsl:call-template>
234+
</xsl:attribute>
235+
<xsl:attributename="title">
236+
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
237+
</xsl:attribute>
238+
<xsl:call-templatename="navig.content">
239+
<xsl:with-paramname="direction"select="'up'"/>
240+
</xsl:call-template>
241+
</a>
242+
</xsl:when>
243+
<xsl:otherwise>&#160;</xsl:otherwise>
244+
</xsl:choose>
245+
</td>
246+
<tdwidth="40%"align="{$direction.align.end}">
247+
<xsl:text>&#160;</xsl:text>
248+
<xsl:iftest="count($next)>0">
249+
<aaccesskey="n">
250+
<xsl:attributename="href">
251+
<xsl:call-templatename="href.target">
252+
<xsl:with-paramname="object"select="$next"/>
253+
</xsl:call-template>
254+
</xsl:attribute>
255+
<xsl:attributename="title">
256+
<xsl:apply-templatesselect="$next"mode="object.title.markup"/>
257+
</xsl:attribute>
258+
<xsl:call-templatename="navig.content">
259+
<xsl:with-paramname="direction"select="'next'"/>
260+
</xsl:call-template>
261+
</a>
262+
</xsl:if>
263+
</td>
264+
</tr>
265+
</xsl:if>
266+
267+
<xsl:iftest="$row2">
268+
<tr>
269+
<tdwidth="40%"align="{$direction.align.start}"valign="top">
270+
<xsl:iftest="$navig.showtitles != 0">
271+
<xsl:apply-templatesselect="$prev"mode="object.title.markup"/>
272+
</xsl:if>
273+
<xsl:text>&#160;</xsl:text>
274+
</td>
275+
<tdwidth="20%"align="center">
276+
<xsl:choose>
277+
<xsl:whentest="$home != . or $nav.context = 'toc'">
278+
<aaccesskey="h">
279+
<xsl:attributename="href">
280+
<xsl:call-templatename="href.target">
281+
<xsl:with-paramname="object"select="$home"/>
282+
</xsl:call-template>
283+
</xsl:attribute>
284+
<xsl:attributename="title">
285+
<xsl:apply-templatesselect="$home"mode="object.title.markup"/>
286+
</xsl:attribute>
287+
<xsl:call-templatename="navig.content">
288+
<xsl:with-paramname="direction"select="'home'"/>
289+
</xsl:call-template>
290+
</a>
291+
<xsl:iftest="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
292+
<xsl:text>&#160;|&#160;</xsl:text>
293+
</xsl:if>
294+
</xsl:when>
295+
<xsl:otherwise>&#160;</xsl:otherwise>
296+
</xsl:choose>
297+
298+
<xsl:iftest="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
299+
<aaccesskey="t">
300+
<xsl:attributename="href">
301+
<xsl:value-ofselect="$chunked.filename.prefix"/>
302+
<xsl:apply-templatesselect="/*[1]"
303+
mode="recursive-chunk-filename">
304+
<xsl:with-paramname="recursive"select="true()"/>
305+
</xsl:apply-templates>
306+
<xsl:text>-toc</xsl:text>
307+
<xsl:value-ofselect="$html.ext"/>
308+
</xsl:attribute>
309+
<xsl:call-templatename="gentext">
310+
<xsl:with-paramname="key"select="'nav-toc'"/>
311+
</xsl:call-template>
312+
</a>
313+
</xsl:if>
314+
</td>
315+
<tdwidth="40%"align="{$direction.align.end}"valign="top">
316+
<xsl:text>&#160;</xsl:text>
317+
<xsl:iftest="$navig.showtitles != 0">
318+
<xsl:apply-templatesselect="$next"mode="object.title.markup"/>
319+
</xsl:if>
320+
</td>
321+
</tr>
322+
</xsl:if>
323+
</table>
324+
</xsl:if>
325+
</div>
326+
</xsl:if>
327+
</xsl:template>
328+
174329
</xsl:stylesheet>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp