mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add clickable anchors to HTML docs
Fixes gh-525
This commit is contained in:
parent
b697191e3e
commit
f4ebf8c80f
@ -311,3 +311,31 @@ div.navheader {
|
|||||||
div.navfooter {
|
div.navfooter {
|
||||||
border-top: 1px solid #CCCCCC;
|
border-top: 1px solid #CCCCCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-left: -1em;
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title>a {
|
||||||
|
position: absolute;
|
||||||
|
visibility: hidden;
|
||||||
|
display: block;
|
||||||
|
font-size: 0.85em;
|
||||||
|
margin-top: 0.05em;
|
||||||
|
margin-left: -1em;
|
||||||
|
vertical-align: text-top;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title>a:before {
|
||||||
|
content: "\00A7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.title:hover>a,.title>a:hover,.title:hover>a:hover {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title:focus>a,.title>a:focus,.title:focus>a:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
@ -114,4 +114,27 @@ under the License.
|
|||||||
<xsl:apply-templates mode="titlepage.mode"/>
|
<xsl:apply-templates mode="titlepage.mode"/>
|
||||||
</div>
|
</div>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Title Links -->
|
||||||
|
<xsl:template name="anchor">
|
||||||
|
<xsl:param name="node" select="."/>
|
||||||
|
<xsl:param name="conditional" select="1"/>
|
||||||
|
<xsl:variable name="id">
|
||||||
|
<xsl:call-template name="object.id">
|
||||||
|
<xsl:with-param name="object" select="$node"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
|
||||||
|
<xsl:element name="a">
|
||||||
|
<xsl:attribute name="name">
|
||||||
|
<xsl:value-of select="$id"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>#</xsl:text>
|
||||||
|
<xsl:value-of select="$id"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
Loading…
Reference in New Issue
Block a user