is it possible to adjust Python code based on the site theme? #6504
Unanswered
lostmygithubaccount
asked this question in
Q&A
Replies: 1 comment 2 replies
-
If you define the theme for the graphic library you are using, a simple JavaScript script can do the job, see an example with R/knitr: https://mickael.canouil.fr/posts/2023-05-30-quarto-light-dark/. |
Beta Was this translation helpful? Give feedback.
2 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.
-
Description
We want to have a light and dark theme for the Ibis website. It's nice to show visualizations with the tool, so we want to have them -- and ideally have the plotting library use a light/dark theme corresponding to the theme set for the website.
example here (see plot after scrolling down): https://ibisdocs.z5.web.core.windows.net/
relevant source code:
if this is possible already, that'd be great to know! if not, would this be a valid feature request? some way to get a variable in Python snippets so that
template
in the above example or similar for other visualization libraries can be set appropriatelyfull source code: https://github.com/lostmygithubaccount/ibis/tree/quarto-docs
Beta Was this translation helpful? Give feedback.
All reactions