Skip to content

Commit

Permalink
feat: use 2 pontus-x logo variants for different screen sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzkirstein committed Feb 22, 2024
1 parent 44de76f commit 807ca1b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/components/@shared/atoms/Logo/index.module.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
.logo {
display: none;
}
.logoSmall {
display: block;
width: var(--menu-logo-size-width-sm);
height: var(--menu-logo-size-height-sm);
margin: 0;
}

.logo path {
fill: var(--menu-logo-color);
}

a > .logo:hover path {
fill: var(--menu-logo-color-hover);
}

@media screen and (min-width: 55rem) {
.logo {
display: block;
width: var(--menu-logo-size-width-lg);
height: var(--menu-logo-size-height-lg);
}
.logoSmall {
display: none;
}
}
10 changes: 8 additions & 2 deletions src/components/@shared/atoms/Logo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { ReactElement } from 'react'
import LogoAsset from '@images/gaia-x-logo.svg'
import LogoAsset from '@images/pontusx_logo_horizontal.svg'
import LogoAssetSmall from '@images/pontusx_logo.svg'
import styles from './index.module.css'

export default function Logo(): ReactElement {
return <LogoAsset className={styles.logo} />
return (
<div className={styles.logoWrapper}>
<LogoAsset className={styles.logo} />
<LogoAssetSmall className={styles.logoSmall} />
</div>
)
}
4 changes: 2 additions & 2 deletions src/stylesGlobal/_variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
/* Menubar */
--menu-logo-color: var(--brand-gaia-x-blue);
--menu-logo-color-hover: var(--brand-gaia-x-blue);
--menu-logo-size-width-sm: 7.5rem;
--menu-logo-size-width-sm: 3.5rem;
--menu-logo-size-height-sm: 3.5rem;
--menu-logo-size-width-lg: 7.5rem;
--menu-logo-size-width-lg: 15rem;
--menu-logo-size-height-lg: 3.5rem;
--menu-font-color: var(--color-primary);
--menu-font-color-active: var(--font-color-heading);
Expand Down

0 comments on commit 807ca1b

Please sign in to comment.