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 <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
Ilmari Lauhakangas
2025-06-17 10:17:21 +03:00
parent cc4dbbf714
commit ddf77c92a5
2 changed files with 84 additions and 1 deletions

View File

@ -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 = %

View File

@ -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;
}