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

Commit34124b6

Browse files
peteredmpgpro
authored andcommitted
doc: Port page header customizations to XSLT
1 parent51876bf commit34124b6

File tree

1 file changed

+138
-0
lines changed

1 file changed

+138
-0
lines changed

‎doc/src/sgml/stylesheet.xsl

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,142 @@ set toc,title
246246
</xsl:if>
247247
</xsl:template>
248248

249+
250+
<!--
251+
Customization of header
252+
- add Up and Home links
253+
- add tool tips to links
254+
255+
(overrides html/chunk-common.xsl)
256+
-->
257+
<xsl:templatename="header.navigation">
258+
<xsl:paramname="prev"select="/foo"/>
259+
<xsl:paramname="next"select="/foo"/>
260+
<xsl:paramname="nav.context"/>
261+
262+
<xsl:variablename="home"select="/*[1]"/>
263+
<xsl:variablename="up"select="parent::*"/>
264+
265+
<xsl:variablename="row1"select="$navig.showtitles != 0"/>
266+
<xsl:variablename="row2"select="count($prev)&gt; 0
267+
or (count($up)&gt; 0
268+
and generate-id($up) != generate-id($home)
269+
and $navig.showtitles != 0)
270+
or count($next)&gt; 0"/>
271+
272+
<xsl:iftest="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
273+
<divclass="navheader">
274+
<xsl:iftest="$row1 or $row2">
275+
<tablewidth="100%"summary="Navigation header">
276+
<xsl:iftest="$row1">
277+
<tr>
278+
<thcolspan="5"align="center">
279+
<xsl:apply-templatesselect="."mode="object.title.markup"/>
280+
</th>
281+
</tr>
282+
</xsl:if>
283+
284+
<xsl:iftest="$row2">
285+
<tr>
286+
<tdwidth="10%"align="{$direction.align.start}">
287+
<xsl:iftest="count($prev)>0">
288+
<aaccesskey="p">
289+
<xsl:attributename="href">
290+
<xsl:call-templatename="href.target">
291+
<xsl:with-paramname="object"select="$prev"/>
292+
</xsl:call-template>
293+
</xsl:attribute>
294+
<xsl:attributename="title">
295+
<xsl:apply-templatesselect="$prev"mode="object.title.markup"/>
296+
</xsl:attribute>
297+
<xsl:call-templatename="navig.content">
298+
<xsl:with-paramname="direction"select="'prev'"/>
299+
</xsl:call-template>
300+
</a>
301+
</xsl:if>
302+
<xsl:text>&#160;</xsl:text>
303+
</td>
304+
<tdwidth="10%"align="{$direction.align.start}">
305+
<xsl:choose>
306+
<xsl:whentest="count($up)&gt;0
307+
and generate-id($up) != generate-id($home)">
308+
<aaccesskey="u">
309+
<xsl:attributename="href">
310+
<xsl:call-templatename="href.target">
311+
<xsl:with-paramname="object"select="$up"/>
312+
</xsl:call-template>
313+
</xsl:attribute>
314+
<xsl:attributename="title">
315+
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
316+
</xsl:attribute>
317+
<xsl:call-templatename="navig.content">
318+
<xsl:with-paramname="direction"select="'up'"/>
319+
</xsl:call-template>
320+
</a>
321+
</xsl:when>
322+
<xsl:otherwise>&#160;</xsl:otherwise>
323+
</xsl:choose>
324+
</td>
325+
<thwidth="60%"align="center">
326+
<xsl:choose>
327+
<xsl:whentest="count($up) > 0
328+
and generate-id($up) != generate-id($home)
329+
and $navig.showtitles != 0">
330+
<xsl:apply-templatesselect="$up"mode="object.title.markup"/>
331+
</xsl:when>
332+
<xsl:otherwise>&#160;</xsl:otherwise>
333+
</xsl:choose>
334+
</th>
335+
<tdwidth="10%"align="{$direction.align.end}">
336+
<xsl:choose>
337+
<xsl:whentest="$home != . or $nav.context = 'toc'">
338+
<aaccesskey="h">
339+
<xsl:attributename="href">
340+
<xsl:call-templatename="href.target">
341+
<xsl:with-paramname="object"select="$home"/>
342+
</xsl:call-template>
343+
</xsl:attribute>
344+
<xsl:attributename="title">
345+
<xsl:apply-templatesselect="$home"mode="object.title.markup"/>
346+
</xsl:attribute>
347+
<xsl:call-templatename="navig.content">
348+
<xsl:with-paramname="direction"select="'home'"/>
349+
</xsl:call-template>
350+
</a>
351+
<xsl:iftest="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
352+
<xsl:text>&#160;|&#160;</xsl:text>
353+
</xsl:if>
354+
</xsl:when>
355+
<xsl:otherwise>&#160;</xsl:otherwise>
356+
</xsl:choose>
357+
</td>
358+
<tdwidth="10%"align="{$direction.align.end}">
359+
<xsl:text>&#160;</xsl:text>
360+
<xsl:iftest="count($next)>0">
361+
<aaccesskey="n">
362+
<xsl:attributename="href">
363+
<xsl:call-templatename="href.target">
364+
<xsl:with-paramname="object"select="$next"/>
365+
</xsl:call-template>
366+
</xsl:attribute>
367+
<xsl:attributename="title">
368+
<xsl:apply-templatesselect="$next"mode="object.title.markup"/>
369+
</xsl:attribute>
370+
<xsl:call-templatename="navig.content">
371+
<xsl:with-paramname="direction"select="'next'"/>
372+
</xsl:call-template>
373+
</a>
374+
</xsl:if>
375+
</td>
376+
</tr>
377+
</xsl:if>
378+
</table>
379+
</xsl:if>
380+
<xsl:iftest="$header.rule != 0">
381+
<hr/>
382+
</xsl:if>
383+
</div>
384+
</xsl:if>
385+
</xsl:template>
386+
249387
</xsl:stylesheet>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp