Render dfhack-tool as admonition

Getting a section header integrated is complicated, so might as well emulate
Mediawiki with a box-like element instead
develop
lethosor 2022-08-06 16:59:45 -04:00
parent de5f4d3566
commit bb2ca0cc16
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
2 changed files with 12 additions and 2 deletions

@ -32,8 +32,13 @@ class DFHackToolDirective(sphinx.directives.ObjectDescription):
tag_nodes.pop()
return [
nodes.section('', nodes.title(text=tool_name), ids=[tool_name]),
nodes.paragraph('', '', *tag_nodes),
nodes.admonition('', *[
nodes.paragraph('', '', *[
nodes.strong('', 'Tool: '),
nodes.inline('', tool_name),
]),
nodes.paragraph('', '', *tag_nodes),
], classes=['dfhack-tool-summary']),
]

@ -60,3 +60,8 @@ div.body {
span.pre {
overflow-wrap: break-word;
}
.dfhack-tool-summary p {
margin-top: 0;
margin-bottom: 0.5em;
}