Hello, On Thu 15 Feb 2024 at 11:44pm +01, Holger Wansing wrote:
> Sean Whitton <spwhit...@spwhitton.name> wrote: >> On Fri 29 Dec 2023 at 07:08am +01, Stéphane Blondon wrote: >> >> > Yes, html_static_path must be set but it's already the case in conf.py.in: >> > https://sources.debian.org/src/debian-policy/4.6.2.0/policy/conf.py.in/#L105 >> > >> > I guess conf.py is generated from conf.py.in so we only need to keep >> > the current setup. >> >> That line is commented out, though. Are you saying it takes on its >> default value in that case? > > I think it would be good to un-comment such lines which are needed, so it's > clear without doubt, what is used and active. > Works fine here BTW. Attached is the patch I prepared, which I couldn't get to work. Maybe you can see what is wrong. Thanks! -- >8 -- From: =?UTF-8?q?St=C3=A9phane=20Blondon?= <stephane.blon...@gmail.com> Date: Mon, 27 Nov 2023 23:36:06 +0100 Subject: [PATCH] New Debian-specific Sphinx style --- debian/changelog | 3 ++ debian/control | 1 + policy/conf.py.in | 5 ++- policy/debian.css | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 policy/debian.css diff --git a/debian/changelog b/debian/changelog index ffa0f8b..6d04491 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ debian-policy (4.6.2.1) UNRELEASED; urgency=medium package metadata. * Update Installed-Size algorithm used by dpkg (Closes: #793499). + [ Stéphane Blondon ] + * New Debian-specific Sphinx style (Closes: #915583). + -- Russ Allbery <r...@debian.org> Sat, 09 Sep 2023 15:27:27 -0700 debian-policy (4.6.2.0) unstable; urgency=medium diff --git a/debian/control b/debian/control index a98b425..ebb3c3f 100644 --- a/debian/control +++ b/debian/control @@ -17,6 +17,7 @@ Build-Depends: libxml2-utils, links | elinks, python3-sphinx, + python3-sphinx-rtd-theme, sphinx-common (>= 1.6.5), sphinx-intl, texinfo, diff --git a/policy/conf.py.in b/policy/conf.py.in index d516d7b..86bc1ac 100755 --- a/policy/conf.py.in +++ b/policy/conf.py.in @@ -84,7 +84,7 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'nature' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -92,6 +92,9 @@ html_theme = 'nature' # # html_theme_options = {} +# Overwrite theme to fit Debian colors +html_css_files = ['debian.css'] + # Override the title to remove the unnecessary "documentation" suffix. html_title = "Debian Policy Manual v@VERSION@" diff --git a/policy/debian.css b/policy/debian.css new file mode 100644 index 0000000..7f0981b --- /dev/null +++ b/policy/debian.css @@ -0,0 +1,103 @@ +/* Debian Cascading stylesheet for Sphinx */ + +div.related { + background-color: #C70036; +} + +.rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4, .rst-content h5, .rst-content h6 { + color: #C70036; +} + +.wy-nav-top { + background-color: #C70036; +} + +.wy-side-nav-search { + background-color: #C70036; +} + +.rst-content a:link { + color: #0035C7; + text-decoration: none; +} +.rst-content a:visited { + color: #00207A; + text-decoration: none; +} +.rst-content a:link:hover { + color: #00207A; + text-decoration: underline; +} + + +/* Table in content */ + +.wy-table-responsive table td, .wy-table-responsive table th { + white-space: normal; +} + +.rst-content table.docutils, .wy-table-bordered-all { + width: 100%; +} + +.wy-table-responsive table.docutils thead tr { + background-color: #C70036; + border: 1px solid black; + color: black; +} + +.wy-table-responsive table.docutils thead tr:hover { + color: #fcfcfc; +} + +.wy-table-responsive table.docutils tbody tr:hover { + background-color:#666666; + color: #FFFFFF; +} + +.rst-content table.docutils:not(.field-list) tbody tr:hover:nth-child(2n-1), .wy-table-backed, .wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td { + background-color:#666666; +} + +/* Previous and next buttons */ + +.rst-footer-buttons .btn:hover { + text-decoration: none !important; +} + +/* Version release more readable */ + +.wy-side-nav-search > div.version { + color: #FCFCFC; +} + +/* Infos blocks */ + +div.warning { + border: 1px dashed #EFF500; + background-color: #eff50030; +} + +div.note { + border: 1px dashed blue; + background-color: #0000ff30; + +} + +.warning, .note { + margin-left: 1em; + margin-right: 1em; +} + +@media (max-width: 5in), (max-device-width: 5in){ + .warning, .note { + margin-left: 0.5em; + margin-right: 0.5em; + } +} + +/* Notes */ + +html.writer-html5 .rst-content aside.citation, html.writer-html5 .rst-content aside.footnote, html.writer-html5 .rst-content div.citation { + display: block; +} -- Sean Whitton
signature.asc
Description: PGP signature