From 1b7b81d2d84658e98524ccf274f0a4dd99da29ae Mon Sep 17 00:00:00 2001 From: Yash Verma <114978813+Rajput-xv@users.noreply.github.com> Date: Mon, 22 Apr 2024 21:03:09 +0530 Subject: [PATCH] update index js file --- index.html | 407 +---------------------------------------------------- index.js | 271 +++++++++++++++++++++++++++++++++++ 2 files changed, 272 insertions(+), 406 deletions(-) diff --git a/index.html b/index.html index 1279e00..87c9366 100644 --- a/index.html +++ b/index.html @@ -133,417 +133,12 @@
E-Smart
-
-
- -
- - -
-
- -
-

OnePlus Nord CE 2 Lite 5G,128 GB,6 GB RAM,Blue Tide,Mobile Phone

-
-

₹ 16,499

- -
- - - - - -
- -
- - -
-
-
-
-
- -
-

Tecno Pop 7 Pro 64 GB, 2 GB, Black,
Smartphone

-
-

₹ 5,999

- -
- - - - -
-
- -
-
-
-
-
- -
-

Samsung Galaxy S23 Ultra 5G 256 GB, 12 GB RAM, Green, Mobile Phone

-
-

₹ 1,24,999

- -
- - - - - -
-
- -
-
-
- - -
-
- -
-

Dell Inspiron 15 3520 Laptop (12th Gen Intel Core i5-1235U/8 GB/512 GB SSD/Windows 11 Home/Integrated Graphics), 39.62 cm (15.6 Inch)

-
-

₹ 56,143

- -
- - - - -
-
- -
-
-
-
-
- -
-

Apple MGN63HNA MacBook Air (Apple M1 Chip/8GB/256GB SSD/macOS Big Sur/Retina), 33.78 cm (13.3 inch)

-
-

₹ 84,490

- -
- - - - - -
-
- -
-
-
-
-
- -
-

Asus MB511WS VivoBook 16X Laptop (AMD Ryzen 5 5600H/16 GB/512 GB SSD/Radeon Vega 7 Graphics/Windows 11), 40.64 cm (16 inch)

-
-

₹ 49,499

- -
- - - - -
-
- -
-
-
- - -
-
- -
-

Sony Bravia 139 cm (55 inches) 4K Ultra HD Smart LED Google TV with Dolby Audio & Alexa Compatibility KD-55X75K (Black)

-
-

₹ 62,699

- -
- - - - - -
-
- -
-
-
-
-
- -
-

LG Nano80 124.46 cm (49 inch)
Ultra HD (4K) LED Smart TV,
49NANO80

-
-

₹ 51,990

- -
- - - - - -
-
- -
-
-
-
-
- -
-

Sony Bravia 108 cm (43 inches) 4K Ultra HD Smart LED Google TV with Dolby Audio & Alexa Compatibility KD-43X75K (Black)

-
-

₹ 46,549

- -
- - - - -
-
- -
-
-
- -
-
- -
-

LG 190 litres 3 Star Direct Cool Single Door Refrigerator, Scarlet Euphoria, GL-B201ASED

-
-

₹ 17,490

- -
- - - - -
-
- -
-
-
-
-
- -
-

Whirlpool 265 L Frost Free Double Door Refrigerator(Arctic Steel, NeoFresh)

-
-

₹ 21,990

- -
- - - - - -
-
- -
-
-
-
-
- -
-

Godrej Eon 265 litres Double Door Refrigerator, Steel Rush RT EON VALOR 280C 35 RCI

-
-

₹ 25,490

- -
- - - - -
-
- -
-
-
- - -
-
- -
-

Canon EOS 200D II DSLR Camera
with 18-55 mm Lens Kit

-
-

₹ 62,999

- -
- - - - - -
-
- -
-
-
-
-
- -
-

Nikon D750 DSLR Camera with 24-120 mm
Lens Kit

-
-

₹ 1,34,999

- -
- - - - -
-
- -
-
-
-
-
- -
-

Nikon D850 DSLR Camera with 24-120 mm
Lens Kit

-
-

₹ 2,62,990

- -
- - - - - -
-
- -
-
-
- - -
-
- -
-

Haier 1 Ton 4 star 7 in 1 convertible
inverter split AC,(Triple Inverter Plus,
Frost Self Clean)

-
-

₹ 35,490

- -
- - - - -
-
- -
-
-
-
-
- -
-

Lloyd 2 Ton 3 star 5 in 1 Convertible
Inverter split AC(PM 2.5 Filter, 4 way swing,Turbo Cool)

-
-

₹ 50,990

- -
- - - - - -
- -
- -
-
-
-
-
- -
-

Voltas 2 Ton 4-in-1 Convertible Inverter split AC, 243V Vectra Elegant (Dual temperature display, Dual protection filter, self diagnosis)

-
-

₹ 51,990

- -
- - - - -
-
- -
-
-
+
-
diff --git a/index.js b/index.js index 8207765..456263d 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,277 @@ // }); +const productphone =[{ + image:'Smartphones/1/OnePlus-Nord-CE-2-Lite-5G-Mobile-Phones.png', + name:'OnePlus Nord CE 2 Lite 5G,128 GB,6 GB RAM,Blue Tide,Mobile Phone', + price:16499, + stars:4.5 +},{ + image:'Smartphones/2/Tecno-Pop-7-Pro.jpeg', + name:'Tecno Pop 7 Pro 64 GB, 2 GB, Black, Smartphone', + price:5999, + stars:4 +},{ + image:'Smartphones/3/Samsung-S23Ultraa.jpeg', + name:'Samsung Galaxy S23 Ultra 5G 256 GB, 12 GB RAM, Green, Mobile Phone', + price:124999, + stars:5 +}]; + +let productHTML=''; + +productphone.forEach((phone)=>{ + let starsHTML = ''; + if (Array.isArray(phone.stars)) { + starsHTML = phone.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${phone.name}

+
+

₹ ${phone.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +const productlaptop =[{ + image:'Laptops/1/Dell.jpeg', + name:'Dell Inspiron 15 3520 Laptop (12th Gen Intel Core i5-1235U/8 GB/512 GB SSD/Windows 11 Home/Integrated Graphics), 39.62 cm (15.6 Inch)', + price:56143, + stars:4.5 +},{ + image:'Laptops/2/Apple.jpeg', + name:'Apple MGN63HNA MacBook Air (Apple M1 Chip/8GB/256GB SSD/macOS Big Sur/Retina), 33.78 cm (13.3 inch)', + price:84490, + stars:4 +},{ + image:'Laptops/3/Asus.jpeg', + name:'Asus MB511WS VivoBook 16X Laptop (AMD Ryzen 5 5600H/16 GB/512 GB SSD/Radeon Vega 7 Graphics/Windows 11), 40.64 cm (16 inch)', + price:49499, + stars:5 +}]; +productlaptop.forEach((laptop)=>{ + let starsHTML = ''; + if (Array.isArray(laptop.stars)) { + starsHTML = laptop.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${laptop.name}

+
+

₹ ${laptop.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +const producttv =[{ + image:'Televisions/1/Sony.jpeg', + name:'Sony Bravia 139 cm (55 inches) 4K Ultra HD Smart LED Google TV with Dolby Audio & Alexa Compatibility KD-55X75K (Black)', + price:62699, + stars:4.5 +},{ + image:'Televisions/2/LG.jpeg', + name:'LG Nano80 124.46 cm (49 inch) Ultra HD (4K) LED Smart TV, 49NANO80', + price:51990, + stars:4 +},{ + image:'Televisions/3/SONY.jpeg', + name:'Sony Bravia 108 cm (43 inches) 4K Ultra HD Smart LED Google TV with Dolby Audio & Alexa Compatibility KD-43X75K (Black)', + price:46549, + stars:5 +}]; +producttv.forEach((tv)=>{ + let starsHTML = ''; + if (Array.isArray(tv.stars)) { + starsHTML = tv.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${tv.name}

+
+

₹ ${tv.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +const productrf =[{ + image:'Refrigerator/1/LG.jpeg', + name:'LG 190 litres 3 Star Direct Cool Single Door Refrigerator, Scarlet Euphoria, GL-B201ASED', + price:17490, + stars:4.5 +},{ + image:'Refrigerator/2/Whirlpool.jpeg', + name:'Whirlpool 265 L Frost Free Double Door Refrigerator(Arctic Steel, NeoFresh)', + price:21990, + stars:4 +},{ + image:'Refrigerator/3/Godrej.jpeg', + name:'Godrej Eon 265 litres Double Door Refrigerator, Steel Rush RT EON VALOR 280C 35 RCI', + price:25490, + stars:5 +}]; +productrf.forEach((rf)=>{ + let starsHTML = ''; + if (Array.isArray(rf.stars)) { + starsHTML = rf.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${rf.name}

+
+

₹ ${rf.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +const productcamera =[{ + image:'DSLR-Camera/1/Canon.jpeg', + name:'Canon EOS 200D II DSLR Camera
with 18-55 mm Lens Kit', + price:62999, + stars:4.5 +},{ + image:'DSLR-Camera/2/Nikon.jpeg', + name:'Nikon D750 DSLR Camera with 24-120 mm Lens Kit', + price:134999, + stars:4 +},{ + image:'DSLR-Camera/3/Nikon.jpeg', + name:'Nikon D850 DSLR Camera with 24-120 mm Lens Kit', + price:262990, + stars:5 +}]; +productcamera.forEach((cam)=>{ + let starsHTML = ''; + if (Array.isArray(cam.stars)) { + starsHTML = cam.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${cam.name}

+
+

₹ ${cam.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +const productac =[{ + image:'Air-Conditioners/1/Haier.jpeg', + name:'Haier 1 Ton 4 star 7 in 1 convertible inverter split AC,(Triple Inverter Plus, Frost Self Clean)', + price:35490, + stars:4.5 +},{ + image:'Air-Conditioners/2/Lloyd.jpeg', + name:'Lloyd 2 Ton 3 star 5 in 1 Convertible Inverter split AC(PM 2.5 Filter, 4 way swing,Turbo Cool)', + price:50990, + stars:4 +},{ + image:'Air-Conditioners/3/Voltas.jpeg', + name:'Voltas 2 Ton 4-in-1 Convertible Inverter split AC, 243V Vectra Elegant (Dual temperature display, Dual protection filter, self diagnosis)', + price:51990, + stars:5 +}]; +productac.forEach((ac)=>{ + let starsHTML = ''; + if (Array.isArray(ac.stars)) { + starsHTML = ac.stars.map(() => + '' + ).join(''); + } + productHTML += ` +
+
+ +
+

${ac.name}

+
+

₹ ${ac.price}

+
+ ${starsHTML} +
+
+ +
+
+
+ `; +}); + +document.querySelector('.js-product-grid').innerHTML=productHTML; + + + var btnTestimonial =document.querySelectorAll(".indicator .btn"); var slide =document.getElementById("slide");