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

Commitcd153b5

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 parent76af974 commitcd153b5

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
@@ -57,7 +57,6 @@ Customization of header
5757
<xsl:variablename="row1"select="$navig.showtitles != 0"/>
5858
<xsl:variablename="row2"select="count($prev)&gt; 0
5959
or (count($up)&gt; 0
60-
and generate-id($up) != generate-id($home)
6160
and $navig.showtitles != 0)
6261
or count($next)&gt; 0"/>
6362

@@ -95,8 +94,7 @@ Customization of header
9594
</td>
9695
<tdwidth="10%"align="{$direction.align.start}">
9796
<xsl:choose>
98-
<xsl:whentest="count($up)&gt;0
99-
and generate-id($up) != generate-id($home)">
97+
<xsl:whentest="count($up)&gt;0">
10098
<aaccesskey="u">
10199
<xsl:attributename="href">
102100
<xsl:call-templatename="href.target">
@@ -117,7 +115,6 @@ Customization of header
117115
<thwidth="60%"align="center">
118116
<xsl:choose>
119117
<xsl:whentest="count($up) > 0
120-
and generate-id($up) != generate-id($home)
121118
and $navig.showtitles != 0">
122119
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
123120
</xsl:when>
@@ -176,4 +173,162 @@ Customization of header
176173
</xsl:if>
177174
</xsl:template>
178175

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp