From ddf77c92a59080f12603c1ecb5ea254a89a654d3 Mon Sep 17 00:00:00 2001 From: Ilmari Lauhakangas Date: Tue, 17 Jun 2025 10:17:21 +0300 Subject: [PATCH] tdf#163747 ODK docs: CSS hack to add "unpublished" decoration Add an HTML_EXTRA_STYLESHEET setting to the Doxyfile of idl and remove HTML_TIMESTAMP = NO while at it (it is disabled by default since Doxygen 1.8.9). The hacky CSS rule is extra long due to the need to exclude *.idl File Reference pages from it. Change-Id: I848f6c216b68875fd032044f04ca72f5a5e2ed1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186595 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas --- odk/docs/idl/Doxyfile | 2 +- odk/docs/idl_extra_styles.css | 83 +++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 odk/docs/idl_extra_styles.css diff --git a/odk/docs/idl/Doxyfile b/odk/docs/idl/Doxyfile index 008ec153b4b0..37636a43e6c7 100644 --- a/odk/docs/idl/Doxyfile +++ b/odk/docs/idl/Doxyfile @@ -15,7 +15,7 @@ RECURSIVE = YES GENERATE_HTML = YES HTML_OUTPUT = . -HTML_TIMESTAMP = NO +HTML_EXTRA_STYLESHEET = "$(SRCDIR)/odk/docs/idl_extra_styles.css" GENERATE_LATEX = NO QUIET = % diff --git a/odk/docs/idl_extra_styles.css b/odk/docs/idl_extra_styles.css new file mode 100644 index 000000000000..98cb5b95be96 --- /dev/null +++ b/odk/docs/idl_extra_styles.css @@ -0,0 +1,83 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* Doxygen 1.8 */ +#top:not(:has(#nav-path .el:first-child[href^="dir_"])) ~ .header .title:not(:has(> .mlabels))::after { + content: "unpublished"; + margin-left: 8px; + background-color: #f63d96; + border-top: 1px solid #ff087b; + border-left: 1px solid #ff087b; + border-right: 1px solid #ffaad1; + border-bottom: 1px solid #ffaad1; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + +/* Doxygen 1.11 */ +#top:not(:has(#nav-path .el:first-child[href^="dir_"])) ~ #doc-content .title:not(:has(> .mlabels))::after { + content: "unpublished"; + margin-left: 8px; + background-color: #f63d96; + border-top: 1px solid #ff087b; + border-left: 1px solid #ff087b; + border-right: 1px solid #ffaad1; + border-bottom: 1px solid #ffaad1; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + +/* Doxygen 1.13 */ +#side-nav:not(:has(#selected a[class*="idl.html"])) ~ #doc-content .title:not(:has(> .mlabels))::after { + content: "unpublished"; + margin-left: 8px; + background-color: #f63d96; + border-top: 1px solid #ff087b; + border-left: 1px solid #ff087b; + border-right: 1px solid #ffaad1; + border-bottom: 1px solid #ffaad1; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + +/* Doxygen 1.14 */ +#side-nav:not(:has(#selected a[class*="idl.html"])) ~ #container .title:not(:has(> .mlabels))::after { + content: "unpublished"; + margin-left: 8px; + background-color: #f63d96; + border-top: 1px solid #ff087b; + border-left: 1px solid #ff087b; + border-right: 1px solid #ffaad1; + border-bottom: 1px solid #ffaad1; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +}