diff --git a/atlas.html b/atlas.html index c0db563..865aaf6 100644 --- a/atlas.html +++ b/atlas.html @@ -16,42 +16,14 @@
-
@@ -61,7 +33,9 @@
- + + + diff --git a/crafter.html b/crafter.html index c171825..e3d8845 100644 --- a/crafter.html +++ b/crafter.html @@ -9,47 +9,21 @@ - + WynnCrafter
-
@@ -240,6 +214,8 @@ + + diff --git a/customizer.html b/customizer.html index 219aa0f..efd352e 100644 --- a/customizer.html +++ b/customizer.html @@ -16,40 +16,14 @@
-
@@ -1899,6 +1873,8 @@ + + diff --git a/customwide.css b/customwide.css index 74aeb1f..72cdbe6 100644 --- a/customwide.css +++ b/customwide.css @@ -36,9 +36,6 @@ margin-bottom: 5px; padding-bottom: 5px; } -.button { - padding: 2%; -} .sticky-box { position: -webkit-sticky; /* Safari */ position: sticky; diff --git a/display.js b/display.js index d3ee2c6..744e1e4 100644 --- a/display.js +++ b/display.js @@ -629,7 +629,7 @@ function displayExpandedItem(item, parent_id){ active_elem.appendChild(p_elem); let img = document.createElement("img"); if (item && item.has("type")) { - img.src = "/media/items/generic-" + item.get("type") + ".png"; + img.src = "./media/items/" + (newIcons ? "new/":"old/") + "generic-" + item.get("type") + ".png"; } img.alt = item.get("type"); img.style = " z=index: 1;max-width: 64px; max-height: 64px; position: relative; top: 50%; transform: translateY(-50%);"; diff --git a/icons.js b/icons.js new file mode 100644 index 0000000..5f05c57 --- /dev/null +++ b/icons.js @@ -0,0 +1,34 @@ +//which icons to use +let window_storage = window.localStorage; +console.log(window_storage); +icon_state_stored = window_storage.getItem("newicons"); +newIcons = true; +if (icon_state_stored === "false") {toggleIcons()} + +/** Toggle icons on the ENTIRE page. + * + */ +function toggleIcons() { + newIcons = !newIcons; + let imgs = document.getElementsByTagName("IMG"); + let favicon = document.querySelector("link[rel~='icon']"); + let toggleiconbutton = document.getElementById("toggle-icon-button"); + + if (newIcons) { //switch to new + favicon.href = favicon.href.replace("media/icons/old","media/icons/new"); + for (const img of imgs) { + if (img.src.includes("media/icons/old")) {img.src = img.src.replace("media/icons/old","media/icons/new");} + if (img.src.includes("media/items/old")) {img.src = img.src.replace("media/items/old","media/items/new");} + } + toggleiconbutton.textContent = "Use Old Icons"; + window_storage.setItem("newicons","true"); + } else { //switch to old + favicon.href = favicon.href.replace("media/icons/new","media/icons/old"); + for (const img of imgs) { + if (img.src.includes("media/icons/new")) {img.src = img.src.replace("media/icons/new","media/icons/old");} + if (img.src.includes("media/items/new")) {img.src = img.src.replace("media/items/new","media/items/old");} + } + toggleiconbutton.textContent = "Use New Icons"; + window_storage.setItem("newicons","false"); + } +} \ No newline at end of file diff --git a/index.html b/index.html index 0eef43e..26d097e 100644 --- a/index.html +++ b/index.html @@ -12,41 +12,16 @@ - + WynnBuilder
-
@@ -1009,6 +983,8 @@ + + diff --git a/item.html b/item.html index 65df594..e7cdeb5 100644 --- a/item.html +++ b/item.html @@ -19,39 +19,14 @@
-
@@ -73,6 +48,8 @@ + + diff --git a/items.html b/items.html index 75de044..2268af1 100644 --- a/items.html +++ b/items.html @@ -13,46 +13,21 @@ - + Wynn Clientside
-
- - - -
WynnBuilder
-
- - - -
WynnCrafter
-
- - - -
WynnAtlas
-
- - - -
WynnCustom
-
- - - -
WynnGPS
-
+
-
+
-
+
@@ -147,6 +122,8 @@
+ + diff --git a/items_2.html b/items_2.html index 27fd286..75a4b41 100644 --- a/items_2.html +++ b/items_2.html @@ -7,45 +7,20 @@ - + WynnAtlas
-
- - - -
WynnBuilder
-
- - - -
WynnCrafter
-
- - - -
WynnAtlas
-
- - - -
WynnCustom
-
- - - -
WynnGPS
-
+
-
+
-
+
@@ -84,6 +59,8 @@
+ + diff --git a/items_2_help.html b/items_2_help.html index 2fcd8cc..384d0ec 100644 --- a/items_2_help.html +++ b/items_2_help.html @@ -7,40 +7,21 @@ - + WynnAtlas
-
@@ -227,5 +208,7 @@ docsFns.append(genDocEntry(entry[0], entry[1], null, entry[2])); } + + diff --git a/loadheader.js b/loadheader.js new file mode 100644 index 0000000..4b80206 --- /dev/null +++ b/loadheader.js @@ -0,0 +1,77 @@ +/* + +
+ +
+*/ +let header_icon_map = new Map([ + ["index",["builder","WynnBuilder"]], + ["crafter",["crafter","WynnCrafter"]], + ["items",["searcher","WynnAtlas"]], + ["customizer",["custom","WynnCustom"]], + ["map",["compass","WynnGPS"]] +]); + +function setHeaders() { + let headerleft = document.getElementById("headerleft"); + let headerright = document.getElementById("headerright"); + + for (const [name,data] of header_icon_map) { + let a_elem = document.createElement("a"); + let img = document.createElement("img"); + let div = document.createElement("div"); + a_elem.classList.add("nomarginp"); + a_elem.classList.add("iconlink"); + a_elem.classList.add("tooltip"); + a_elem.href = "./" + name + ".html"; + img.classList.add("left"); + img.classList.add("linkoptions"); + img.classList.add("headericon"); + img.src = "/media/icons/new/" + data[0] + ".png"; + div.classList.add("tooltiptext"); + div.classList.add("center"); + div.textContent = data[1]; + a_elem.appendChild(img); + a_elem.appendChild(div); + headerleft.appendChild(a_elem); + } + + let toggle_icon_button = document.createElement("button"); + toggle_icon_button.classList.add("button"); + toggle_icon_button.id = "toggle-icon-button"; + toggle_icon_button.onclick = function() {toggleIcons()}; + toggle_icon_button.textContent = "Use Old Icons"; + headerright.appendChild(toggle_icon_button); + console.log("Set Header"); +} + + +setHeaders(); \ No newline at end of file diff --git a/map.html b/map.html index d2ed4b1..99b648c 100644 --- a/map.html +++ b/map.html @@ -13,7 +13,7 @@ - + @@ -29,40 +29,14 @@
-
@@ -82,12 +56,12 @@

Z

- +

- +

@@ -122,13 +96,13 @@ + + diff --git a/map.js b/map.js index e02e5fa..19d3abc 100644 --- a/map.js +++ b/map.js @@ -139,10 +139,10 @@ function placeMarker(lat, lng) { } marker = L.marker([lat, lng], {icon: L.icon({ - iconUrl: '/media/icons/marker.png', + iconUrl: '/media/icons/' + (newIcons ? "new/" : "old/" ) + 'marker.png', iconSize: [32, 32], iconAnchor: [16, 32], - shadowUrl: '/media/icons/shadow.png', + shadowUrl: '/media/icons/' + (newIcons ? "new/" : "old/" ) + 'shadow.png', shadowSize: [1,1], shadowAnchor: [16, 32], className: "marker" @@ -391,10 +391,10 @@ function toggleResources() { let imgBounds = [ [ TRcorner[0]-(16*n)-20-gap*n,TRcorner[1]+4], [ TRcorner[0]-(16*n)-4-gap*n,TRcorner[1]+20] ]; imgBounds = [xytolatlng(imgBounds[0][0],imgBounds[0][1]), xytolatlng(imgBounds[1][0],imgBounds[1][1])]; - let resourceObj = L.imageOverlay("/media/icons/"+resource+".png", imgBounds, {className: `${resource} resourceimg`}).addTo(map); + let resourceObj = L.imageOverlay("/media/icons/" + (newIcons ? "new/" : "old/" ) +resource+".png", imgBounds, {className: `${resource} resourceimg`}).addTo(map); resourceObjs.push(resourceObj); } - let gearObj = L.imageOverlay("/media/icons/Gears.png", [xytolatlng(TRcorner[0]-(16*terr_resources.length)-20-gap*terr_resources.length,TRcorner[1]+4), xytolatlng(TRcorner[0]-(16*terr_resources.length)-4-gap*terr_resources.length,TRcorner[1]+20)], {className: `Ore resourceimg`}).addTo(map); + let gearObj = L.imageOverlay("/media/icons/" + (newIcons ? "new/" : "old/" ) + "Gears.png", [xytolatlng(TRcorner[0]-(16*terr_resources.length)-20-gap*terr_resources.length,TRcorner[1]+4), xytolatlng(TRcorner[0]-(16*terr_resources.length)-4-gap*terr_resources.length,TRcorner[1]+20)], {className: `Ore resourceimg`}).addTo(map); resourceObjs.push(gearObj); //draw resource storage for (const n in terr_storage) { @@ -403,10 +403,10 @@ function toggleResources() { let imgBounds = [ [ DRcorner[0]-(16*n)-20-gap*n,DRcorner[1]-20], [ DRcorner[0]-(16*n)-4-gap*n,DRcorner[1]-4] ]; imgBounds = [xytolatlng(imgBounds[0][0],imgBounds[0][1]), xytolatlng(imgBounds[1][0],imgBounds[1][1])]; - let resourceObj = L.imageOverlay("/media/icons/"+storage+".png", imgBounds, {alt: `${storage}`, className: `${storage} resourceimg`}).addTo(map); + let resourceObj = L.imageOverlay("/media/icons/" + (newIcons ? "new/" : "old/" ) +storage+".png", imgBounds, {alt: `${storage}`, className: `${storage} resourceimg`}).addTo(map); resourceObjs.push(resourceObj); } - let chestObj = L.imageOverlay("/media/icons/Chest.png", [xytolatlng(DRcorner[0]-(16*terr_storage.length)-20-gap*terr_storage.length,DRcorner[1]-20), xytolatlng(DRcorner[0]-(16*terr_storage.length)-4-gap*terr_storage.length,DRcorner[1]-4)], {className: `Wood resourceimg`}).addTo(map); + let chestObj = L.imageOverlay("/media/icons/" + (newIcons ? "new/" : "old/" ) + "Chest.png", [xytolatlng(DRcorner[0]-(16*terr_storage.length)-20-gap*terr_storage.length,DRcorner[1]-20), xytolatlng(DRcorner[0]-(16*terr_storage.length)-4-gap*terr_storage.length,DRcorner[1]-4)], {className: `Wood resourceimg`}).addTo(map); resourceObjs.push(chestObj); } diff --git a/media/icons/Chest.png b/media/icons/new/Chest.png similarity index 100% rename from media/icons/Chest.png rename to media/icons/new/Chest.png diff --git a/media/icons/Crops.png b/media/icons/new/Crops.png similarity index 100% rename from media/icons/Crops.png rename to media/icons/new/Crops.png diff --git a/media/icons/Emeralds.png b/media/icons/new/Emeralds.png similarity index 100% rename from media/icons/Emeralds.png rename to media/icons/new/Emeralds.png diff --git a/media/icons/Fish.png b/media/icons/new/Fish.png similarity index 100% rename from media/icons/Fish.png rename to media/icons/new/Fish.png diff --git a/media/icons/Gears.png b/media/icons/new/Gears.png similarity index 100% rename from media/icons/Gears.png rename to media/icons/new/Gears.png diff --git a/media/icons/Ore.png b/media/icons/new/Ore.png similarity index 100% rename from media/icons/Ore.png rename to media/icons/new/Ore.png diff --git a/media/icons/Wood.png b/media/icons/new/Wood.png similarity index 100% rename from media/icons/Wood.png rename to media/icons/new/Wood.png diff --git a/media/icons/atlas64.png b/media/icons/new/atlas64.png old mode 100755 new mode 100644 similarity index 100% rename from media/icons/atlas64.png rename to media/icons/new/atlas64.png diff --git a/media/icons/builder.png b/media/icons/new/builder.png similarity index 100% rename from media/icons/builder.png rename to media/icons/new/builder.png diff --git a/media/icons/compass.png b/media/icons/new/compass.png similarity index 100% rename from media/icons/compass.png rename to media/icons/new/compass.png diff --git a/media/icons/compass2.png b/media/icons/new/compass2.png similarity index 100% rename from media/icons/compass2.png rename to media/icons/new/compass2.png diff --git a/media/icons/crafter.png b/media/icons/new/crafter.png similarity index 100% rename from media/icons/crafter.png rename to media/icons/new/crafter.png diff --git a/media/icons/cursor.png b/media/icons/new/cursor.png similarity index 100% rename from media/icons/cursor.png rename to media/icons/new/cursor.png diff --git a/media/icons/custom.png b/media/icons/new/custom.png similarity index 100% rename from media/icons/custom.png rename to media/icons/new/custom.png diff --git a/media/icons/marker.png b/media/icons/new/marker.png similarity index 100% rename from media/icons/marker.png rename to media/icons/new/marker.png diff --git a/media/icons/marker2.png b/media/icons/new/marker2.png similarity index 100% rename from media/icons/marker2.png rename to media/icons/new/marker2.png diff --git a/media/icons/searcher.png b/media/icons/new/searcher.png similarity index 100% rename from media/icons/searcher.png rename to media/icons/new/searcher.png diff --git a/media/icons/shadow.png b/media/icons/new/shadow.png similarity index 100% rename from media/icons/shadow.png rename to media/icons/new/shadow.png diff --git a/media/icons/old/Chest.png b/media/icons/old/Chest.png new file mode 100644 index 0000000..846faa9 Binary files /dev/null and b/media/icons/old/Chest.png differ diff --git a/media/icons/old/Crops.png b/media/icons/old/Crops.png new file mode 100644 index 0000000..d978b29 Binary files /dev/null and b/media/icons/old/Crops.png differ diff --git a/media/icons/old/Emeralds.png b/media/icons/old/Emeralds.png new file mode 100644 index 0000000..8ba6534 Binary files /dev/null and b/media/icons/old/Emeralds.png differ diff --git a/media/icons/old/Fish.png b/media/icons/old/Fish.png new file mode 100644 index 0000000..1a797a9 Binary files /dev/null and b/media/icons/old/Fish.png differ diff --git a/media/icons/old/Gears.png b/media/icons/old/Gears.png new file mode 100644 index 0000000..74a9944 Binary files /dev/null and b/media/icons/old/Gears.png differ diff --git a/media/icons/old/Ore.png b/media/icons/old/Ore.png new file mode 100644 index 0000000..d96b00d Binary files /dev/null and b/media/icons/old/Ore.png differ diff --git a/media/icons/old/Wood.png b/media/icons/old/Wood.png new file mode 100644 index 0000000..7ec4e60 Binary files /dev/null and b/media/icons/old/Wood.png differ diff --git a/media/deprecated/icons/builder.png b/media/icons/old/builder.png similarity index 100% rename from media/deprecated/icons/builder.png rename to media/icons/old/builder.png diff --git a/media/icons/old/compass.png b/media/icons/old/compass.png new file mode 100644 index 0000000..19393b7 Binary files /dev/null and b/media/icons/old/compass.png differ diff --git a/media/icons/old/compass2.png b/media/icons/old/compass2.png new file mode 100644 index 0000000..d4bc43a Binary files /dev/null and b/media/icons/old/compass2.png differ diff --git a/media/deprecated/icons/crafter.png b/media/icons/old/crafter.png similarity index 100% rename from media/deprecated/icons/crafter.png rename to media/icons/old/crafter.png diff --git a/media/icons/old/cursor.png b/media/icons/old/cursor.png new file mode 100644 index 0000000..c0a6c19 Binary files /dev/null and b/media/icons/old/cursor.png differ diff --git a/media/deprecated/icons/custom.png b/media/icons/old/custom.png similarity index 100% rename from media/deprecated/icons/custom.png rename to media/icons/old/custom.png diff --git a/media/icons/old/marker.png b/media/icons/old/marker.png new file mode 100644 index 0000000..23d25b5 Binary files /dev/null and b/media/icons/old/marker.png differ diff --git a/media/deprecated/icons/searcher.png b/media/icons/old/searcher.png similarity index 100% rename from media/deprecated/icons/searcher.png rename to media/icons/old/searcher.png diff --git a/media/icons/old/shadow.png b/media/icons/old/shadow.png new file mode 100644 index 0000000..6f51cc5 Binary files /dev/null and b/media/icons/old/shadow.png differ diff --git a/media/items/generic-boots.png b/media/items/new/generic-boots.png similarity index 100% rename from media/items/generic-boots.png rename to media/items/new/generic-boots.png diff --git a/media/items/generic-bow.png b/media/items/new/generic-bow.png similarity index 100% rename from media/items/generic-bow.png rename to media/items/new/generic-bow.png diff --git a/media/items/generic-bracelet.png b/media/items/new/generic-bracelet.png similarity index 100% rename from media/items/generic-bracelet.png rename to media/items/new/generic-bracelet.png diff --git a/media/items/generic-chestplate.png b/media/items/new/generic-chestplate.png similarity index 100% rename from media/items/generic-chestplate.png rename to media/items/new/generic-chestplate.png diff --git a/media/items/generic-dagger.png b/media/items/new/generic-dagger.png similarity index 100% rename from media/items/generic-dagger.png rename to media/items/new/generic-dagger.png diff --git a/media/items/generic-food.png b/media/items/new/generic-food.png similarity index 100% rename from media/items/generic-food.png rename to media/items/new/generic-food.png diff --git a/media/items/generic-helmet.png b/media/items/new/generic-helmet.png similarity index 100% rename from media/items/generic-helmet.png rename to media/items/new/generic-helmet.png diff --git a/media/items/generic-leggings.png b/media/items/new/generic-leggings.png similarity index 100% rename from media/items/generic-leggings.png rename to media/items/new/generic-leggings.png diff --git a/media/items/generic-necklace.png b/media/items/new/generic-necklace.png similarity index 100% rename from media/items/generic-necklace.png rename to media/items/new/generic-necklace.png diff --git a/media/items/generic-potion.png b/media/items/new/generic-potion.png similarity index 100% rename from media/items/generic-potion.png rename to media/items/new/generic-potion.png diff --git a/media/items/generic-relik.png b/media/items/new/generic-relik.png similarity index 100% rename from media/items/generic-relik.png rename to media/items/new/generic-relik.png diff --git a/media/items/generic-ring.png b/media/items/new/generic-ring.png similarity index 100% rename from media/items/generic-ring.png rename to media/items/new/generic-ring.png diff --git a/media/items/generic-scroll.png b/media/items/new/generic-scroll.png similarity index 100% rename from media/items/generic-scroll.png rename to media/items/new/generic-scroll.png diff --git a/media/items/generic-spear.png b/media/items/new/generic-spear.png similarity index 100% rename from media/items/generic-spear.png rename to media/items/new/generic-spear.png diff --git a/media/items/generic-wand.png b/media/items/new/generic-wand.png similarity index 100% rename from media/items/generic-wand.png rename to media/items/new/generic-wand.png diff --git a/media/items/palette.png b/media/items/new/palette.png similarity index 100% rename from media/items/palette.png rename to media/items/new/palette.png diff --git a/media/deprecated/items/generic-boots.png b/media/items/old/generic-boots.png similarity index 100% rename from media/deprecated/items/generic-boots.png rename to media/items/old/generic-boots.png diff --git a/media/deprecated/items/generic-bow.png b/media/items/old/generic-bow.png similarity index 100% rename from media/deprecated/items/generic-bow.png rename to media/items/old/generic-bow.png diff --git a/media/deprecated/items/generic-bracelet.png b/media/items/old/generic-bracelet.png similarity index 100% rename from media/deprecated/items/generic-bracelet.png rename to media/items/old/generic-bracelet.png diff --git a/media/deprecated/items/generic-chestplate.png b/media/items/old/generic-chestplate.png similarity index 100% rename from media/deprecated/items/generic-chestplate.png rename to media/items/old/generic-chestplate.png diff --git a/media/deprecated/items/generic-dagger.png b/media/items/old/generic-dagger.png similarity index 100% rename from media/deprecated/items/generic-dagger.png rename to media/items/old/generic-dagger.png diff --git a/media/items/old/generic-food.png b/media/items/old/generic-food.png new file mode 100644 index 0000000..afdaa5a Binary files /dev/null and b/media/items/old/generic-food.png differ diff --git a/media/deprecated/items/generic-helmet.png b/media/items/old/generic-helmet.png similarity index 100% rename from media/deprecated/items/generic-helmet.png rename to media/items/old/generic-helmet.png diff --git a/media/deprecated/items/generic-leggings.png b/media/items/old/generic-leggings.png similarity index 100% rename from media/deprecated/items/generic-leggings.png rename to media/items/old/generic-leggings.png diff --git a/media/deprecated/items/generic-necklace.png b/media/items/old/generic-necklace.png similarity index 100% rename from media/deprecated/items/generic-necklace.png rename to media/items/old/generic-necklace.png diff --git a/media/items/old/generic-potion.png b/media/items/old/generic-potion.png new file mode 100644 index 0000000..93b4b7e Binary files /dev/null and b/media/items/old/generic-potion.png differ diff --git a/media/deprecated/items/generic-relik.png b/media/items/old/generic-relik.png similarity index 100% rename from media/deprecated/items/generic-relik.png rename to media/items/old/generic-relik.png diff --git a/media/deprecated/items/generic-ring.png b/media/items/old/generic-ring.png similarity index 100% rename from media/deprecated/items/generic-ring.png rename to media/items/old/generic-ring.png diff --git a/media/items/old/generic-scroll.png b/media/items/old/generic-scroll.png new file mode 100644 index 0000000..168a430 Binary files /dev/null and b/media/items/old/generic-scroll.png differ diff --git a/media/deprecated/items/generic-spear.png b/media/items/old/generic-spear.png similarity index 100% rename from media/deprecated/items/generic-spear.png rename to media/items/old/generic-spear.png diff --git a/media/deprecated/items/generic-wand.png b/media/items/old/generic-wand.png similarity index 100% rename from media/deprecated/items/generic-wand.png rename to media/items/old/generic-wand.png diff --git a/styles.css b/styles.css index 43fed81..069ec41 100644 --- a/styles.css +++ b/styles.css @@ -398,8 +398,9 @@ button.toggleOn:hover { } .funnynumber { - background-image: linear-gradient(to left, #f5f, #a0a, #5ff, #5f5, #ff5, #fa0, #a00); -webkit-background-clip: text; + background-image: linear-gradient(to left, #f5f, #a0a, #5ff, #5f5, #ff5, #fa0, #a00); color: transparent; + -webkit-background-clip: text; display: inline-block; text-align: center; diff --git a/utils.js b/utils.js index e97bc54..0cf3b5d 100644 --- a/utils.js +++ b/utils.js @@ -16,9 +16,12 @@ const tiers = ["Normal", "Unique", "Rare", "Legendary", "Fabled", "Mythic", "Set const types = armorTypes.concat(accessoryTypes).concat(weaponTypes).concat(consumableTypes).map(x => x.substring(0,1).toUpperCase() + x.substring(1)); let itemTypes = armorTypes.concat(accessoryTypes).concat(weaponTypes); + let elementIcons = ["\u2724","\u2726", "\u2749", "\u2739", "\u274b" ]; let skpReqs = skp_order.map(x => x + "Req"); + + function clamp(num, low, high){ return Math.min(Math.max(num, low), high); }