Skip to content

Commit

Permalink
Update/docs darkmode (#53)
Browse files Browse the repository at this point in the history
* rename logo and add logo for darkmode

* add second logo to copy instructions

* unlink logo

* update requirements and build

* update css
  • Loading branch information
cqc-melf authored Apr 4, 2023
1 parent 60fa5d7 commit da7ae1d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
File renamed without changes
Binary file added .github/workflows/docs/Quantinuum_logo_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions .github/workflows/docs/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def build_module_docs():
mod_docs = MODULES_DIR / "docs"
mod_build = mod_docs / "build"
conf_copy = mod_docs / "conf.py"
logo_copy = mod_docs / "Quantinuum_logo.png"
logo_copy_black = mod_docs / "Quantinuum_logo_black.png"
logo_copy_white = mod_docs / "Quantinuum_logo_white.png"
shutil.copy(DOCS_DIR / "conf.py", conf_copy)
shutil.copy(DOCS_DIR / "Quantinuum_logo.png", logo_copy)
shutil.copy(DOCS_DIR / "Quantinuum_logo_black.png", logo_copy_black)
shutil.copy(DOCS_DIR / "Quantinuum_logo_white.png", logo_copy_white)
remove_dir(mod_build)
index_rst = mod_docs / "index.rst"
with open(mod_docs / "intro.txt", "r") as f:
Expand Down Expand Up @@ -83,7 +85,8 @@ def build_module_docs():
fix_links(htmlfile)
fix_links(mod_build / "searchindex.js")
conf_copy.unlink()
logo_copy.unlink()
logo_copy_black.unlink()
logo_copy_white.unlink()
index_rst.unlink()


Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
"repository_url": "https://github.com/CQCL/pytket-iqm",
"use_repository_button": True,
"use_issues_button": True,
"logo": {
"image_light": "Quantinuum_logo_black.png",
"image_dark": "Quantinuum_logo_white.png",
},
}

html_static_path = ["_static"]

html_css_files = ["custom.css"]

html_logo = "Quantinuum_logo.png"

# -- Extension configuration -------------------------------------------------

pytketdoc_base = "https://cqcl.github.io/tket/pytket/api/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx ~= 4.3.2
sphinx_book_theme
sphinx_book_theme >= 1.0.1, <2.0
sphinx-copybutton
13 changes: 2 additions & 11 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
background-color: #d9d9d9;
}

.caption-text {
color: #000000;
}

.btn-link:visited,
.btn-link,
a:visited,
Expand All @@ -30,13 +26,8 @@ a:visited,
.wy-menu-vertical ul,
.span.pre,
.sig-param,
.std.std-ref,
a {
color: #544d4d;
}

:root {
--pst-color-inline-code: 199, 37, 78 !important;
html[data-theme=light] {
--pst-color-inline-code: rgb(199, 37, 78) !important;
}

.sig-name {
Expand Down

0 comments on commit da7ae1d

Please sign in to comment.