Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 190 additions & 0 deletions aparna/Etsy/data.JSON
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"categoryList": [
{
"title": "Seller's Sales Hub",
"img": ""
},
{ "title": "Jewellery & Accessories", "img": "" },
{ "title": "Clothing & Shoes", "img": "" },
{ "title": "Home & Living", "img": "" },
{ "title": "Wedding & Party", "img": "" },
{ "title": "Toys & Entertainment", "img": "" },
{ "title": "Art & Collectibles" },
{ "title": "Craft Supplies", "img": "" },
{
"title": "Gifts",
"img": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 5 22 12\" width=\"16\" height=\"12\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M5,6A1,1,0,0,0,4,7v3H5v9a1,1,0,0,0,1,1h5V6H5Z\"></path><path d=\"M19,6H13.007A4.245,4.245,0,0,0,14.97,3.744a1.614,1.614,0,0,0-2.65-1.375,1.757,1.757,0,0,0-.315.324,1.753,1.753,0,0,0-.315-0.324A1.615,1.615,0,0,0,9.042,3.746,4.257,4.257,0,0,0,11.006,6H13V20h5a1,1,0,0,0,1-1V10h1V7A1,1,0,0,0,19,6Z\"></path></svg>"
}
],
"discoverItems": [
{
"url": "https://i.etsystatic.com/17600118/c/1000/1000/0/11…/d077de/2325460652/il_300x300.2325460652_lhfz.jpg",
"text": "Wedding"
},
{
"url": "https://i.etsystatic.com/18077312/r/il/b10e09/2350226444/il_300x300.2350226444_odar.jpg",
"text": "Jewellery"
},
{
"url": "https://i.etsystatic.com/32501528/c/1518/1518/253/…/4bdfa0/3702738409/il_300x300.3702738409_qfmi.jpg",
"text": "Clothing"
},
{
"url": "https://i.etsystatic.com/16676438/c/2002/2002/449/…/89ea5d/1467855817/il_300x300.1467855817_ksv4.jpg",
"text": "Home & Living"
},
{
"url": "\thttps://i.etsystatic.com/30725321/r/il/a22d35/4016941798/il_300x300.4016941798_bruv.jpg",
"text": "Wall Art"
},
{
"url": "https://i.etsystatic.com/19220794/r/il/28ced3/2951466885/il_300x300.2951466885_1ly4.jpg",
"text": "Kitchen & Dining"
}
],
"clothCategory": [
{
"url": "https://i.etsystatic.com/22368382/r/il/006d21/4245808662/il_300x300.4245808662_a3x4.jpg",
"discount": "Up to 40% off on",
"clothText": "Women's Ethnic Clothing"
},
{
"url": "\thttps://i.etsystatic.com/32501528/c/1488/1488/0/0/…/23a5b4/3700725057/il_300x300.3700725057_szgj.jpg",
"discount": "Up to 40% off on",
"clothText": "Women's Western Clothing"
},
{
"url": "https://i.etsystatic.com/25566015/c/2003/2003/0/274/il/5b71e2/3196479462/il_300x300.3196479462_20xh.jpg",
"discount": "Up to 40% off on",
"clothText": "Men's Clothing"
},
{
"url": "https://i.etsystatic.com/38026977/r/il/f2c1ad/4277525816/il_300x300.4277525816_f4wp.jpg",
"discount": "Up to 40% off on",
"clothText": "Fashion Jewellery"
},
{
"url": "https://i.etsystatic.com/32501528/c/1757/1757/247/180/il/67dc01/4248212322/il_300x300.4248212322_psvv.jpg",
"discount": "Up to 40% off on",
"clothText": "Winter Clothing"
},
{
"url": "https://i.etsystatic.com/23528878/r/il/625e23/2589827894/il_300x300.2589827894_bi5a.jpg",
"discount": "Up to 40%",
"clothText": "Wedding Clothing"
}
],
"popularItems": [
{
"url": "https://i.etsystatic.com/35966576/c/1614/1283/669/…/e1510f/4033777789/il_340x270.4033777789_dqlw.jpg",
"title": "Birth Flower Jewelry Travel Case, Birth Month Flower Gift, Personalized Birthday Gift, Leather Jewelry Travel Case, Custom Jewelry Case",
"star": 1,
"reviews": 9536,
"symbol": "₹",
"actualPrice": 1711,
"discount": 50,
"videoURL": "",
"delivery": "",
"playButton": "",
"tooltipText": "Birth Flower Jewelry Travel Case, Birth Month Flower Gift, Personalized Birthday Gift, Leather Jewelry Travel Case,Custom Jewelry Case."
},
{
"url": "https://i.etsystatic.com/32477306/c/2000/1589/0/25…/0bcd64/3491080620/il_340x270.3491080620_oh18.jpg",
"title": "Dainty Name Necklace with Birth Flower, Personalized Name Necklace, Custom Gold Name Jewelry, Birthday Gift for Her, Bridesmaid Gift",
"star": 2.1,
"reviews": 13612,
"symbol": "₹",
"actualPrice": 3298,
"discount": 50,
"videoURL": "",
"delivery": "Free delivery",
"playButton": "",
"tooltipText": "Dainty Name Necklace with Birth Flower, Personalized Name NecKlace, Custom Gold Name Jewelry, Birthday Gift for Her, Bridesmaid Gift"
},
{
"url": "https://i.etsystatic.com/25168585/c/2500/1987/0/181/il/214e7e/4589233930/il_340x270.4589233930_dg79.jpg",
"title": "Custom Pet Portraits Using Pet Photo Personalized Digital Dog portraits Cat Portraits Custom Pet Art Pet Drawing",
"star": 3.8,
"reviews": 11164,
"symbol": "₹",
"actualPrice": 1277,
"discount": 40,
"videoURL": "https://v-cg.etsystatic.com/video/upload/ac_none,du_15,q_auto:good/PAINT_PORTRAIT_ETSY_VIDEO_vo9waf.mp4",
"delivery": "",
"playButton": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><polygon points=\"4 4 4 20 20 12 4 4\"></polygon></svg>",
"tooltipText": "Personalised Song Plaque with stand, Any Playlist Photo/song, Photo and Music Gift, Music Prints."
},
{
"url": "https://i.etsystatic.com/28045281/r/il/3f41fa/3897994052/il_340x270.3897994052_l8xd.jpg",
"title": "Sun Catcher/ Crystal suncatcher/ Crystal Rainbow marker/ Aurora gemstone suncatcher/ crystal prism/ wall hanging/ Home decor/ Gift 4 women",
"star": 5,
"reviews": 6879,
"symbol": "₹",
"actualPrice": 2653,
"discount": 10,
"videoURL": "https://v-cg.etsystatic.com/video/upload/ac_none,du_15,q_auto:good/Purple1_aal8ie.mp4",
"delivery": "FREE delivery",
"playButton": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><polygon points=\"4 4 4 20 20 12 4 4\"></polygon></svg>",
"tooltipText": "Handmade Damascus Pocket Knife Rose Wood Handke Birthday Gift Folding knife Groomsmen Gift Anniversary Wedding Personalized Gift for Men"
},
{
"url": "\thttps://i.etsystatic.com/27890741/c/2343/1862/320/…/31a0dd/4028709894/il_340x270.4028709894_i6tr.jpg",
"title": "Heart Keychain Set - Made with Authentic LEGO® Bricks, Matching keychains, Gift Set for Couples, Best Friends - Very High Quality & DURABLE",
"star": 5,
"reviews": 12411,
"symbol": "₹",
"actualPrice": 1453,
"discount": 50,
"videoURL": "https://v-cg.etsystatic.com/video/upload/ac_none,du_15,q_auto:good/HFF_Hearts_Video_m6nj4t.mp4",
"delivery": "",
"playButton": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><polygon points=\"4 4 4 20 20 12 4 4\"></polygon></svg>",
"tooltipText": "Heart KeyChain set-Made with Authentic LEGO Bricks, Matching Keychains, Gift Set for couples,Best Friends-Very High Quality & Durable"
},
{
"url": "https://i.etsystatic.com/26694795/c/2445/1943/282/…/035b01/3254592822/il_340x270.3254592822_5dss.jpg",
"title": "Handmade Damascus Pocket Knife Rose Wood Handle Birthday Gift Folding Knife Groomsmen Gift Anniversary Wedding Personalized Gift for Men",
"star": 5,
"reviews": 6256,
"symbol": "₹",
"actualPrice": 8219,
"discount": 70,
"videoURL": "https://v-cg.etsystatic.com/video/upload/ac_none,du_15,q_auto:good/PB-42_convert-video-online.com_cfle3f.mp4",
"delivery": "",
"playButton": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><polygon points=\"4 4 4 20 20 12 4 4\"></polygon></svg>"
}
],
"whatEtsyDo": [
{
"title": "A Community doing good",
"content": " Etsy is a global online marketplace, where people come together to make, sell, buy and collect unique items. We're also a community pushing for positive change for small businesses, people, and the planet.",
"contentPart": "Here are some of the ways we're making a positive impact together."
},
{
"title": "Support independent creators",
"content": "There's no Etsy warehouse-just millions of people selling the things they love. We make the whole process easy, helping you connect directly with makers to find something extraordinary",
"contentPart": ""
},
{
"title": "Peace of mind",
"content": "Your privacy is the highest priority of our dedicated team. And if you ever need assistance, we are always ready to step in for support",
"contentPart": ""
}
],
"socialIcons": [
{
"icon": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" width=\"36\" height=\"36\"><path d=\"M12,5.447c2.136,0,2.389,0.008,3.233,0.047c0.78,0.036,1.204,0.166,1.485,0.275c0.373,0.145,0.64,0.318,0.92,0.598 c0.28,0.28,0.453,0.546,0.598,0.92c0.11,0.282,0.24,0.706,0.275,1.485c0.038,0.844,0.047,1.097,0.047,3.233 s-0.008,2.389-0.047,3.233c-0.036,0.78-0.166,1.204-0.275,1.485c-0.145,0.373-0.318,0.64-0.598,0.92 c-0.28,0.28-0.546,0.453-0.92,0.598c-0.282,0.11-0.706,0.24-1.485,0.275c-0.843,0.038-1.096,0.047-3.233,0.047 s-2.389-0.008-3.233-0.047c-0.78-0.036-1.204-0.166-1.485-0.275c-0.373-0.145-0.64-0.318-0.92-0.598 c-0.28-0.28-0.453-0.546-0.598-0.92c-0.11-0.282-0.24-0.706-0.275-1.485c-0.038-0.844-0.047-1.097-0.047-3.233 S5.45,9.616,5.488,8.773c0.036-0.78,0.166-1.204,0.275-1.485c0.145-0.373,0.318-0.64,0.598-0.92c0.28-0.28,0.546-0.453,0.92-0.598 c0.282-0.11,0.706-0.24,1.485-0.275C9.611,5.455,9.864,5.447,12,5.447 M12,4.005c-2.173,0-2.445,0.009-3.298,0.048 C7.85,4.092,7.269,4.227,6.76,4.425C6.234,4.63,5.787,4.903,5.343,5.348C4.898,5.793,4.624,6.239,4.42,6.765 c-0.198,0.509-0.333,1.09-0.372,1.942C4.009,9.56,4,9.833,4,12.005c0,2.173,0.009,2.445,0.048,3.298 c0.039,0.852,0.174,1.433,0.372,1.942c0.204,0.526,0.478,0.972,0.923,1.417c0.445,0.445,0.891,0.718,1.417,0.923 c0.509,0.198,1.09,0.333,1.942,0.372c0.853,0.039,1.126,0.048,3.298,0.048s2.445-0.009,3.298-0.048 c0.852-0.039,1.433-0.174,1.942-0.372c0.526-0.204,0.972-0.478,1.417-0.923c0.445-0.445,0.718-0.891,0.923-1.417 c0.198-0.509,0.333-1.09,0.372-1.942C19.991,14.45,20,14.178,20,12.005s-0.009-2.445-0.048-3.298 c-0.039-0.852-0.174-1.433-0.372-1.942c-0.204-0.526-0.478-0.972-0.923-1.417c-0.445-0.445-0.891-0.718-1.417-0.923 c-0.509-0.198-1.09-0.333-1.942-0.372C14.445,4.014,14.173,4.005,12,4.005L12,4.005z\" fill=\"#FFFFFF\"></path><path d=\"M12,7.897c-2.269,0-4.108,1.839-4.108,4.108S9.731,16.113,12,16.113s4.108-1.839,4.108-4.108S14.269,7.897,12,7.897z M12,14.672c-1.473,0-2.667-1.194-2.667-2.667S10.527,9.339,12,9.339s2.667,1.194,2.667,2.667S13.473,14.672,12,14.672z\" fill=\"#FFFFFF\"></path><circle cx=\"16.27\" cy=\"7.735\" r=\"0.96\" fill=\"#FFFFFF\"></circle></svg>"
},
{
"icon": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" width=\"36\" height=\"36\"><path d=\"M20,5V19a1.007,1.007,0,0,1-1,1H15V13.776h2l0.336-2.3H15V9.659a0.912,0.912,0,0,1,1-1.031h1.5V6.55a11.284,11.284,0,0,0-1.641-.109c-2.2,0-3.3,1.219-3.3,3.039v1.992h-2v2.3h2V20H5a1.007,1.007,0,0,1-1-1V5A1.007,1.007,0,0,1,5,4H19A1.007,1.007,0,0,1,20,5Z\" fill=\"#FFFFFF\"></path></svg>"
},
{
"icon": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" width=\"36\" height=\"36\"><path d=\"M12 3c-4.97 0-9 4.03-9 9 0 3.813 2.372 7.072 5.72 8.384-.08-.712-.15-1.807.03-2.585.164-.703 1.056-4.475 1.056-4.475s-.27-.54-.27-1.336c0-1.252.726-2.187 1.63-2.187.768 0 1.14.577 1.14 1.268 0 .773-.493 1.928-.746 2.998-.212.896.45 1.626 1.333 1.626 1.6 0 2.83-1.687 2.83-4.12 0-2.156-1.55-3.663-3.76-3.663-2.56 0-4.064 1.922-4.064 3.907 0 .773.297 1.603.67 2.054.073.09.083.168.06.26-.067.283-.22.895-.25 1.02-.038.165-.13.2-.3.12-1.124-.523-1.827-2.167-1.827-3.487 0-2.84 2.063-5.446 5.947-5.446 3.122 0 5.548 2.225 5.548 5.198 0 3.102-1.956 5.598-4.67 5.598-.912 0-1.77-.474-2.063-1.033l-.56 2.14c-.204.78-.753 1.76-1.12 2.358.842.26 1.737.402 2.665.402 4.97 0 9-4.03 9-9s-4.03-9-9-9\" fill=\"#FFFFFF\"></path></svg>"
},
{
"icon": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" width=\"36\" height=\"36\"><path d=\"M18.3,8.559V9.007a9.666,9.666,0,0,1-9.729,9.737,9.614,9.614,0,0,1-5.256-1.394,5.367,5.367,0,0,0,.814.057,6.906,6.906,0,0,0,4.245-1.621,3.412,3.412,0,0,1-3.186-2.379,3.339,3.339,0,0,0,1.548-.058A3.419,3.419,0,0,1,3.988,9.993V9.952a3.427,3.427,0,0,0,1.548.424A3.407,3.407,0,0,1,4,7.54a3.261,3.261,0,0,1,.465-1.662A9.729,9.729,0,0,0,11.517,9.39a3.588,3.588,0,0,1-.073-0.79,3.408,3.408,0,0,1,3.414-3.414,3.542,3.542,0,0,1,2.518,1.075,6.837,6.837,0,0,0,2.159-.831,3.391,3.391,0,0,1-1.507,1.9A6.657,6.657,0,0,0,20,6.782,6.927,6.927,0,0,1,18.3,8.559Z\" fill=\"#FFFFFF\"></path></svg>"
},
{
"icon": "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" width=\"36\" height=\"36\"><path d=\"M20,12c0,5.664,0,5.664-8,5.664s-8,0-8-5.664,0-5.664,8-5.664S20,6.333,20,12Zm-5,0L10,9v6Z\" fill=\"#FFFFFF\"></path></svg>"
}
]
}
Binary file added aparna/Etsy/fonts/Graphik-Medium-Web.woff2
Binary file not shown.
Binary file added aparna/Etsy/fonts/Graphik-Regular-Web.woff2
Binary file not shown.
Binary file added aparna/Etsy/fonts/Guardian-EgypTT-Light.woff2
Binary file not shown.
67 changes: 67 additions & 0 deletions aparna/Etsy/functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
const createNavBar = (divID, cList, elmType, itemClassName) => {
const div = document.querySelector(divID);
for (let i = 0; i < cList.length; i++) {
const listOfCategory = document.createElement(elmType);
listOfCategory.classList.add(itemClassName);
if (cList[i].hasOwnProperty("img") && cList[i].img != "") {
listOfCategory.innerHTML = cList[i].img + cList[i].title;
} else {
listOfCategory.innerHTML = cList[i].title;
}

div.appendChild(listOfCategory);
}
};

