forked from Mirrors/openclonk
docs: Show table of contents on every page
parent
361bae2448
commit
ab067f44b2
|
@ -72,27 +72,26 @@
|
|||
(<xsl:choose><xsl:when test='lang("de")'>veraltet</xsl:when><xsl:otherwise>deprecated</xsl:otherwise></xsl:choose>)
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="funcs">
|
||||
<xsl:template match="doc|funcs">
|
||||
<html>
|
||||
<xsl:call-template name="head" />
|
||||
<body>
|
||||
<xsl:call-template name="header" />
|
||||
<div id="iframe"><iframe>
|
||||
<xsl:attribute name="src"><xsl:value-of select="$relpath" />sdk/content<xsl:value-of select="$fileext" /></xsl:attribute>
|
||||
</iframe></div>
|
||||
<div id="content">
|
||||
<xsl:for-each select="func">
|
||||
<xsl:apply-templates select="." />
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates select="author" />
|
||||
<xsl:apply-templates />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="doc">
|
||||
<xsl:template match="toc">
|
||||
<html>
|
||||
<xsl:call-template name="head" />
|
||||
<body>
|
||||
<xsl:call-template name="header" />
|
||||
<div id="content">
|
||||
<div id="toc">
|
||||
<xsl:apply-templates />
|
||||
</div>
|
||||
</body>
|
||||
|
@ -289,6 +288,9 @@
|
|||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="/toc">
|
||||
<xsl:attribute name="target">_top</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$text" />
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
|
|
@ -11,6 +11,19 @@ body {
|
|||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
body > #iframe {
|
||||
position: absolute; top: 145px; width: 270px; border: 0; bottom: 0; overflow: auto;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
body > #iframe > iframe {
|
||||
border: 0; overflow: auto;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.text, pre.code, ul, ol, dl {
|
||||
margin: 8px 0 12px 0;
|
||||
}
|
||||
|
@ -23,6 +36,7 @@ div.fnsyntax {
|
|||
#content {
|
||||
padding: 0 1em;
|
||||
margin: 0 auto;
|
||||
position: absolute; top: 145px; left: 270px; right: 0; bottom: 0; overflow: auto;
|
||||
}
|
||||
|
||||
div.example {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<!-- <!DOCTYPE doc SYSTEM "../clonk.dtd"> -->
|
||||
<?xml-stylesheet type="text/xsl" href="../clonk.xsl"?>
|
||||
<doc>
|
||||
<toc>
|
||||
<title>Contents</title>
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
@ -163,4 +163,22 @@
|
|||
</li>
|
||||
</ul>
|
||||
</part>
|
||||
</doc>
|
||||
<script>
|
||||
<![CDATA[
|
||||
(function() {
|
||||
var as = document.getElementsByTagName("a");
|
||||
var i = 0, a;
|
||||
var l = parent.location.pathname;
|
||||
while (a = as[i++]) {
|
||||
if (a.pathname.indexOf(l) != -1) {
|
||||
var p = a.parentNode.parentNode;
|
||||
while (p.tagName == "UL") {
|
||||
tb(p.id.slice(3));
|
||||
p = p.parentNode.parentNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
]]>
|
||||
</script>
|
||||
</toc>
|
||||
|
|
Loading…
Reference in New Issue