Skip to content

Commit 040594a

Browse files
committed
Adjust Header height to Box component content
1 parent 5385fb7 commit 040594a

File tree

3 files changed

+20
-41
lines changed

3 files changed

+20
-41
lines changed

src/components/HeaderBarebone/index.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,25 @@ interface IHeaderBareboneProps {
1414
export const HeaderBarebone: React.FC<IHeaderBareboneProps> = (props) => {
1515
return (
1616
<SC.HeaderWrapper className={props.className}>
17+
<SC.Box>
18+
{props.above}
19+
20+
<SC.Title
21+
className={cx({
22+
"has-content-above": props.above,
23+
"has-content-below": props.content,
24+
})}
25+
>
26+
{props.title}
27+
</SC.Title>
28+
29+
{props.content}
30+
</SC.Box>
1731
<SC.BackgroundWrapper>
1832
<SC.StyledWavesBottom />
1933
<SC.StyledWavesTop />
2034
<SC.StyledCircles />
2135
</SC.BackgroundWrapper>
22-
23-
<Container>
24-
<SC.Box>
25-
{props.above}
26-
27-
<SC.Title
28-
className={cx({
29-
"has-content-above": props.above,
30-
"has-content-below": props.content,
31-
})}
32-
>
33-
{props.title}
34-
</SC.Title>
35-
36-
{props.content}
37-
</SC.Box>
38-
</Container>
3936
</SC.HeaderWrapper>
4037
)
4138
}

src/components/HeaderBarebone/styles.tsx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@ import { fontFamily } from "../../design/typography"
44
import { WavesTop, WavesBottom } from "../Waves"
55
import Circles from "../../images/circles"
66

7-
const height = 250
8-
97
export const HeaderWrapper = styled.div`
108
width: 100%;
11-
height: ${height}px;
12-
padding-top: 67px;
139
position: relative;
14-
15-
&.shifted {
16-
width: calc(100% - 305px);
17-
padding-right: 305px;
18-
}
10+
display: flex;
11+
justify-content: center;
1912
2013
@media screen and (max-width: 1200px) {
2114
width: 100% !important;
@@ -26,13 +19,11 @@ export const HeaderWrapper = styled.div`
2619
display: flex;
2720
align-items: flex-end;
2821
height: auto;
29-
min-height: ${height}px;
22+
padding-top: 67px;
3023
}
3124
`
3225

3326
export const BackgroundWrapper = styled.div`
34-
height: ${height}px;
35-
padding-top: 67px;
3627
overflow: hidden;
3728
position: absolute;
3829
top: 0;
@@ -41,7 +32,6 @@ export const BackgroundWrapper = styled.div`
4132
bottom: 0;
4233
4334
@media screen and (max-width: 767px) {
44-
height: calc(100% - 67px);
4535
background: ${(props) => darken(0.2, props.theme.main.background)};
4636
}
4737
`
@@ -81,26 +71,22 @@ export const StyledWavesBottom = styled(WavesBottom)`
8171
export const Box = styled.div`
8272
display: inline-flex;
8373
flex-direction: column;
84-
position: absolute;
85-
bottom: 40px;
86-
margin-left: -16px;
74+
position: relative;
8775
background: ${(props) => transparentize(0.3, props.theme.main.background)};
8876
padding: 16px;
77+
margin: 16px;
8978
backdrop-filter: blur(14px);
9079
max-width: 650px;
80+
z-index: 1;
9181
9282
@media screen and (max-width: 1200px) {
9383
max-width: 100%;
94-
left: 32px;
95-
right: 32px;
96-
margin-left: 0;
9784
}
9885
9986
@media screen and (max-width: 767px) {
10087
position: static;
10188
bottom: auto;
10289
top: auto;
103-
margin: 32px 0;
10490
10591
@-moz-document url-prefix() {
10692
& {

src/layouts/ColumnLayout/styles.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ export const MainContent = styled.main`
4242
width: 100%;
4343
}
4444
45-
& > :first-child {
46-
margin-top: 0;
47-
}
48-
4945
& > :last-child {
5046
margin-bottom: 0;
5147
}

0 commit comments

Comments
 (0)