// HOME v2.0 // Mock data used to populate each section of cards // array of food choices const foodData = [ { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37000', img: 'imgs/food/taco-bell-logo.png', name: 'Taco Bell', discount: 'Free Crunch Wrap Sumpreme.', views: 260}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37034', img: 'imgs/food/samsclub.png', name: 'Sams Club', discount: 'Sales and Clearance Savings', views: 1646}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37002', img: 'imgs/food/pizza-hut-logo.png', name: 'Pizza Hut', discount: 'Earn Free Pizza Fast Join Pizza Hut Now.', views: 1146}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=941', img: 'imgs/eoc.png', name: 'EOC Pizza', discount: 'Free $ 10.00 Gift Certificate', views: 1102}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=898', img: 'imgs/subway.png', name: 'Subway', discount: 'BOGO Free 6 In ', views: 802} /*, { img: 'imgs/food/mcdonalds-logo2.png', name: "McDonald's", discount: '$2 off any combo meal.', views: 1400}, { img: 'imgs/food/checkers-logo.png', name: 'Checkers', discount: '20% off $20 or more.', views: 62}, { img: 'imgs/food/dominos-logo.png', name: "Domino's", discount: '15% off of your next delivery.', views: 600}, { url: 'https://www.ibm.com', img: 'imgs/food/culvers-logo.png', name: "Culver's", discount: '15% off your next purchase.', views: 100}, { img: 'imgs/food/bk-logo2.jpg', name: 'Burger King', discount: 'Free medium fry with purchase of a sandwich.', views: 1000}, { img: 'imgs/food/papa-johns-logo.png', name: "Papa John's", discount: 'Your choice of wings or breadsticks with next delivery.', views: 1274}, { img: 'imgs/food/hooters-logo2.png', name: 'Hooters', discount: 'One free order of wings on your next visit.', views: 546} */ ]; // array of fashion choices const fashionData = [ /* { img: 'imgs/fashion/puma-logo.png', name: 'Puma', discount: '25% off your second pair, and free set of colored laces.', views: 1276}, { img: 'imgs/fashion/adidas-logo.png', name: 'Adidas', discount: 'Free set of colored laces, and 10% off your next purchase.', views: 1576}, { img: 'imgs/fashion/skechers-logo.png', name: 'Skechers', discount: 'Buy one pair get a second pair 15% off.', views: 346}, { img: 'imgs/fashion/nike-logo.png', name: 'Nike', discount: '46% off your first purchase.', views: 2546}, { img: 'imgs/fashion/earthbound-logo.png', name: 'Earthbound Trading Company', discount: '15% purchases over $50.', views: 146}, { img: 'imgs/fashion/pacsun-logo.png', name: 'PacSun', discount: '15% total purchase.', views: 154}, { img: 'imgs/fashion/peltz-shoes-logo.jpg', name: 'Peltz Shoes', discount: 'Whisper Galvin, and get 10% off.', views: 384}, { img: 'imgs/fashion/journeys-logo.png', name: 'Journeys', discount: '25% off your second pair of shoes.', views: 276} */ { url: 'https://yoursocialoffers.com/fbe/0/34826/0/showOffer', img: 'imgs/candaSherpa.png', name: 'Canada Weather Gear', discount: 'Mens Sherpa Lined Jacket for $27', views: 1576} ]; // array of auto choices const autoData = [ { url: 'https://yoursocialoffers.com/fbe/0/35776/0/showOffer', img: 'imgs/tire.png', name: 'Tire Inflator', discount: '41% OFF', views: 2204} /* { img: 'imgs/auto/firestone-logo.png', name: 'Firestone Auto Care', discount: 'Free tire rotation.', views: 672}, { img: 'imgs/auto/take-5-logo.png', name: 'Take 5 Oil Change', discount: 'Free windshield wipers with next oil change.', views: 285}, { img: 'imgs/auto/tires-plus-logo.png', name: 'Tires Plus', discount: '50% your next oil change with coupon.', views: 1835}, { img: 'imgs/auto/aamco-logo.png', name: 'AAmco Transmissions', discount: '15% total repair bill with coupon.', views: 549}, { img: 'imgs/auto/advanced-auto-logo.png', name: 'Advanced Auto Parts', discount: '10% off 1 year waranty with new battery purchase.', views: 426} */ ]; // array of fun choices const funData = [ { url: 'https://yoursocialoffers.com/fbe/0/35752/0/showOffer', img: 'imgs/rcboat.png', name: 'RC Boat', discount: '51% OFF', views: 2334} /* { img: 'imgs/fun/amc-logo.png', name: 'AMC Theaters', discount: 'Free large popcorn with purchase of 2 tickets.', views: 862}, { img: 'imgs/fun/congo-logo.png', name: 'Congo River Golf', discount: 'Your next round is free.', views: 385}, { img: 'imgs/fun/netflix-logo.png', name: 'Netflix', discount: 'First month after 30 day trial is free.', views: 2535}, { img: 'imgs/fun/top-golf-logo.png', name: 'Top Golf', discount: '25% off total bill with a party of 4 or more.', views: 1865}, { img: 'imgs/fun/adventure-island-logo.png', name: 'Adventure Island', discount: '25% off admission with proof of residence.', views: 2535}, { img: 'imgs/fun/busch-gardens-logo.png', name: 'Busch Gardens', discount: '25% off admission with proof of residence.', views: 3425}, { img: 'imgs/fun/universal-studios-logo.png', name: 'Universal Studios', discount: '15% off admission with proof of residence.', views: 1234} */ ]; // array of health choices const healthData = [ { url: 'https://yoursocialoffers.com/fbe/0/33074/0/showOffer', img: 'imgs/nutClass.png', name: 'Nutrition Class', discount: '48% OFF', views: 1524} /* { img: 'imgs/health/crunch-fitness-logo.png', name: 'Crunch Fitness', discount: 'Your first month is free when you join.', views: 734}, { img: 'imgs/health/planet-fitness-logo.png', name: 'Planet Fitness', discount: '$0 down payment when you join.', views: 1234}, { img: 'imgs/health/youfit-logo.png', name: 'Youfit Health Clubs', discount: '$0 down payment when you join.', views: 234}, { img: 'imgs/health/natures-logo.png', name: "Nature's Food Patch", discount: 'Free small smoothie on your next visit to The Patch.', views: 934}, { img: 'imgs/health/whole-foods-logo.png', name: 'Whole Foods Market', discount: '30% off total when you spend $100 or more.', views: 751} */ ]; // array of tech choices const techData = [ { url: 'https://yoursocialoffers.com/fbe/0/37028/0/showOffer', img: 'imgs/Apple.png', name: 'Apple', discount: 'Specials for Back to School', views: 987}, { url: 'https://yoursocialoffers.com/fbe/0/37030/0/showOffer', img: 'imgs/Lenovo-Partner-Logo.png', name: 'Lenovo', discount: 'Door Buster Sales', views: 844}, { url: 'https://yoursocialoffers.com/fbe/0/29106/0/showOffer', img: 'imgs/yupinVideoDoorbellCamera.png', name: 'Doorbell Camera', discount: '53% Off', views: 134}, { url: 'https://yoursocialoffers.com/fbe/0/35663/0/showOffer', img: 'imgs/MJXBug.png', name: 'MJX Bugs 7 B7', discount: '60% OFF', views: 114}, { url: 'https://yoursocialoffers.com/fbe/0/684/0/showOffer', img: 'imgs/bitcoinMachine.png', name: 'Bitcoin Machine', discount: 'Find Location Near You', views: 340}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37001', img: 'imgs/tech/micro-center-logo.png', name: 'Micro Center Computers', discount: 'Microcenter deals and savings.', views: 1034} ]; // array of featured choices const featuredData = [ { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37035', img: 'imgs/swpain.png', name: 'Sherwood-Williams', discount: '$ 10.00 off any order over $ 50.00', views: 1534}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37032', img: 'imgs/Walgreens-logo.png', name: 'Walgreens', discount: 'Weekly Deals and Clearance Sales', views: 1678}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37029', img: 'imgs/chewy.png', name: 'Chewy', discount: 'Savings on Pet Supplies', views: 1247}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37027', img: 'imgs/belk.png', name: 'Belk', discount: '75 % Off Doorbuster Sales', views: 1687}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37026', img: 'imgs/joann.png', name: 'Joann', discount: 'Looking for our Coupon Specials', views: 1774}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37022', img: 'imgs/budget.png', name: 'Budget Car Rental', discount: 'Special Discounts on Car Rentals with Budget', views: 1842}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37020', img: 'imgs/Michaels.png', name: 'Michaels', discount: '20% off all regular priced items', views: 1987}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37019', img: 'imgs/Walmart.png', name: 'Walmaet', discount: 'Join our rewards program and Save', views: 1577}, { url: 'https://yoursocialoffers.com/fbe/0/29106/0/showOffer', img: 'imgs/yupinVideoDoorbellCamera.png', name: 'Youpin Dlingsmart Doorbell Camera', discount: '53% Off + Free Shipping', views: 1134}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=37000', img: 'imgs/food/taco-bell-logo.png', name: 'Taco Bell', discount: 'Free Crunch Wrap Sumpreme.', views: 260} ]; // array of ads for banner const bannerAds = [ { url: 'https://yoursocialoffers.com/showOffer.php?coupon=36997', img: 'imgs/food/bk-logo2.jpg'}, { url: 'https://yoursocialoffers.com/showOffer.php?coupon=36998', img: 'imgs/food/mcdonalds-logo2.png'} /* { img: 'imgs/food/dominos-logo.png'}, { img: 'imgs/food/hooters-logo2.png'}, { img: 'imgs/fashion/adidas-logo.png'}, { img: 'imgs/fashion/skechers-logo.png'}, { img: 'imgs/fashion/earthbound-logo.png'}, { img: 'imgs/auto/firestone-logo.png'}, { img: 'imgs/auto/aamco-logo.png'}, { img: 'imgs/auto/advanced-auto-logo.png'}, { img: 'imgs/fun/amc-logo.png'}, { img: 'imgs/fun/top-golf-logo.png'}, { img: 'imgs/health/planet-fitness-logo.png'}, { img: 'imgs/health/youfit-logo.png'}, { img: 'imgs/tech/micro-center-logo.png'}, { img: 'imgs/tech/google-play-logo.png'}, { img: 'imgs/tech/apple-store-logo.png'} */ ]; // new array of merged arrays data, used to paginate everything const allArrays = [ ...foodData, ...fashionData, ...autoData, ...funData, ...healthData, ...techData ]; // new array of most popular cards based on views, change the number below for a different range of cards const popularData = allArrays.filter(list => list.views >= 1500); // switch with code block below for all ads // new array of data images used to populate the banner ad slideshow const adImages = []; const result = bannerAds.map(ad => { adImages.push(ad.img); }); // uncomment to use all images // const adImages = []; // allData.map(ads => { // const result = ads.map(ad => { // adImages.push(ad.img); // }); // });