function clearPopularContainer() {
const popular = document.querySelector(".popular-sub-container");
popular.innerHTML = "";
}

function createDropdowns(){
const dropDownBoxes = document.querySelectorAll(".drop-downs");
const chevronIcon = document.querySelectorAll(".chevron-icon");
const dropBoxes = document.querySelectorAll(".dropBox");
dropDownBoxes.forEach((item, i) => {
item.addEventListener("click", () => {
dropBoxes[i].classList.toggle("active");
chevronIcon[i].classList.toggle("rotation");
});
});
}


function toFilterPrice(pItems) {
const filterBtn = document.querySelector(".filter");
const priceInput = document.querySelector(".price-input");
priceInput.setAttribute("type", "number");

filterBtn.addEventListener("click", () => {
const filteredValue = pItems.filter((items, i) => {
const price = Math.floor(
items.actualPrice - items.actualPrice * (items.discount / 100)
);

return price >= Number(priceInput.value);
});

clearPopularContainer();
generatePopularContainer(filteredValue);
console.log(filteredValue);
});

}

const createSocialIcons = (icons) => {
const iconsContainer = document.querySelector(".icons-container");
for (let i = 0; i < icons.length; i++) {
const iconsList = document.createElement("li");
iconsList.classList.add("icons-list");
iconsContainer.appendChild(iconsList);
iconsList.innerHTML = icons[i].icon;
}
};

export{
createNavBar,clearPopularContainer,createDropdowns,toFilterPrice,createSocialIcons
}
Loading