How do I change "include-in-header" with light/dark mode? #6110
Unanswered
jack-davison
asked this question in
Q&A
Replies: 2 comments 10 replies
-
One way is by setting the names of two figures using some defined pattern and to use JavaScript as I describe in https://mickael.canouil.fr/posts/2023-05-30-quarto-light-dark/. |
Beta Was this translation helpful? Give feedback.
10 replies
-
Just as an alternative, you might consider using SVG for your logo, which could then inherit colors from the parent document via CSS |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
We use quarto for a lot of our dynamic reporting, and I'm keen to create a dark mode to compliment our light theme.
Part of our template uses
include-in-header
to draw our logo and a simple band across the top of the document. The HTML looks like this:This creates a document the header of which looks like this:
On activating dark mode, I'd like to be able to change the logo to a different version (we have a completely white one) and the band to be white.
However, I can't seem to work out how best to do this!
I'd be open to an alternative that achieves the same look without using
include-in-header
if that simply cannot respond to the light-dark toggle.(Separately, do we have any control over the placement of the toggle switch, or is it forced to be in the top-right?)
Thanks very much.
Beta Was this translation helpful? Give feedback.
All reactions