From 43026dbdeb11c099e00709329aa47d734c57e1fd Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 5 Sep 2020 23:51:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Colorize=20the=20"important"=20a?= =?UTF-8?q?dmonition=20blocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MANIFEST.in | 2 +- docs/docs_feedback_sphinxext.py | 1 + docs/html/_static/important-admonition.css | 8 ++++++++ docs/html/conf.py | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 docs/html/_static/important-admonition.css diff --git a/MANIFEST.in b/MANIFEST.in index aa6a1d0e71f..24d4553785b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -22,7 +22,7 @@ exclude noxfile.py recursive-include src/pip/_vendor *.pem recursive-include src/pip/_vendor py.typed -recursive-include docs Makefile *.rst *.py *.bat +recursive-include docs *.css *.rst *.py exclude src/pip/_vendor/six exclude src/pip/_vendor/six/moves diff --git a/docs/docs_feedback_sphinxext.py b/docs/docs_feedback_sphinxext.py index 23c8dd0802d..a55a4840c43 100644 --- a/docs/docs_feedback_sphinxext.py +++ b/docs/docs_feedback_sphinxext.py @@ -87,6 +87,7 @@ def setup(app: Sphinx) -> Dict[str, Union[bool, str]]: This function adds a callback for modifying the document sources in-place on read. """ + app.add_css_file('important-admonition.css') app.connect('source-read', _modify_rst_document_source_on_read) return { diff --git a/docs/html/_static/important-admonition.css b/docs/html/_static/important-admonition.css new file mode 100644 index 00000000000..e99a3cf9c28 --- /dev/null +++ b/docs/html/_static/important-admonition.css @@ -0,0 +1,8 @@ +.admonition.important { + background-color: rgb(219, 250, 244); +} + +.admonition.important>.admonition-title { + border: 1px solid rgb(26, 188, 156); + color: rgb(26, 188, 156); +} diff --git a/docs/html/conf.py b/docs/html/conf.py index 6c3e1ba76f7..5051ca6a68a 100644 --- a/docs/html/conf.py +++ b/docs/html/conf.py @@ -174,7 +174,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [] +html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format.