Skip to content

Commit ba9c15b

Browse files
committed
Section 7 - Omnifood project. part 3 - Call to action
1 parent ca1744e commit ba9c15b

File tree

3 files changed

+170
-2
lines changed

3 files changed

+170
-2
lines changed

starter/07-Omnifood-Desktop/css/general.css

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ paragraph default: 1.6
2525
- Primary: #e67e22
2626
2727
- Tints: #fdf2e9 #fae5d3
28-
- Shades: #cf711f
28+
- Shades: #cf711f #eb984e
2929
- Accents:
3030
- Greys:
3131
#6f6f6f lightest gray allowed on #fdf2e9
@@ -54,6 +54,11 @@ Medium: 11px
5454
box-sizing: border-box;
5555
}
5656

57+
*:focus {
58+
outline: none;
59+
box-shadow: 0 0 0 0.8rem rgb(230, 126, 34, 0.5);
60+
}
61+
5762
html {
5863
/* default: 1 rem = 16px */
5964

@@ -109,20 +114,37 @@ body {
109114
letter-spacing: 0.75px;
110115
}
111116

117+
.btn,
112118
.btn:link,
113119
.btn:visited {
114120
display: inline-block;
115121

116122
text-decoration: none;
117123
font-size: 2rem;
118124
font-weight: 600;
119-
color: #fff;
125+
/* color: #fff; */
120126

121127
padding: 1.6rem 3.2rem;
122128
border-radius: 9px;
123129

124130
/* Put transition on the original state */
125131
transition: all 0.3s;
132+
133+
border: none;
134+
cursor: pointer;
135+
font-family: inherit;
136+
}
137+
138+
.btn--form {
139+
background-color: #45240a;
140+
color: #fdf2e9;
141+
align-self: end;
142+
padding: 1.2rem;
143+
}
144+
145+
.btn--form:hover {
146+
background-color: #fff;
147+
color: #555;
126148
}
127149

128150
.btn--full:link,

starter/07-Omnifood-Desktop/css/style.css

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,93 @@
462462
font-size: 1.8rem;
463463
line-height: 1.8;
464464
}
465+
466+
/**********************/
467+
/* Call to Action SECTION */
468+
/**********************/
469+
470+
.section-cta {
471+
padding: 9.6rem 0;
472+
}
473+
474+
.cta {
475+
display: grid;
476+
grid-template-columns: 2fr 1fr;
477+
/* background-color: #e67e22; */
478+
background-image: linear-gradient(to right bottom, #eb984e, #e67e22);
479+
box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.15);
480+
border-radius: 11px;
481+
482+
overflow: hidden;
483+
/* temp */
484+
}
485+
486+
.cta-text-box {
487+
color: #45260a;
488+
padding: 4.8rem 6.4rem 6.4rem 6.4rem;
489+
}
490+
491+
.cta .heading-secondary {
492+
/* color: #45260a; */
493+
color: inherit;
494+
margin-bottom: 3.2rem;
495+
}
496+
497+
.cta-text {
498+
font-size: 1.8rem;
499+
line-height: 1.8;
500+
margin-bottom: 4.8rem;
501+
}
502+
503+
.cta-form {
504+
display: grid;
505+
grid-template-columns: 1fr 1fr;
506+
column-gap: 3.2rem;
507+
row-gap: 2.4rem;
508+
}
509+
510+
.cta-form div {
511+
}
512+
513+
.cta-form label {
514+
display: block;
515+
font-size: 1.6rem;
516+
font-weight: 500;
517+
margin-bottom: 1.2rem;
518+
}
519+
520+
.cta-form input,
521+
.cta-form select {
522+
width: 100%;
523+
padding: 1.2rem;
524+
font-size: 1.8rem;
525+
font-family: inherit;
526+
color: inherit;
527+
border: none;
528+
background-color: #fdf2e9;
529+
border-radius: 9px;
530+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
531+
}
532+
533+
.cta-form input::placeholder {
534+
opacity: #aaa;
535+
}
536+
537+
.cta *:focus {
538+
outline: none;
539+
box-shadow: 0 0 0 0.8rem rgb(253, 242, 233, 0.5);
540+
}
541+
542+
.cta-form select {
543+
}
544+
545+
.cta-form button .cta-img-box {
546+
background-image: linear-gradient(
547+
to right bottom,
548+
rgb(235, 152, 78, 0.35),
549+
rgb(230, 126, 34, 0.35)
550+
),
551+
url(../img/eating.jpg);
552+
background-size: cover;
553+
background-position: center;
554+
}

starter/07-Omnifood-Desktop/index.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,62 @@ <h2 class="heading-secondary">
545545
</div>
546546
</div>
547547
</section>
548+
549+
<section class="section-cta">
550+
<div class="container">
551+
<div class="cta">
552+
<div class="cta-text-box">
553+
<h2 class="heading-secondary">Get your first meal for free!</h2>
554+
<p class="cta-text">
555+
Healthy, tasty and hassle-free meals are waiting for you. Start
556+
eating well today. You can cancel or pause anytime. And the
557+
first meal is on us!
558+
</p>
559+
560+
<form class="cta-form" action="#">
561+
<div>
562+
<label for="full-name">Full Name</label>
563+
<input
564+
id="full-name"
565+
type="text"
566+
placeholder="John Smith"
567+
required
568+
/>
569+
</div>
570+
571+
<div>
572+
<label for="email">Email address</label>
573+
<input
574+
id="email"
575+
type="email"
576+
placeholder="me@example.com"
577+
required
578+
/>
579+
</div>
580+
581+
<div>
582+
<label for="select-where">Where di you hear from us?</label>
583+
<select id="select-where" required>
584+
<option value="">Please choose one option</option>
585+
<option value="friends">Friends and family</option>
586+
<option value="youtube">YouTube Video</option>
587+
<option value="podcast">Podcast</option>
588+
<option value="ad">Facebook Ad</option>
589+
<option value="others">Others</option>
590+
</select>
591+
</div>
592+
593+
<button class="btn btn--form">Sign up now</button>
594+
</form>
595+
</div>
596+
<div
597+
class="cta-img-box"
598+
role="img"
599+
aria-label="Woman enjoying food"
600+
></div>
601+
</div>
602+
</div>
603+
</section>
548604
</main>
549605
</body>
550606
</html>

0 commit comments

Comments
 (0)