From d032bd3c608cb28a82745e828c254f55d6adcfdf Mon Sep 17 00:00:00 2001 From: bpuchala Date: Fri, 1 Dec 2023 16:03:37 -0500 Subject: [PATCH] docs theme update --- python/doc/_static/css/custom.css | 41 +++- python/doc/_static/logo_dark.svg | 91 ++++++++ python/doc/_static/logo_dark_outline.svg | 283 +++++++++++++++++++++++ python/doc/_static/logo_outline.svg | 275 ++++++++++++++++++++++ python/doc/_static/small_logo.svg | 49 +++- python/doc/_static/small_logo_dark.svg | 49 ++++ python/doc/conf.py | 15 +- python/doc/index.rst | 8 +- 8 files changed, 800 insertions(+), 11 deletions(-) create mode 100644 python/doc/_static/logo_dark.svg create mode 100644 python/doc/_static/logo_dark_outline.svg create mode 100644 python/doc/_static/logo_outline.svg create mode 100644 python/doc/_static/small_logo_dark.svg diff --git a/python/doc/_static/css/custom.css b/python/doc/_static/css/custom.css index fcf39de..d99e573 100644 --- a/python/doc/_static/css/custom.css +++ b/python/doc/_static/css/custom.css @@ -1,11 +1,48 @@ -:root[data-theme='light'], -:root[data-theme='dark'] { +:root[data-theme='light'] { --pst-color-primary: #0072b5; + --pst-color-secondary: #febc15; --pst-color-link: #0072b5; --pst-color-inline-code: #0072b5; --sd-color-card-border-hover: #0072b5; + + dt { + background-color: #eaeaea; + } + +} + +:root[data-theme='dark'] { + --pst-color-primary: #6DC8BF; + --pst-color-secondary: #CBDB2A; + --pst-color-link: #6DC8BF; + --pst-color-inline-code: #6DC8BF; + --sd-color-card-border-hover: #6DC8BF; + + dt { + background-color: #6A4729F7; + } + + /* note */ + .admonition.note > .admonition-title::before, div.admonition.note > .admonition-title::before { + background-color: #8739b3; + } + + .admonition.note > .admonition-title::after, div.admonition.note > .admonition-title::after { + color: #c695c5; + content: var(--pst-icon-admonition-note); + } + + .admonition.note, div.admonition.note { + border-color: #c695c5; + } + + /* deprecated */ + --pst-color-danger: #f9e1e4; + --pst-color-danger-bg: #d72d47; } + + /* Fix breadcrumb overlap https://github.com/holoviz/panel/issues/5199 */ .header-article__inner .header-article-item { height: unset; diff --git a/python/doc/_static/logo_dark.svg b/python/doc/_static/logo_dark.svg new file mode 100644 index 0000000..7531e64 --- /dev/null +++ b/python/doc/_static/logo_dark.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A Clusters App +r +oach to Statistical Mechanics +CASM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/doc/_static/logo_dark_outline.svg b/python/doc/_static/logo_dark_outline.svg new file mode 100644 index 0000000..052b823 --- /dev/null +++ b/python/doc/_static/logo_dark_outline.svg @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/doc/_static/logo_outline.svg b/python/doc/_static/logo_outline.svg new file mode 100644 index 0000000..7300fdb --- /dev/null +++ b/python/doc/_static/logo_outline.svg @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/doc/_static/small_logo.svg b/python/doc/_static/small_logo.svg index 0f1e8ef..e571f55 100644 --- a/python/doc/_static/small_logo.svg +++ b/python/doc/_static/small_logo.svg @@ -1 +1,48 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/doc/_static/small_logo_dark.svg b/python/doc/_static/small_logo_dark.svg new file mode 100644 index 0000000..2298841 --- /dev/null +++ b/python/doc/_static/small_logo_dark.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/doc/conf.py b/python/doc/conf.py index 1daf12d..ba7a73d 100644 --- a/python/doc/conf.py +++ b/python/doc/conf.py @@ -25,7 +25,7 @@ autosummary_generate = True autosummary_imported_members = True numpydoc_show_class_members = False -autodoc_typehints = "description" +# autodoc_typehints = 'both' autodoc_typehints_format = "short" python_use_unqualified_type_names = True autodoc_inherit_docstrings = False @@ -131,22 +131,23 @@ html_theme_options = { "logo": { "text": "libcasm-mapping", - } + "image_light": "_static/small_logo.svg", + "image_dark": "_static/small_logo_dark.svg", + }, + "pygment_light_style": "xcode", + "pygment_dark_style": "lightbulb", } + # 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 = ["_static"] html_favicon = "_static/small_logo.svg" +favicons = ["small_logo.svg"] html_css_files = [ "css/custom.css", ] -# 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 = ["_static"] - # Custom sidebar templates, must be a dictionary that maps document names # to template names. # diff --git a/python/doc/index.rst b/python/doc/index.rst index e43cb4c..c584b16 100644 --- a/python/doc/index.rst +++ b/python/doc/index.rst @@ -1,6 +1,12 @@ -.. image:: _static/logo.svg +.. image:: _static/logo_outline.svg :alt: CASM logo :width: 600 + :class: only-light + +.. image:: _static/logo_dark_outline.svg + :alt: CASM logo + :width: 600 + :class: only-dark libcasm-mapping ===============