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

Commit1a7c5b6

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 parentac695b8 commit1a7c5b6

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
@@ -46,7 +46,6 @@ Customization of header
4646
<xsl:variablename="row1"select="$navig.showtitles != 0"/>
4747
<xsl:variablename="row2"select="count($prev)&gt; 0
4848
or (count($up)&gt; 0
49-
and generate-id($up) != generate-id($home)
5049
and $navig.showtitles != 0)
5150
or count($next)&gt; 0"/>
5251

@@ -84,8 +83,7 @@ Customization of header
8483
</td>
8584
<tdwidth="10%"align="{$direction.align.start}">
8685
<xsl:choose>
87-
<xsl:whentest="count($up)&gt;0
88-
and generate-id($up) != generate-id($home)">
86+
<xsl:whentest="count($up)&gt;0">
8987
<aaccesskey="u">
9088
<xsl:attributename="href">
9189
<xsl:call-templatename="href.target">
@@ -106,7 +104,6 @@ Customization of header
106104
<thwidth="60%"align="center">
107105
<xsl:choose>
108106
<xsl:whentest="count($up) > 0
109-
and generate-id($up) != generate-id($home)
110107
and $navig.showtitles != 0">
111108
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
112109
</xsl:when>
@@ -165,4 +162,162 @@ Customization of header
165162
</xsl:if>
166163
</xsl:template>
167164

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp