Logo instead of Text in Header? #127
Unanswered
LamerManuel
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hi @LamerManuel Test this. Go to this file https://github.com/onwidget/astrowind/blob/main/src/components/Logo.astro and add this: ---
import lightLogo from "~/assets/images/logo-light.svg";
import darkLogo from "~/assets/images/logo-dark.svg";
---
<div class="self-center ml-2 text-2xl md:text-xl font-bold text-gray-900 whitespace-nowrap dark:text-white">
<img class="block dark:hidden" src={lightLogo} alt="Your Logo" />
<img class="hidden dark:block" src={darkLogo} alt="Your Logo" />
</div> |
Beta Was this translation helpful? Give feedback.
2 replies
-
`---
`
import darkLogo from ' |
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.
-
How can I use a logo instead of text in the header that changes when switching from light to dark? Although it currently displays an image that changes, once I delete the text, the logos also disappear.
<img class="block dark:hidden" src="/src/assets/images/logo-dark.svg" />
<img class="hidden dark:block" src="/src/assets/images/logo-light.svg" />
Beta Was this translation helpful? Give feedback.
All reactions