Skip to content

Commit

Permalink
177 change subtitle (#179)
Browse files Browse the repository at this point in the history
* Create header data file

* Update styled components naming to match data file

* Add data file
  • Loading branch information
camilovegag authored Feb 13, 2024
1 parent 5c82fc3 commit 22fd94a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/berlin/src/components/header/Header.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const LogoTextContainer = styled.div`
gap: 0.5rem;
`;

export const LogoText = styled.h1`
export const LogoTitle = styled.h1`
display: none;
@media (min-width: 640px) {
Expand All @@ -53,7 +53,7 @@ export const LogoText = styled.h1`
}
`;

export const LogoSubtext = styled.h2`
export const LogoSubtitle = styled.h2`
display: none;
@media (min-width: 640px) {
Expand Down
18 changes: 8 additions & 10 deletions packages/berlin/src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { useNavigate } from 'react-router-dom';
// Store
import { useAppStore } from '../../store';

// Data
import header from '../../data/header';

// API
import { logout } from 'api';

Expand All @@ -25,8 +28,8 @@ import {
HeaderContainer,
LogoContainer,
LogoImage,
LogoSubtext,
LogoText,
LogoSubtitle,
LogoTitle,
MenuButton,
MobileButtons,
NavButtons,
Expand Down Expand Up @@ -58,15 +61,10 @@ function Header() {
<SyledHeader>
<HeaderContainer>
<LogoContainer onClick={() => navigate('/')}>
<LogoImage
src="/logos/logo.png"
alt="Plural Research Experiment logo, a prism with an incoming light beam and a rainbow"
height={96}
width={96}
/>
<LogoImage src={header.logo.src} alt={header.logo.alt} height={96} width={96} />
<LogoTextContainer>
<LogoText>Plural Research Experiment</LogoText>
<LogoSubtext>An experiment in research independence and innovation</LogoSubtext>
<LogoTitle>{header.title}</LogoTitle>
<LogoSubtitle>{header.subtitle}</LogoSubtitle>
</LogoTextContainer>
</LogoContainer>
<NavContainer>
Expand Down
10 changes: 10 additions & 0 deletions packages/berlin/src/data/header.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const header = {
logo: {
src: '/logos/logo.png',
alt: 'Plural Research Experiment logo, a prism with an incoming light beam and a rainbow',
},
title: 'Plural Research Experiment',
subtitle: 'An experiment in collective intelligence and innovation',
};

export default header;

0 comments on commit 22fd94a

Please sign in to comment.