Skip to content

Commit e7caf6b

Browse files
committed
Section 6 - Carousel
1 parent 9226d34 commit e7caf6b

File tree

2 files changed

+251
-0
lines changed

2 files changed

+251
-0
lines changed
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
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>Carousel</title>
8+
9+
<link rel="preconnect" href="https://fonts.googleapis.com" />
10+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
11+
<link
12+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap"
13+
rel="stylesheet"
14+
/>
15+
16+
<style>
17+
/*
18+
SPACING SYSTEM (px)
19+
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
20+
21+
FONT SIZE SYSTEM (px)
22+
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
23+
*/
24+
25+
/*
26+
MAIN COLOR: #087f5b
27+
GREY COLOR: #343a40
28+
29+
*/
30+
31+
* {
32+
margin: 0;
33+
padding: 0;
34+
box-sizing: border-box;
35+
}
36+
37+
body {
38+
font-family: "Inter", sans-serif;
39+
color: #343a40;
40+
line-height: 1;
41+
}
42+
43+
img {
44+
height: 200px;
45+
border-radius: 8px;
46+
transform: scale(1.5);
47+
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
48+
}
49+
50+
.carousel {
51+
width: 800px;
52+
margin: 100px auto;
53+
background-color: #087f5b;
54+
padding: 32px 48px 32px 86px;
55+
border-radius: 8px;
56+
57+
display: flex;
58+
align-items: center;
59+
gap: 86px;
60+
position: relative;
61+
}
62+
63+
.testimonial {
64+
}
65+
66+
.testimonial-text {
67+
font-size: 18px;
68+
font-weight: 500;
69+
line-height: 1.5;
70+
margin-bottom: 32px;
71+
color: #e6fcf5;
72+
}
73+
74+
.testimonial-author {
75+
font-size: 14px;
76+
margin-bottom: 4px;
77+
color: #c3fae8;
78+
}
79+
80+
.testimonial-job {
81+
font-size: 12px;
82+
color: #c3fae8;
83+
}
84+
85+
/* CONTROLS */
86+
.btn {
87+
background-color: #fff;
88+
border: none;
89+
90+
height: 40px;
91+
width: 40px;
92+
93+
border-radius: 50%;
94+
95+
display: flex;
96+
align-items: center;
97+
justify-content: center;
98+
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
99+
cursor: pointer;
100+
101+
position: absolute;
102+
/* In Relation to Parent Element */
103+
top: 50%;
104+
105+
/* In Relation to Element Itself */
106+
transform: translate(0, -50%);
107+
}
108+
109+
.btn--left {
110+
left: 0;
111+
112+
/* In Relation to Element Itself */
113+
transform: translate(-50%, 0);
114+
}
115+
116+
.btn--right {
117+
right: 0;
118+
119+
/* In Relation to Element Itself */
120+
transform: translate(50%, 0);
121+
}
122+
123+
.btn-icon {
124+
height: 24px;
125+
width: 24px;
126+
stroke: #087f5b;
127+
}
128+
129+
.dots {
130+
position: absolute;
131+
bottom: 0;
132+
left: 50%;
133+
transform: translate(-50%, 32px);
134+
135+
display: flex;
136+
gap: 12px;
137+
}
138+
139+
.dot {
140+
height: 12px;
141+
width: 12px;
142+
background-color: #fff;
143+
border: 2px solid #087f5b;
144+
border-radius: 50%;
145+
cursor: pointer;
146+
}
147+
148+
.dot-fill {
149+
background-color: #087f5b;
150+
}
151+
</style>
152+
</head>
153+
<body>
154+
<div class="carousel">
155+
<img src="maria.jpg" alt="Maria de Almeida" />
156+
<blockquote class="testimonial">
157+
<p class="testimonial-text">
158+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias
159+
placeat cum, at aspernatur eos consectetur atque similique nihil nemo
160+
smth smth smth smth."
161+
</p>
162+
<p class="testimonial-author">Maria de Almeida</p>
163+
<p class="testimonial-job">Senior Product Manager at EDP Comercial</p>
164+
</blockquote>
165+
166+
<button class="btn btn--left">
167+
<svg
168+
xmlns="http://www.w3.org/2000/svg"
169+
fill="none"
170+
viewBox="0 0 24 24"
171+
stroke-width="2"
172+
stroke="currentColor"
173+
class="btn-icon"
174+
>
175+
<path
176+
stroke-linecap="round"
177+
stroke-linejoin="round"
178+
d="M15.75 19.5L8.25 12l7.5-7.5"
179+
/>
180+
</svg>
181+
</button>
182+
<button class="btn btn--right">
183+
<svg
184+
xmlns="http://www.w3.org/2000/svg"
185+
fill="none"
186+
viewBox="0 0 24 24"
187+
stroke-width="1.5"
188+
stroke="currentColor"
189+
class="btn-icon"
190+
>
191+
<path
192+
stroke-linecap="round"
193+
stroke-linejoin="round"
194+
d="M8.25 4.5l7.5 7.5-7.5 7.5"
195+
/>
196+
</svg>
197+
</button>
198+
<div class="dots">
199+
<button class="dot dot-fill">&nbsp</button>
200+
<button class="dot">&nbsp</button>
201+
<button class="dot">&nbsp</button>
202+
<button class="dot">&nbsp</button>
203+
</div>
204+
</div>
205+
</body>
206+
</html>

starter/06-Components/template.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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>Template</title>
8+
9+
<link rel="preconnect" href="https://fonts.googleapis.com" />
10+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
11+
<link
12+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap"
13+
rel="stylesheet"
14+
/>
15+
16+
<style>
17+
/*
18+
SPACING SYSTEM (px)
19+
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
20+
21+
FONT SIZE SYSTEM (px)
22+
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
23+
*/
24+
25+
/*
26+
MAIN COLOR: #087f5b
27+
GREY COLOR: #343a40
28+
29+
*/
30+
31+
* {
32+
margin: 0;
33+
padding: 0;
34+
box-sizing: border-box;
35+
}
36+
37+
body {
38+
font-family: "Inter", sans-serif;
39+
color: #343a40;
40+
line-height: 1;
41+
}
42+
</style>
43+
</head>
44+
<body></body>
45+
</html>

0 commit comments

Comments
 (0)