Skip to content

Commit 658578c

Browse files
committed
omnifood hero section
- responsive text
1 parent acda49d commit 658578c

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/*
2+
-- 01 TYPOGRAPHY
3+
4+
- FONT SIZE SYSTEM (px)
5+
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
6+
7+
- Font Weight:
8+
Default: 400
9+
10+
- Line Heights:
11+
Defaults: 1
12+
13+
14+
-- 02 COLORS
15+
16+
- Primary: #e67e22
17+
18+
- Tints:
19+
#fdf2e9
20+
- Shades:
21+
- Accents:
22+
- Greys:
23+
#555
24+
#333
25+
26+
-- 05 SHADOWS
27+
28+
-- 06 BORDER RADIUS
29+
30+
-- 07 WHITESPACE
31+
32+
- SPACING SYSTEM (px)
33+
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
34+
*/
35+
36+
*,
37+
*::before,
38+
*::after {
39+
margin: 0;
40+
padding: 0;
41+
box-sizing: border-box;
42+
}
43+
44+
html {
45+
font-size: 62.5%;
46+
}
47+
48+
body {
49+
font-family: sans-serif;
50+
line-height: 1;
51+
font-weight: 400;
52+
color: #555;
53+
}
54+
55+
.section-hero {
56+
background-color: #fdf2e9;
57+
padding: 9.6rem 0;
58+
}
59+
60+
.hero {
61+
max-width: 130rem;
62+
margin: 0 auto;
63+
display: grid;
64+
grid-template-columns: 1fr 1fr;
65+
gap: 9.6rem;
66+
align-items: center;
67+
}
68+
69+
.heading-primary {
70+
font-size: 5.2rem;
71+
line-height: 1.05;
72+
color: #333;
73+
font-weight: 700;
74+
letter-spacing: -0.5px;
75+
margin-bottom: 3.2rem;
76+
}
77+
78+
.hero-description {
79+
font-size: 2rem;
80+
line-height: 1.6;
81+
margin-bottom: 4.8rem;
82+
}
83+
84+
.btn:link,
85+
.btn:visited {
86+
display: inline-block;
87+
88+
color: #fff;
89+
text-decoration: none;
90+
font-size: 2rem;
91+
padding: 1.6rem 3.2rem;
92+
border-radius: 9px;
93+
94+
transition: background-color 0.3s;
95+
}
96+
97+
.btn--full:link,
98+
.btn--full:visited {
99+
background-color: #e67e22;
100+
color: #fff;
101+
}
102+
103+
.btn--full:hover,
104+
.btn--full:active {
105+
background-color: #cf711f;
106+
}
107+
108+
.btn--outline:link,
109+
.btn--outline:visited {
110+
background-color: #fff;
111+
color: #555;
112+
}
113+
114+
.btn--outline:hover,
115+
.btn--outline:active {
116+
background-color: #fdf2e9;
117+
/*border: 3px solid #fff;*/
118+
119+
/* Trick to add border inside */
120+
box-shadow: inset 0 0 0 3px #fff;
121+
}
122+
123+
124+
.hero-img {
125+
width: 100%;
126+
}
127+
128+
.margin-right-sm {
129+
margin-right: 1.6rem !important;
130+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
6+
name="viewport">
7+
<meta content="ie=edge" http-equiv="X-UA-Compatible">
8+
<title>Omnifood</title>
9+
<link href="css/style.css" rel="stylesheet">
10+
</head>
11+
<body>
12+
<section class="section-hero">
13+
<div class="hero">
14+
<div class="hero-text-box">
15+
<h1 class="heading-primary">A healthy meal delivered to your door, every single day</h1>
16+
<p class="hero-description">
17+
The smart 365-days-per-year food subscription that will make you eat healthy again. Tailored to your personal
18+
tastes and nutritional needs. We have delivered 250,000+ meals last year!
19+
</p>
20+
<a class="btn btn--full margin-right-sm" href="#">Start Eating Well</a>
21+
<a class="btn btn--outline" href="#">Learn More &darr;</a>
22+
</div>
23+
<div class="hero-img-box">
24+
<img alt="Woman enjoying food, meask in storage container, and food bowls on a table" src="img/hero.png" class="hero-img">
25+
</div>
26+
</div>
27+
</section>
28+
</body>
29+
</html>

0 commit comments

Comments
 (0)