-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
254 lines (247 loc) · 6.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Montserrat:wght@500;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Product preview card component</title>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
html {
font-size: 14px;
}
.gg-shopping-cart {
display: block;
box-sizing: border-box;
position: relative;
transform: scale(var(--ggs,1));
width: 20px;
height: 21px;
background:
linear-gradient(
to left,currentColor 12px,
transparent 0)
no-repeat -1px 6px/18px 2px,
linear-gradient(
to left,currentColor 12px,
transparent 0)
no-repeat 6px 14px/11px 2px,
linear-gradient(
to left,currentColor 12px,
transparent 0)
no-repeat 0 2px/4px 2px,
radial-gradient(
circle,currentColor 60%,
transparent 40%)
no-repeat 12px 17px/4px 4px,
radial-gradient(
circle,currentColor 60%,
transparent 40%)
no-repeat 6px 17px/4px 4px
}
.gg-shopping-cart::after, .gg-shopping-cart::before {
content: "";
display: block;
position: absolute;
box-sizing: border-box;
width: 2px;
height: 14px;
background: currentColor;
top: 2px;
left: 4px;
transform: skew(12deg)
}
.gg-shopping-cart::after {
height: 10px;
top: 6px;
left: 16px;
transform: skew(-12deg)
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background-color: hsl(30, 38%, 92%);
}
.wrapper {
display: flex;
justify-content: center;
margin: 0 auto;
}
.container {
display: flex;
flex-direction: column;
max-width: 95%;
background-color: #fff;
border-radius: 10px;
}
.container__pic {
border-radius: 10px 10px 0 0;
}
img {
width: 100%;
height: auto;
border-radius: 10px 10px 0 0;
}
.imgMobile {
border-radius: 10px 10px 0 0;
}
.imgDesktop {
display: none;
border-radius: 10px 0 0 10px;
}
.container__description {
display: flex;
flex-direction: column;
justify-content: center;
padding: 5% 10% 8%;
border-radius: 0 0 20px 20px;
}
.type {
font-family: 'Montserrat', sans-serif;
text-transform: uppercase;
letter-spacing: 0.5em;
color: hsl(228, 12%, 48%);
margin: 0;
}
h1 {
font-family: 'Fraunces', serif;
font-size: 2em;
font-weight: 700;
line-height: 1.8rem;
}
.descriptionProduct {
font-family: 'Montserrat', sans-serif;
font-size: 1rem;
line-height: 1.5rem;
color: hsl(228, 12%, 48%);
margin: 0;
}
.prices {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: -10px;
}
.newPrice {
font-family: 'Fraunces', serif;
font-size: 2rem;
font-weight: 700;
color: hsl(158, 36%, 37%);
}
.oldPrice {
font-family: 'Montserrat', sans-serif;
font-size: 0.8rem;
font-weight: 500;
text-decoration: line-through;
color: hsl(158, 36%, 37%);
margin-left: 15px;
}
.posBtn {
text-align: center;
}
button {
display: flex;
justify-content: center;
width: 100%;
font-weight: 700;
color: #fff;
background-color: hsl(158, 36%, 37%);
padding: 10px;
border: none;
border-radius: 10px;
}
button:hover {
background-color: rgb(0, 60, 0);
}
.centeredBtnText {
display: flex;
flex-direction: row;
align-items: center;
gap: 10px;
}
.attribution {
position: fixed;
bottom: 0;
font-size: 11px; text-align: center;
margin-top: 25px;
}
.attribution a {
color: hsl(228, 45%, 44%);
}
@media (min-width: 800px) {
.container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr;
max-width: 80%;
}
.container__pic {
width: auto;
height: auto;
}
.imgMobile {
display: none;
}
.imgDesktop {
display: block;
max-width: 100%;
max-height: 100%;
}
.container__description {
justify-content: space-between;
border-radius: 0 20px 20px 0;
}
}
@media (min-width: 1300px) {
.container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr;
max-width: 40%;
}
.container__pic {
width: auto;
height: auto;
}
.imgMobile {
display: none;
}
.imgDesktop {
display: block;
max-width: 100%;
max-height: 100%;
}
.container__description {
justify-content: space-between;
border-radius: 0 20px 20px 0;
}
}
</style>
</head>
<body>
<div class="wrapper">
<div class="container">
<div class="container__pic">
<img src="https://zupimages.net/up/22/34/j2qz.jpg" class="imgMobile"><img src="https://zupimages.net/up/22/34/hqg8.jpg" class="imgDesktop">
</div>
<div class="container__description">
<p class="type">Perfume</p>
<h1>Gabrielle Essence Eau De Parfum</h1>
<p class="descriptionProduct">A floral, solar and voluptuous interpretation composed by Olivier Polge,
Perfumer-Creator for the House of CHANEL.</p>
<div class="prices"><p class="newPrice">$149.99</p>
<p class="oldPrice">$169.99</p></div>
<div class="posBtn"><button><div class="centeredBtnText"><i class="gg-shopping-cart"></i>Add to Cart</div></button></div>
</div>
</div></div>
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="https://www.frontendmentor.io/profile/MrFougasse">Harderth</a>.
</div>
</body>
</html>