Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode logo #479

Merged
merged 29 commits into from
May 16, 2024
Merged

Dark mode logo #479

merged 29 commits into from
May 16, 2024

Conversation

segsell
Copy link
Member

@segsell segsell commented Feb 27, 2024

Add dark mode logo to the navigation bar and on the main index page.

  • switch to furo theme
  • navigation bar
  • index page
  • Remove white boxes around logos on grid card items

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (5574283) to head (8535245).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
+ Coverage   92.98%   93.00%   +0.01%     
==========================================
  Files         194      194              
  Lines       14659    14659              
==========================================
+ Hits        13631    13633       +2     
+ Misses       1028     1026       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@segsell segsell requested a review from janosg May 15, 2024 12:07
Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think the current dashboard is not pretty enough to be included on the front page of the documentation and the readme. Can you remove the gif in both places? We'll work on something better soon.
  • The toctree on this page is too deep. I think we only want to show one level, i.e. "likelihood estimation" and "method of simulated moments (MSM) estimation"
  • When dark-mode is active, the plots in notebooks are still shown in a light theme. QuantEcon has found a way to switch to a dark theme. Click on the change contrast symbol here to try it out. Do you think it would be super hard to add this?

docs/rtd_environment.yml Outdated Show resolved Hide resolved
@janosg
Copy link
Member

janosg commented May 15, 2024

The link to the logo in the navigation bar is not being found. Using the pandas dark mode logo and our standard estimagic logo as dummies worked. Maybe, once we merge this PR into main, the location of our dark mode logo will be available, too. Note that the logo settings for the navigation bar are specified in conf.py. Maybe this makes it different to the main index page, which is set up in index.md. There, the same image reference is actually found.

Is this still the case? I did not see any problems.

@segsell
Copy link
Member Author

segsell commented May 16, 2024

The link to the logo in the navigation bar is not being found. Using the pandas dark mode logo and our standard estimagic logo as dummies worked. Maybe, once we merge this PR into main, the location of our dark mode logo will be available, too. Note that the logo settings for the navigation bar are specified in conf.py. Maybe this makes it different to the main index page, which is set up in index.md. There, the same image reference is actually found.

Is this still the case? I did not see any problems.

That's outdated and has been fixed. Thanks!

@segsell
Copy link
Member Author

segsell commented May 16, 2024

* When dark-mode is active, the plots in notebooks are still shown in a light theme. QuantEcon has found a way to switch to a dark theme. Click on the change contrast symbol [here](https://python-programming.quantecon.org/matplotlib.html) to try it out. Do you think it would be super hard to add this?

Unfortunately, that's not straightforward. It seems like QuantEcon have developed their own docs template. I haven't seen any sphinx theme like furo or pydata that have this feature. A second difference is that they use a .md file instead of a .ipynb jupyter notebook.

In a static fashion, changing the matplotlib theme in a jupyter notebook is straightforward:

import matplotlib.pyplot as plt  
plt.style.use('dark_background')

However, automatically switching between the light and dark theme is tricky. Locally, the workaround is modifying some .ipython file. At the moment, I don't have an idea how this can be achieved for the sphinx documentation.

@segsell segsell requested a review from janosg May 16, 2024 12:12
Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@janosg janosg merged commit 1183231 into main May 16, 2024
17 checks passed
@janosg janosg deleted the dark_mode_logo branch May 16, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants