From 220feb1eb37fa37537f6a08b89ed84786c48d166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 1 Oct 2024 19:27:50 +0200 Subject: [PATCH] Add support for toctree captions I do not know if that was supported with doctrine/rst-parser, but there is such a thing as a caption option for the toctree directive, and it seems that phpDocumentor/guides supports it. When I tried it, it produced a "p" element with a caption class. Adding support for that means we could get rid of the toc and tocheader directly. These custom directives appear to be the directives that cause the most unfixable warnings (unfixable without a custom guides extension, that is). We might end up with an extension anyway if there are other warnings, but I think this could be a nice simplification. --- source/styles/index.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/styles/index.scss b/source/styles/index.scss index 5214bc03..97af5645 100644 --- a/source/styles/index.scss +++ b/source/styles/index.scss @@ -123,6 +123,14 @@ h6 { color: #fff; } +.sidebar-sticky .toc .caption { + padding: 8px; + font-size: 20px; + background-color: $doctrine-dark-blue; + margin-bottom: 0; + color: #fff; +} + /** 1st Level */ .sidebar-sticky .toc ul { list-style-type: none;