Can we use two different images for light and dark theme in sidebar? #1768
-
There is dark and light theme switcher available for docsify. Is there a way to use 2 images for sidebar one light theme and other for dark theme? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
Just in case someone finds this (already answered) thread again, if you use window.$docsify = {
darklightTheme: {
dark: {
docsify_logo_url: "url(/_media/logo_dark.svg)"
},
light: {
docsify_logo_url: "url(/_media/logo.svg)"
},
},
}; <style>
.cover-main img {
content: var(--docsify_logo_url);
}
</style> Notably you don't need to use media selectors ( |
Beta Was this translation helpful? Give feedback.
Sidebar images? Are you referring to the logo?
Dark mode will show a pink logo.
Add it to index.html:
docsify-darklight-theme
If you are using
docsify-darklight-theme
, it needs…