Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i set the logo_image svg header to be on the theme? #365

Open
rodrigoantas opened this issue Aug 29, 2024 · 1 comment
Open

How can i set the logo_image svg header to be on the theme? #365

rodrigoantas opened this issue Aug 29, 2024 · 1 comment
Labels
awaiting reply Waiting for a response from the author to proceed

Comments

@rodrigoantas
Copy link

at the Header.astro we have the { LOGO_IMAGE.enable ? ( <img src={`/assets/${LOGO_IMAGE.svg ? "logo.svg" : "logo.png"}`} alt={SITE.title} width={LOGO_IMAGE.width} height={LOGO_IMAGE.height} class="header-icon" /> ) : ( SITE.title ) }

this img is referencing a svg. how can i set the color of the svg to be on the theme?

@satnaing
Copy link
Owner

satnaing commented Sep 9, 2024

I don't think there's any build-in way to update svg inside <img /> tag.
So, what you can do is replace <img /> tag with your svg logo.

From this

<a href="/" class="logo whitespace-nowrap">
   {
    LOGO_IMAGE.enable ? (
      <img
        src={`/assets/${LOGO_IMAGE.svg ? "logo.svg" : "logo.png"}`}
        alt={SITE.title}
        width={LOGO_IMAGE.width}
        height={LOGO_IMAGE.height}
      />
    ) : (
      SITE.title
    )
  } 
</a>

To this

<a href="/" class="logo whitespace-nowrap">
  <svg 
    class="fill-skin-base" 
    // others
  />
</a>

@satnaing satnaing added the awaiting reply Waiting for a response from the author to proceed label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Waiting for a response from the author to proceed
Projects
None yet
Development

No branches or pull requests

2 participants