Skip to content

Commit

Permalink
Replace logo from sanity with local svg (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
anemne authored Nov 19, 2024
1 parent 8cf7315 commit eed8b5f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"i18n-ally.localesPaths": ["i18n", "messages", "src/i18n"]
}
9 changes: 9 additions & 0 deletions public/_assets/variant-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/link/link.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
height: 24px;
display: inline-block;
-webkit-mask-size: cover;
background-color: var(--primary-black);
background-color: var(--primary-white);
-webkit-mask: url("/_assets/arrow.svg") no-repeat 50% 50%;
}
}
Expand Down
10 changes: 1 addition & 9 deletions src/components/navigation/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useEffect, useState } from "react";
import { FocusOn } from "react-focus-on";

import { defaultLanguage } from "i18n/supportedLanguages";
import { SanityImage } from "src/components/image/SanityImage";
import LanguageSwitcher from "src/components/languageSwitcher/LanguageSwitcher";
import CustomLink from "src/components/link/CustomLink";
import LinkButton from "src/components/linkButton/LinkButton";
Expand Down Expand Up @@ -37,7 +36,6 @@ const filterLinks = (data: ILink[], type: string) =>

export const Header = ({
navigation,
assets,
announcement,
currentLanguage,
pathTitles,
Expand Down Expand Up @@ -92,13 +90,7 @@ export const Header = ({
<header>
<nav aria-label="Main menu">
<div className={styles.wrapper}>
{assets?.primaryLogo && (
<div className={styles.logo}>
<Link href="/" aria-label="Home">
<SanityImage image={assets.primaryLogo} />
</Link>
</div>
)}
<Link href="/" aria-label="Home" className={styles.logo} />
{renderPageLinks(links, false, pathname)}
{renderPageCTAs(ctas, false)}
<div className={styles.languageSwitcher}>
Expand Down
19 changes: 7 additions & 12 deletions src/components/navigation/header/header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@
padding: 0rem 1.5rem;
}

.logo {
overflow: hidden;
width: auto;
display: flex;
max-width: 100%;
height: 1.25rem;

@media (min-width: 1200px) {
flex: 1;
}
}

.list {
list-style-type: none;
margin: 0;
Expand Down Expand Up @@ -169,3 +157,10 @@
font-weight: 600;
color: var(--primary-white);
}

.logo {
width: 130px;
height: 37px;
background-color: var(--primary-white);
-webkit-mask: url("/_assets/variant-logo.svg") no-repeat 50% 50%;
}

0 comments on commit eed8b5f

Please sign in to comment.