Skip to content

Commit

Permalink
Fix issues with day & night modes in python docs (NVIDIA#11400)
Browse files Browse the repository at this point in the history
Fixes: rapidsai/docs#284

This PR fixes day(light) & night(dark) mode color schemes which makes text and a lot of html elements look unclear.

In dark mode:
Before:
 
<img width="1489" alt="Screen Shot 2022-07-28 at 10 01 38 PM" src="https://user-images.githubusercontent.com/11664259/181674172-48e9dd8f-9fb9-447c-a63b-4a6f359b2c4f.png">

After:
<img width="1569" alt="Screen Shot 2022-07-29 at 3 31 54 PM" src="https://user-images.githubusercontent.com/11664259/181838929-f27d664a-eb4c-4a72-8ad9-cf54246b3098.png">


In light mode:
Before:

<img width="1545" alt="Screen Shot 2022-07-28 at 10 03 36 PM" src="https://user-images.githubusercontent.com/11664259/181674247-2307b7a4-0dd5-410a-9cb2-ca18d641d89d.png">

After:
<img width="1506" alt="Screen Shot 2022-07-29 at 3 31 07 PM" src="https://user-images.githubusercontent.com/11664259/181838856-fd0abb85-cc56-4392-8cef-182bb790fff4.png">



Introduced darker color schemes such that code text highlightings are visible properly in dark mode:

Before:
<img width="741" alt="Screen Shot 2022-07-28 at 10 06 08 PM" src="https://user-images.githubusercontent.com/11664259/181674530-aa78290f-b011-437e-a955-4e85bbbee5e9.png">

After:
<img width="704" alt="Screen Shot 2022-07-28 at 10 06 15 PM" src="https://user-images.githubusercontent.com/11664259/181674545-3d0ba553-8b35-49b1-972a-a5fb1e33b0b9.png">


Introduced custom javascript method that will add hover text to "**Theme switcher**"  button:

<img width="552" alt="Screen Shot 2022-07-28 at 9 59 40 PM" src="https://user-images.githubusercontent.com/11664259/181674649-091c4b27-aa4b-4752-a8c8-45b7e71e3417.png">
<img width="622" alt="Screen Shot 2022-07-28 at 9 59 28 PM" src="https://user-images.githubusercontent.com/11664259/181674651-88bf5388-bf81-4633-9360-88ca5df88b85.png">

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - David Wendt (https://github.com/davidwendt)

URL: rapidsai/cudf#11400
  • Loading branch information
galipremsagar authored Aug 1, 2022
1 parent 024642a commit 6e0e47e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 188 deletions.
4 changes: 2 additions & 2 deletions cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_FOOTER =
HTML_FOOTER = footer.html

# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
Expand All @@ -1181,7 +1181,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = rapids.css
HTML_EXTRA_STYLESHEET =

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
4 changes: 4 additions & 0 deletions cpp/doxygen/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Copyright (c) 2022, NVIDIA CORPORATION. -->

<script src="https://docs.rapids.ai/assets/js/custom.js"></script>
<link rel="stylesheet" href="https://docs.rapids.ai/assets/css/custom.css">
119 changes: 0 additions & 119 deletions cpp/doxygen/rapids.css

This file was deleted.

66 changes: 0 additions & 66 deletions docs/cudf/source/_static/params.css

This file was deleted.

3 changes: 2 additions & 1 deletion docs/cudf/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def process_class_docstrings(app, what, name, obj, options, lines):
nitpick_ignore = [("py:class", "SeriesOrIndex"),]

def setup(app):
app.add_css_file("params.css")
app.add_css_file("https://docs.rapids.ai/assets/css/custom.css")
app.add_js_file("https://docs.rapids.ai/assets/js/custom.js")
app.connect("doctree-read", resolve_aliases)
app.connect("missing-reference", ignore_internal_references)
app.connect("autodoc-process-docstring", process_class_docstrings)

0 comments on commit 6e0e47e

Please sign in to comment.