From 2b838752332e3890f59d6d0ad444f75031586952 Mon Sep 17 00:00:00 2001 From: Peter Jun Park Date: Mon, 29 Jul 2024 10:23:43 -0400 Subject: [PATCH] add custom css Signed-off-by: Peter Jun Park --- docs/conf.py | 3 +++ docs/sphinx/static/o_custom.css | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 docs/sphinx/static/o_custom.css diff --git a/docs/conf.py b/docs/conf.py index 47397d5a5..e402a34b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,6 +47,9 @@ html_title = f"{project} {version_number} documentation" exclude_patterns = ["*/includes/*"] +html_static_path = ["sphinx/static/css"] +html_css_files = ["o_custom.css"] + external_toc_path = "./sphinx/_toc.yml" external_projects_current_project = "omniperf" diff --git a/docs/sphinx/static/o_custom.css b/docs/sphinx/static/o_custom.css new file mode 100644 index 000000000..a6cbe5718 --- /dev/null +++ b/docs/sphinx/static/o_custom.css @@ -0,0 +1,30 @@ +:root { + --amd-teal-500: #00C2DE; + --amd-teal-750: #00788E; +} + +/* Override PyData Sphinx Theme default colors */ +html[data-theme='light'] { + --pst-color-primary: var(--amd-teal-750); + --pst-color-primary-bg: var(--amd-teal-500); + --pst-color-table-row-hover-bg: #E2E8F0; +} + +html[data-theme='dark'] { + --pst-color-primary: var(--amd-teal-500); + --pst-color-primary-bg: var(--amd-teal-750); + --pst-color-table-row-hover-bg: #1E293B; +} + +html[data-theme='light'], +html[data-theme='dark'] { + --pst-color-link: var(--pst-color-primary); +} + +a svg { + color: var(--pst-color-text-base); +} + +a svg:hover { + color: var(--pst-color-link-hover); +}