Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: GMP doc: hiding of second level sections #2182

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 31 additions & 21 deletions src/schema_formats/HTML/HTML.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</summary>
</xsl:template>

<xsl:template name="details-summary-3">
<xsl:param name="id"/>
<xsl:param name="name"/>
<xsl:param name="text"/>
<summary id="{$id}"
style="margin-block-start: .83em; margin-block-end: .83em; cursor: pointer;">
<h3 style="display: inline;"><xsl:value-of select="$text"/> <tt><xsl:value-of select="$name"/></tt></h3>
</summary>
</xsl:template>

<!-- RNC preamble. -->

<xsl:template name="rnc-preamble">
Expand Down Expand Up @@ -312,12 +322,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

<xsl:template match="type" mode="details">
<xsl:param name="index">5.<xsl:value-of select="position()"/></xsl:param>
<div>
<div>
<h3 id="type_{name}">
<xsl:value-of select="$index"/>
Data Type <tt><xsl:value-of select="name"/></tt></h3>
</div>
<details open="">
<xsl:call-template name="details-summary-3">
<xsl:with-param name="id" select="concat('type_', name)"/>
<xsl:with-param name="text" select="concat($index, ' Data Type ')"/>
<xsl:with-param name="name" select="name"/>
</xsl:call-template>

<xsl:if test="summary">
<p>In short: <xsl:value-of select="normalize-space(summary)"/>.</p>
Expand All @@ -340,7 +350,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</pre>
</div>

</div>
</details>
</xsl:template>

<xsl:template name="type-details">
Expand Down Expand Up @@ -390,12 +400,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

<xsl:template match="element">
<xsl:param name="index">6.<xsl:value-of select="position()"/></xsl:param>
<div>
<div>
<h3 id="element_{name}">
<xsl:value-of select="$index"/>
Element <tt><xsl:value-of select="name"/></tt></h3>
</div>
<details open="">
<xsl:call-template name="details-summary-3">
<xsl:with-param name="id" select="concat('element_', name)"/>
<xsl:with-param name="text" select="concat($index, ' Element ')"/>
<xsl:with-param name="name" select="name"/>
</xsl:call-template>

<p>In short: <xsl:value-of select="normalize-space(summary)"/>.</p>

Expand All @@ -417,7 +427,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
</div>

</div>
</details>
</xsl:template>

<!-- Commands. -->
Expand Down Expand Up @@ -646,12 +656,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

<xsl:template match="command">
<xsl:param name="index">7.<xsl:value-of select="position()"/></xsl:param>
<div>
<div>
<h3 id="command_{name}">
<xsl:value-of select="$index"/>
Command <tt><xsl:value-of select="name"/></tt></h3>
</div>
<details open="">
<xsl:call-template name="details-summary-3">
<xsl:with-param name="id" select="concat('command_', name)"/>
<xsl:with-param name="text" select="concat($index, ' Command ')"/>
<xsl:with-param name="name" select="name"/>
</xsl:call-template>

<p>In short: <xsl:value-of select="normalize-space(summary)"/>.</p>

Expand Down Expand Up @@ -714,7 +724,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</xsl:otherwise>
</xsl:choose>

</div>
</details>
</xsl:template>

<xsl:template match="command" mode="index">
Expand Down
Loading