Skip to content

Commit a1e4169

Browse files
committed
05
1 parent 2a1d874 commit a1e4169

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

starter/06-Components/05-hero.html

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Omifood Hero Section</title>
8+
<link rel="preconnect" href="https://fonts.googleapis.com" />
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10+
<link
11+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Rubik:wght@400;500;700&display=swap"
12+
rel="stylesheet"
13+
/>
14+
<style>
15+
* {
16+
margin: 0;
17+
padding: 0;
18+
box-sizing: border-box;
19+
}
20+
html {
21+
font-family: 'Rubik', sans-serif;
22+
color: #444;
23+
word-break: break-word;
24+
}
25+
26+
nav {
27+
font-size: 20px;
28+
font-weight: 700;
29+
display: flex;
30+
justify-content: space-between;
31+
position: absolute;
32+
top: 32px;
33+
}
34+
35+
h1 {
36+
font-size: 52px;
37+
margin-bottom: 32px;
38+
line-height: 1.05;
39+
}
40+
41+
p {
42+
font-size: 20px;
43+
margin-bottom: 48px;
44+
line-height: 1.6;
45+
}
46+
47+
header {
48+
background-image: linear-gradient(
49+
rgba(34, 34, 34, 0.6),
50+
rgba(34, 34, 34, 0.6)
51+
),
52+
url(./hero.jpg);
53+
background-size: cover;
54+
background-repeat: no-repeat;
55+
height: 100vh;
56+
color: #fff;
57+
display: flex;
58+
flex-direction: column;
59+
justify-content: center;
60+
align-items: center;
61+
}
62+
63+
.container {
64+
width: 100%;
65+
max-width: 1200px;
66+
}
67+
68+
.innerContainer {
69+
width: 50%;
70+
text-align: left;
71+
}
72+
73+
.btn {
74+
background-color: #d88231;
75+
border-radius: 12px;
76+
color: inherit;
77+
padding: 16px 32px;
78+
font-size: 20px;
79+
font-weight: 700;
80+
text-decoration: none;
81+
}
82+
83+
.btn:hover {
84+
background-color: #e0730d;
85+
}
86+
87+
section {
88+
padding: 96px 0;
89+
}
90+
91+
h2 {
92+
font-size: 40px;
93+
margin-bottom: 48px;
94+
}
95+
96+
.center {
97+
margin: 0 auto;
98+
}
99+
</style>
100+
</head>
101+
<body>
102+
<header>
103+
<nav class="container">
104+
<div>LOGO</div>
105+
<div>NAVIGATOR</div>
106+
</nav>
107+
<div class="container">
108+
<div class="innerContainer">
109+
<h1>A health meal delivered to your door, every single day</h1>
110+
<p>
111+
The smart 365-days-per-year food subscription that will make you eat
112+
health algain. Tailored to your personal tastes and nutritional
113+
needs
114+
</p>
115+
<a href="#" class="btn">Start eating well</a>
116+
</div>
117+
</div>
118+
</header>
119+
<section class="container center">
120+
<div>
121+
<h2>Some random heading</h2>
122+
<p>
123+
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magnam ipsa
124+
ducimus nihil, nobis harum reprehenderit consequatur, placeat porro
125+
atque asperiores neque culpa unde quidem error, id suscipit sit.
126+
Ipsam, libero.
127+
</p>
128+
</div>
129+
</section>
130+
</body>
131+
</html>

0 commit comments

Comments
 (0)