QuantEcon / quantecon-book-theme

A Jupyter Book Theme for QuantEcon Book Style Projects
BSD 3-Clause "New" or "Revised" License
40 stars 20 forks source link

ENH: Adding logo image for dark mode #231

Closed AakashGfude closed 10 months ago

AakashGfude commented 10 months ago

This PR adds the ability to specify a dark-mode version of your logo. To use a separate logo image for dark mode, simply set it in configuration using the following setting:

html_theme_options:
    dark_logo: logo-image-dark-mode

The image is expected to be in the _static folder of your source repository

mmcky commented 10 months ago

thanks @AakashGfude it looks like this will need some config updates. When you're ready if you could add instructions to the top level description block (and add that the future release notes) that would be amazing. Thanks.

codecov[bot] commented 10 months ago

Codecov Report

Merging #231 (812eec1) into master (e65778b) will decrease coverage by 0.11%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
- Coverage   73.18%   73.07%   -0.11%     
==========================================
  Files           2        2              
  Lines         261      260       -1     
==========================================
- Hits          191      190       -1     
  Misses         70       70              
Flag Coverage Δ
pytests 73.07% <ø> (-0.11%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

mmcky commented 10 months ago

@AakashGfude is there any way to adjust the background in the image specified to match the website colour?

Screenshot 2023-10-30 at 2 29 00 pm

maybe the answer is to make a transparent background (cc: @DrDrij)

AakashGfude commented 10 months ago

@mmcky You are right; a transparent background would be good. I can do it with photoshop tomorrow?

DrDrij commented 10 months ago

@AakashGfude Good idea. I've cut out the dark background for transparency. If you send through feedback I'm happy to make another version.

qe-logo-dark-transparent

AakashGfude commented 10 months ago

Thanks @DrDrij , the image is working wonderfully now. @mmcky the netlify preview in this PR should have the updated image.

Screen Shot 2023-10-31 at 4 28 35 pm
mmcky commented 10 months ago

This is great - thanks @AakashGfude and @DrDrij