diff --git a/docs/sphinx_extensions/dfhack/tool_docs.py b/docs/sphinx_extensions/dfhack/tool_docs.py index fd6ed0946..809bd48b8 100644 --- a/docs/sphinx_extensions/dfhack/tool_docs.py +++ b/docs/sphinx_extensions/dfhack/tool_docs.py @@ -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']), ] diff --git a/docs/styles/dfhack.css b/docs/styles/dfhack.css index 9b6e523ef..e24ce1c67 100644 --- a/docs/styles/dfhack.css +++ b/docs/styles/dfhack.css @@ -60,3 +60,8 @@ div.body { span.pre { overflow-wrap: break-word; } + +.dfhack-tool-summary p { + margin-top: 0; + margin-bottom: 0.5em; +}