Skip to content

Commit

Permalink
chore: remove empty wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
thekidnamedkd committed Oct 28, 2024
1 parent f2a1e5d commit 3d95f51
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/containers/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {GridLayout} from 'components/layout';

function Hero() {
const {t} = useTranslation();

return (
<Container>
<StyledImage src={Blueprint} alt="Background Texture" />
Expand All @@ -15,18 +16,12 @@ function Hero() {
<Title>{t('explore.hero.title')}</Title>
<Subtitle>{t('explore.hero.subtitle1')}</Subtitle>
</ContentWrapper>
<ImageWrapper></ImageWrapper>
</Wrapper>
</GridLayout>
</Container>
);
}

// NOTE: "h-[448px] -mt-20 pt-20" is the "simplest" way to achieve a sticky header
// with a gradient AND a primary 400 background. What it does it is extends the
// hero by a height of 12, moves it up using the negative margin and compensates
// by lowering the content using the padding-top. Same with factor 12 on
// desktop.
const Container = styled.div.attrs({
className:
'relative bg-primary-400 -mt-20 pt-20 xl:pt-24 xl:-mt-24 overflow-hidden',
Expand All @@ -52,10 +47,6 @@ const Subtitle = styled.h3.attrs({
'text-neutral-0 ft-text-lg font-normal leading-[24px] xl:leading-[30px]',
})``;

const ImageWrapper = styled.div.attrs({
className: 'h-full',
})``;

const StyledImage = styled.img.attrs({
className: 'absolute top-0 left-0 w-full h-full object-cover',
})``;
Expand Down

0 comments on commit 3d95f51

Please sign in to comment.