-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHero.tsx
More file actions
86 lines (77 loc) · 1.82 KB
/
Hero.tsx
File metadata and controls
86 lines (77 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import styled from "styled-components";
import {
SmallMobileBreakpoint,
MobileBreakpoint,
MobileTitleXL,
MobileTitleL,
SpacingS,
SpacingM,
SpacingXXL,
TitleXL,
Primary300,
} from "@/app/genericComponents/tokens";
import { hero_data } from "@data/hero_data";
import { PrimaryButton } from "@/app/genericComponents/General";
const Container = styled.div`
position: relative;
margin-top: 5%;
margin-right: 10%;
margin-left: 10%;
padding: ${SpacingXXL};
border-radius: 20px;
border: 0.3333rem solid ${Primary300};
overflow: hidden;
@media (max-width: ${MobileBreakpoint}) {
padding: ${SpacingS};
}
&::before {
content: "";
position: absolute;
inset: 0;
background-image: url("/IMG_6219.jpeg");
background-position: center 60%;
background-size: cover;
opacity: 0.3;
z-index: 0;
}
> * {
position: relative;
z-index: 1;
}
`;
const Title = styled.h1`
text-align: center;
font-size: ${TitleXL};
background: transparent;
color: #ffffff;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0);
@media (max-width: ${MobileBreakpoint}) {
font-size: ${MobileTitleXL};
}
@media (max-width: ${SmallMobileBreakpoint}) {
font-size: ${MobileTitleL};
}
`;
const ButtonContainer = styled.div`
display: flex;
justify-content: center;
margin-top: ${SpacingM};
`;
export default function Hero() {
return (
<Container>
<Title>{hero_data.title}</Title>
<ButtonContainer>
{hero_data.applicationsOpen ? (
<PrimaryButton href={hero_data.applicationsLink} target={"_blank"}>
{hero_data.applicationsOpenTextButton}
</PrimaryButton>
) : (
<PrimaryButton disabled>
{hero_data.applicationsClosedTextButton}
</PrimaryButton>
)}
</ButtonContainer>
</Container>
);
}