-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
440 lines (373 loc) · 16.3 KB
/
index.js
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
// pop up sigin
let modalWrapper=document.querySelector(".modal_wrapper");
let closeBtn=document.querySelector(".close");
let trigger=document.querySelector("#sign");
trigger.addEventListener("click", function(){
modalWrapper.classList.add("active");
})
closeBtn.addEventListener("click", function(){
modalWrapper.classList.remove("active");
})
// popup signup
let modalWrapper2=document.querySelector(".wrapIt");
let closeBtn2=document.querySelector(".open");
let trigger2=document.querySelector("#create");
trigger2.addEventListener("click", function(){
modalWrapper2.classList.add("active2");
modalWrapper.classList.remove("active");
})
closeBtn2.addEventListener("click", function(){
modalWrapper2.classList.remove("active2");
})
// popup forgot password
let modalWrapper3=document.querySelector(".mWrap");
let closeBtn3=document.querySelector(".again");
let trigger3=document.querySelector("#forg");
trigger3.addEventListener("click", function(){
modalWrapper3.classList.add("active3");
modalWrapper.classList.remove("active");
})
closeBtn3.addEventListener("click", function(){
modalWrapper3.classList.remove("active3");
})
// Just Dropped
let data=[
{
image:"https://www.sephora.com/productimages/sku/s2513851-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"YUZU-C Eye Awakening Essence"
},
{
image:"https://www.sephora.com/productimages/sku/s2514586-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"KOSHIRICE Acne Calming Spot"
},
{
image:"https://www.sephora.com/productimages/sku/s2579852-main-zoom.jpg?imwidth=320",
name:"PAT McGRATH LABS",
detail:"Skin Fetish: Divine Blush Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2536316-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"OLEHENRIKSEN",
detail:"Firmly Yours Dry Body Oil with Peptides"
},
{
image:"https://www.sephora.com/productimages/sku/s2572634-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"HAUS LABS BY LAD.",
detail:"Bio-Radiant Gel- Powder Highlighter."
},
{
image:"https://www.sephora.com/productimages/sku/s2593879-main-zoom.jpg?imwidth=320",
name:"Moroccanoil",
detail:"Signature Scent Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2572485-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"HAUS LABS BY LAD..",
detail:"Power Sculpt Velvet Bronzer with "
},
{
image:"https://www.sephora.com/productimages/sku/s2590198-main-zoom.jpg?imwidth=320",
name:"tarte",
detail:"Maracuja Juicy Glow Highlighting Stick"
},
{
image:"https://www.sephora.com/productimages/sku/s2578011-main-zoom.jpg?imwidth=320",
name:"MAKEUP BY MARIO",
detail:"SoftSculpt@ Transforming Skin"
},
{
image:"https://www.sephora.com/productimages/sku/s2567519-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"WASO",
detail:"SHIKULIME Gel-to-Oil Cleanser"
},
{
image:"https://www.sephora.com/productimages/sku/s2536308-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"Summer Fridays.",
detail:"ShadeDrops Broad Spectrum SPF 30"
},
{
image:"https://www.sephora.com/productimages/sku/s2592228-main-zoom.jpg?imwidth=320",
name:"amika",
detail:"Hydro Rush Intense Moisture Conditione.."
},
{
image:"https://www.sephora.com/productimages/sku/s2592012-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"YUZU-C Eye Awakening Essence"
},
{
image:"https://www.sephora.com/productimages/sku/s2572238-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"WASO",
detail:"KOSHIRICE Acne Calming Spot"
},
{
image:"https://www.sephora.com/productimages/sku/s2605244-main-zoom.jpg?pb=clean-planet-positive-badge-2021&imwidth=320",
name:"PAT McGRATH LABS",
detail:"Skin Fetish: Divine Blush Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2605244-main-zoom.jpg?pb=clean-planet-positive-badge-2021&imwidth=320",
name:"OLEHENRIKSEN",
detail:"Firmly Yours Dry Body Oil with Peptides"
},
{
image:"https://www.sephora.com/productimages/sku/s2578037-main-zoom.jpg?imwidth=320",
name:"HAUS LABS BY LAD.",
detail:"Bio-Radiant Gel- Powder Highlighter."
},
{
image:"https://www.sephora.com/productimages/sku/s2589422-main-zoom.jpg?imwidth=320",
name:"Moroccanoil",
detail:"Signature Scent Duo"
},
]
for(let i=0; i<data.length; i++){
let char=data[i];
let box=document.createElement("div");
let image=document.createElement("img");
image.setAttribute("src",char.image);
image.setAttribute("class","crauser");
let p1=document.createElement("p");
p1.innerText=char.name;
let p2=document.createElement("p");
p2.innerText=char.detail;
box.append(image,p1,p2);
document.querySelector("#just").append(box);
}
// For You
let forData=[
{
image:"https://www.sephora.com/productimages/sku/s2577872-main-zoom.jpg?imwidth=320",
name:"PAT McGRATH LABS",
detail:"Skin Fetish: Divine Blush Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2419786-main-zoom.jpg?imwidth=320",
name:"OLEHENRIKSEN",
detail:"Firmly Yours Dry Body Oil with Peptides"
},
{
image:"https://www.sephora.com/productimages/sku/s2555811-main-zoom.jpg?imwidth=320",
name:"HAUS LABS BY LAD.",
detail:"Bio-Radiant Gel- Powder Highlighter."
},
{
image:"https://www.sephora.com/productimages/sku/s2588515-main-zoom.jpg?imwidth=320",
name:"Moroccanoil",
detail:"Signature Scent Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2366524-main-zoom.jpg?imwidth=320",
name:"HAUS LABS BY LAD..",
detail:"Power Sculpt Velvet Bronzer with "
},
{
image:"https://www.sephora.com/productimages/sku/s2578011-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"KOSHIRICE Acne Calming Spot"
},
{
image:"https://www.sephora.com/productimages/sku/s2333771-main-zoom.jpg?pb=clean-planet-positive-badge-2021&imwidth=320",
name:"tarte",
detail:"Maracuja Juicy Glow Highlighting Stick"
},
{
image:"https://www.sephora.com/productimages/sku/s2172310-main-zoom.jpg?imwidth=320",
name:"MAKEUP BY MARIO",
detail:"SoftSculpt@ Transforming Skin"
},
{
image:"https://www.sephora.com/productimages/sku/s2407278-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"SHIKULIME Gel-to-Oil Cleanser"
},
{
image:"https://www.sephora.com/productimages/sku/s2536308-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"Summer Fridays.",
detail:"ShadeDrops Broad Spectrum SPF 30"
},
{
image:"https://www.sephora.com/productimages/sku/s2571966-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"amika",
detail:"Hydro Rush Intense Moisture Conditione.."
},
{
image:"https://www.sephora.com/productimages/sku/s2457299-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"YUZU-C Eye Awakening Essence"
},
{
image:"https://www.sephora.com/productimages/sku/s2592012-main-zoom.jpg?imwidth=320",
name:"WASO",
detail:"YUZU-C Eye Awakening Essence"
},
{
image:"https://www.sephora.com/productimages/sku/s2572238-main-zoom.jpg?pb=2020-03-sephora-clean-2019&imwidth=320",
name:"WASO",
detail:"KOSHIRICE Acne Calming Spot"
},
{
image:"https://www.sephora.com/productimages/sku/s2605244-main-zoom.jpg?pb=clean-planet-positive-badge-2021&imwidth=320",
name:"PAT McGRATH LABS",
detail:"Skin Fetish: Divine Blush Duo"
},
{
image:"https://www.sephora.com/productimages/sku/s2605244-main-zoom.jpg?pb=clean-planet-positive-badge-2021&imwidth=320",
name:"OLEHENRIKSEN",
detail:"Firmly Yours Dry Body Oil with Peptides"
},
{
image:"https://www.sephora.com/productimages/sku/s2594810-main-zoom.jpg?imwidth=320",
name:"HAUS LABS BY LAD.",
detail:"Bio-Radiant Gel- Powder Highlighter."
},
{
image:"https://www.sephora.com/productimages/sku/s2589422-main-zoom.jpg?imwidth=320",
name:"Moroccanoil",
detail:"Signature Scent Duo"
},
]
for(let i=0; i<forData.length; i++){
let char=forData[i];
let box2=document.createElement("div");
let image2=document.createElement("img");
image2.setAttribute("src",char.image);
let pt1=document.createElement("p");
pt1.innerText=char.name;
let pt2=document.createElement("p");
pt2.innerText=char.detail;
box2.append(image2,pt1,pt2);
document.querySelector("#foryou").append(box2);
}
// Beaurty Offers
let beautyData=[
{
image:"https://www.sephora.com/contentimages/promo/bpme/July/2022-bpme-bi-sku-point-multiplier-site-desktop-mobile-app-beauty-offers-banner-4x-tarte.jpg",
name:"Get 4X Pointstt",
detail:"Beauty Insider members only. In store& online Ends 7/27/2022 ttExclusions/terms apply. May be combined with other promotional offers."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/May/2022-complexion-story-site-desktop-mobile-beauty-offers-page-banner-sample-bag-1000x750-us.jpg",
name:"Try bestselling complexion picks from Danessa Myricks Beauty, Rare Beauty, and more.",
detail:"Free with $35 purchase. Beauty Insider members only. Online only Exclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/July/2022-07-18-slotting-promo-app-site-desktop-mobile-dtext-beauty-offers-page-banner--SULWHASOOGIFT-us-ca-handoff.jpg",
name:"CORmplimentary Sulwhasoo Size Set",
detail:"Complimentary with $85 Sulwhasoo purchase Beauty Insider members only. Online only terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/May/2022-5-25-briogeo-superfoods-site-desktop-mobile-app-beauty-offers-page-banner-en-us-can.jpg",
name:"Complimentary Augustinus Bader Trial Sizes",
detail:"Target wrinkles, dullness, and more with three luxurious skincare trial sizes."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/July/2022-7-12-ceremonia-site-desktop-mobile-app-beauty-offers-page-banner-en-us.jpg",
name:"Free Trial Size from Ceremonia",
detail:"Free with $25 purchase.Beauty Insider members only. Online only Exclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/July/2022-7-13-july-skincare-challenge-site-desktop-mobile-app-beauty-offers-page-beauty-offer-new-en-us-can.jpg",
name:"Free Sol de Janeiro Samples",
detail:"Visibly plump skin in two weeks"
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/July/2022-7-1-sol-de-janeiro-limited-edition-mists-site-desktop-mobile-app-beauty-offers-page-banner-en-us-can.jpg",
name:"Free Sol de Janeiro Trial Size",
detail:"Pick pne of two bestselling body creams! Try Bom Dia Bright or Brazilian Bum Bum."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/June/2022-6-23-laneige-water-bank-collection-relaunch-site-app-beauty-offers-page-banner.jpg",
name:"Free LANEIGE Trial Size",
detail:"Free with $25 purchase. Beauty Insider members only Online only EXclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/June/2022-6-18-june-hair-challenge-site-desktop-mobile-app-beauty-offers-page-banner-en-us-can.jpg",
name:"Free Moroccanoil Samples",
detail:"Free with $25 purchase. Beauty Insider members only Online only EXclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/June/2022-06-05-slotting-promo-app-site-beauty-offers-banner-LUXURYSKIN-us-ca-handoff.jpg",
name:"Complimentary Luxe Skincare",
detail:"Free with $25 purchase. Beauty Insider members only Online only EXclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/June/2022-june-body-app-home-page-content-card-PROMO-f1.jpg",
name:"Get 4X Pointstt",
detail:"Beauty Insider members only. In store& online Ends 7/27/2022 ttExclusions/terms apply. May be combined with other promotional offers."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/May/2022-5-25-briogeo-superfoods-site-desktop-mobile-app-beauty-offers-page-banner-en-us-can.jpg",
name:"Try bestselling complexion picks from Danessa Myricks Beauty, Rare Beauty, and more.",
detail:"Free with $35 purchase. Beauty Insider members only. Online only Exclusions/terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/May/2022-complexion-story-site-desktop-mobile-beauty-offers-page-beauty-offers-banner-choose-1-of-3-1000x750-us.jpg",
name:"CORmplimentary Sulwhasoo Size Set",
detail:"Complimentary with $85 Sulwhasoo purchase Beauty Insider members only. Online only terms apply."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/March/2022-apr-clinical-skincare-site-desktop-mobile-app-beauty-offers-page-banner-promo-3-1000x750-us.jpg",
name:"Complimentary Augustinus Bader Trial Sizes",
detail:"Target wrinkles, dullness, and more with three luxurious skincare trial sizes."
},
{
image:"https://www.sephora.com/contentimages/promo/beautyoffers/2022/April/2022-apr-warby-paid-foundation-der-a-site-app-home-page-content-card-1000x750-us.jpg",
name:"Free Trial Size from Ceremonia",
detail:"Free with $25 purchase.Beauty Insider members only. Online only Exclusions/terms apply."
},
]
for(let i=0; i<beautyData.length; i++){
let char=beautyData[i];
let box3=document.createElement("div");
let image3=document.createElement("img");
image3.setAttribute("src",char.image);
let pta1=document.createElement("p");
pta1.innerText=char.name;
let pta2=document.createElement("p");
pta2.innerText=char.detail;
let btn=document.createElement("button");
btn.innerText="Apply"
let div=document.createElement("div");
div.setAttribute("id","btn");
div.append(btn);
box3.append(image3,pta1,pta2,div);
document.querySelector("#cutie").append(box3);
}
// cards
let cardsData=[
{
image:"https://www.sephora.com/contentimages/homepage/071922/Homepage/RWD/2022-7-1-hp-marketing-banner-sephora-collection-makeup-match-brush-us-ca-rwd-slice.jpeg?imwidth=800",
name:"New Makeup Match Brush Collection",
detail:"Starting at $8! Vegan tools to complete any look.",
now:"SHOP NOW▸",
},
{
image:"https://www.sephora.com/contentimages/homepage/060222/Homepage/RWD/2022-06-02-hp-marketing-banner-wedding-seasonal-services-desktop-mobile-rwd-us-slice.jpeg?imwidth=800",
name:"Shop Now, Pay Later",
detail:"Spilt your purchase into four payments.",
now:"LEARN MORE▸",
},
{
image:"https://www.sephora.com/contentimages/homepage/070522/Homepage/RWD/2022-07-18-hp-marketing-banner-klarna-afterpay-us-ca-rwd-slice.jpeg?imwidth=800",
name:"Wedding Beauty Services",
detail:"Get a makeup look you'll love for all your big events.",
now:"BOOK NOW▸",
},
]
for(let i=0; i<cardsData.length; i++){
let char=cardsData[i];
let box4=document.createElement("div");
let ptag1=document.createElement("p");
ptag1.innerText=char.name;
let ptag2=document.createElement("p");
ptag2.innerText=char.detail;
let ptag3=document.createElement("p");
ptag3.innerText=char.now
let image4=document.createElement("img");
image4.setAttribute("src",char.image);
box4.append(ptag1,ptag2,ptag3,image4);
document.querySelector("#cards").append(box4);
}