Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan committed Jul 3, 2024
1 parent 3cbc58d commit 986c24d
Show file tree
Hide file tree
Showing 8 changed files with 797 additions and 684 deletions.
2 changes: 2 additions & 0 deletions src/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

.Header__title {
font-size: 1em;
display: flex;
align-items: center;
}

.Header__title-main {
Expand Down
39 changes: 27 additions & 12 deletions src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ function NavItem(props: { href: string; title: string }): JSX.Element {
)
}

function LogoLink(props: {
href: string
className: string
src: string
}): JSX.Element {
return (
<Navbar.Brand>
<ExternalLink href={props.href}>
<Image className={props.className} src={props.src} fluid />
</ExternalLink>
</Navbar.Brand>
)
}
export default function Header(): JSX.Element {
const [activeKey, setActiveKey] = useState<string>()
const id = _.uniqueId('Header-')
Expand All @@ -50,18 +63,20 @@ export default function Header(): JSX.Element {
<EblLogo />
</Navbar.Brand>
</LinkContainer>
<div className="Header__logo-container">
<Navbar.Brand>
<ExternalLink href="https://www.lmu.de">
<Image className="Header__lmu-logo" src={lmuLogo} fluid />
</ExternalLink>
</Navbar.Brand>
<Navbar.Brand>
<ExternalLink href="https://badw.de/">
<Image className="Header__badw-logo" src={badwLogo} fluid />
</ExternalLink>
</Navbar.Brand>
</div>
<Navbar.Brand>
<Container className="Header__logo-container">
<LogoLink
href="https://www.lmu.de"
className="Header__lmu-logo"
src={lmuLogo}
/>
<LogoLink
href="https://badw.de/"
className="Header__badw-logo"
src={badwLogo}
/>
</Container>
</Navbar.Brand>
<Navbar.Toggle aria-controls={id} />
<Navbar.Collapse id={id}>
<div
Expand Down
Loading

0 comments on commit 986c24d

Please sign in to comment.