Skip to content

Commit 546c595

Browse files
author
ChowSengFung
committed
omnifood project
1 parent d2cd8b6 commit 546c595

39 files changed

+328
-0
lines changed

starter/07-Omnifood-Desktop/content/content.md renamed to starter/07-Omnifood-Desktop/content.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,17 @@ Careers
126126
Recipe directory
127127
Help center
128128
Privacy & terms
129+
130+
######
131+
132+
## Sections
133+
134+
- Logo + Navigation
135+
- Hero
136+
- Featured in
137+
- How it works
138+
- Meals (and list of diets)
139+
- Testimonials + gallery
140+
- Pricing + features
141+
- CTA
142+
- Footer
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
/*
2+
---O1 TYPOGRAPHY SYSTEM
3+
4+
- Font sizes (px)
5+
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
6+
7+
- Font weights:
8+
Default: 400
9+
Medium: 500
10+
Semi-bold: 600
11+
Bold: 700
12+
13+
- Line heights:
14+
Default: 1
15+
Small: 1.05
16+
Paragraph default: 1.6
17+
18+
19+
20+
21+
--- 02 COLORS
22+
23+
-Primary: #e67e22
24+
-Tints: #fdf2e9
25+
-Shades:#cf711f
26+
-Accents:
27+
-Greys
28+
#555
29+
#333
30+
31+
32+
---05 SHADOWS
33+
34+
---06 BORDER-RADIUS
35+
Default: 9px
36+
37+
---07 WHITESPACE
38+
39+
- Spacing system (px)
40+
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
41+
42+
*/
43+
44+
* {
45+
margin: 0;
46+
padding: 0;
47+
box-sizing: border-box;
48+
}
49+
50+
html {
51+
/* 10px / 16px = 0.625 = 62.5% */
52+
/* Percentage of user's browser font-size setting */
53+
font-size: 62.5%;
54+
}
55+
56+
body {
57+
font-family: "Rubik", sans-serif;
58+
line-height: 1;
59+
font-weight: 400;
60+
color: #555;
61+
}
62+
63+
/*********************************/
64+
/* GENERAL REUSABLE COMPONENTS */
65+
/********************************/
66+
.heading-primary {
67+
font-size: 5.2rem;
68+
font-weight: 700;
69+
line-height: 1.05;
70+
color: #333;
71+
letter-spacing: -0.5px;
72+
margin-bottom: 3.2rem;
73+
}
74+
75+
.btn:link,
76+
.btn:visited {
77+
display: inline-block;
78+
text-decoration: none;
79+
font-size: 2rem;
80+
font-weight: 600;
81+
padding: 1.6rem 3.2rem;
82+
border-radius: 9px;
83+
84+
/* put transition property on original state */
85+
transition: background-color 0.3s;
86+
}
87+
88+
.btn--full:link,
89+
.btn--full:visited {
90+
background-color: #e67e22;
91+
color: #fff;
92+
}
93+
94+
.btn--full:hover,
95+
.btn--full:active {
96+
background-color: #cf711f;
97+
}
98+
99+
.btn--outline:link,
100+
.btn--outline:visited {
101+
background-color: #fff;
102+
color: #555;
103+
}
104+
105+
.btn--outline:hover,
106+
.btn--outline:active {
107+
background-color: #fdf2e9;
108+
109+
/* border: 3px solid #fff; */
110+
111+
/* Trick to add border inside */
112+
box-shadow: inset 0 0 0 3px #fff;
113+
}
114+
115+
/* Helper class */
116+
.margin-right-sm {
117+
margin-right: 1.6rem !important;
118+
}
119+
120+
/*********************/
121+
/* HEADER */
122+
/*********************/
123+
124+
.header {
125+
display: flex;
126+
justify-content: space-between;
127+
align-items: center;
128+
background-color: #fdf2e9;
129+
130+
/* because we want header to be sticky later */
131+
height: 9.6rem;
132+
padding: 0 4.8rem;
133+
}
134+
135+
.logo {
136+
height: 2.2rem;
137+
}
138+
139+
/*********************/
140+
/* NAVIGATION */
141+
/*********************/
142+
143+
.main-nav-list {
144+
list-style: none;
145+
display: flex;
146+
align-items: center;
147+
gap: 3.2rem;
148+
}
149+
150+
.main-nav-link:link,
151+
.main-nav-link:visited {
152+
display: inline-block;
153+
text-decoration: none;
154+
color: #333;
155+
font-weight: 500;
156+
font-size: 1.8rem;
157+
transition: all 0.3s;
158+
}
159+
160+
.main-nav-link:hover,
161+
.main-nav-link:active {
162+
color: #cf711f;
163+
}
164+
165+
/*AND SELECTOR - higher specificity to
166+
ensure the color is always #fff*/
167+
.main-nav-link.nav-cta:link,
168+
.main-nav-link.nav-cta:visited {
169+
padding: 1.2rem 2.4rem;
170+
border-radius: 9px;
171+
color: #fff;
172+
background-color: #e67e22;
173+
}
174+
175+
/*AND SELECTOR*/
176+
.main-nav-link.nav-cta:hover,
177+
.main-nav-link.nav-cta:active {
178+
background-color: #cf711f;
179+
}
180+
181+
/*********************/
182+
/* HERO SECTION */
183+
/*********************/
184+
185+
.section-hero {
186+
background-color: #fdf2e9;
187+
padding: 4.8rem 0 9.6rem 0;
188+
}
189+
190+
.hero {
191+
max-width: 130rem;
192+
margin: 0 auto;
193+
padding: 0 3.2rem;
194+
display: grid;
195+
grid-template-columns: 1fr 1fr;
196+
align-items: center;
197+
gap: 9.6rem;
198+
}
199+
200+
.hero-description {
201+
font-size: 2rem;
202+
line-height: 1.6;
203+
margin-bottom: 4.8rem;
204+
}
205+
206+
.hero-img {
207+
width: 100%;
208+
}
209+
210+
.delivered-meals {
211+
display: flex;
212+
align-items: center;
213+
gap: 1.6rem;
214+
margin-top: 8rem;
215+
}
216+
217+
.delivered-imgs {
218+
display: flex;
219+
}
220+
221+
.delivered-imgs img {
222+
height: 4.8rem;
223+
width: 4.8rem;
224+
border-radius: 50%;
225+
margin-right: -1.6rem;
226+
border: 3px solid #fdf2e9;
227+
}
228+
229+
.delivered-imgs img:last-child {
230+
margin-right: 0;
231+
}
232+
233+
.delivered-text {
234+
font-size: 1.8rem;
235+
font-weight: 600;
236+
}
237+
238+
.delivered-text span {
239+
color: #cf711f;
240+
font-weight: 700;
241+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
7+
<link rel="preconnect" href="https://fonts.googleapis.com" />
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap"
11+
rel="stylesheet"
12+
/>
13+
14+
<link rel="stylesheet" href="css/style.css" />
15+
<title>Omnifood</title>
16+
</head>
17+
<body>
18+
<header class="header">
19+
<img src="img/omnifood-logo.png" alt="Omnifood logo" class="logo" />
20+
<nav class="main-nav">
21+
<ul class="main-nav-list">
22+
<li><a class="main-nav-link" href="#">Section 1</a></li>
23+
<li><a class="main-nav-link" href="#">Section 2</a></li>
24+
<li><a class="main-nav-link" href="#">Section 3</a></li>
25+
<li><a class="main-nav-link" href="#">Section 4</a></li>
26+
<li><a class="main-nav-link nav-cta" href="#">Section 5</a></li>
27+
</ul>
28+
</nav>
29+
</header>
30+
31+
<main>
32+
<section class="section-hero">
33+
<div class="hero">
34+
<div class="hero-text-box">
35+
<h1 class="heading-primary">
36+
A healthy meal delivered to your door, every single day
37+
</h1>
38+
<p class="hero-description">
39+
The smart 365-days-per-year food subscription that will make you
40+
eat healthy again. Tailored to your personal tastes and
41+
nutritional needs.
42+
</p>
43+
<a href="#" class="btn btn--full margin-right-sm"
44+
>Start eating well</a
45+
>
46+
<a href="#" class="btn btn--outline">Learn more &darr;</a>
47+
48+
<div class="delivered-meals">
49+
<div class="delivered-imgs">
50+
<img src="img/customers/customer-1.jpg" alt="Customer photo" />
51+
<img src="img/customers/customer-2.jpg" alt="Customer photo" />
52+
<img src="img/customers/customer-3.jpg" alt="Customer photo" />
53+
<img src="img/customers/customer-4.jpg" alt="Customer photo" />
54+
<img src="img/customers/customer-5.jpg" alt="Customer photo" />
55+
<img src="img/customers/customer-6.jpg" alt="Customer photo" />
56+
</div>
57+
<p class="delivered-text">
58+
<span>250,000+ </span>meals delivered last year!
59+
</p>
60+
</div>
61+
</div>
62+
<div class="hero-img-box">
63+
<img
64+
src="img/hero.png"
65+
class="hero-img"
66+
alt="Woman enjoying food, meals in storage container, and food bowls on a table"
67+
/>
68+
</div>
69+
</div>
70+
</section>
71+
</main>
72+
</body>
73+
</html>

0 commit comments

Comments
 (0)