diff --git a/imgs/Gym-Wall-5.4.jpg b/imgs/Between-Gym-Wall-5-and-Gym-Wall-4.jpg similarity index 100% rename from imgs/Gym-Wall-5.4.jpg rename to imgs/Between-Gym-Wall-5-and-Gym-Wall-4.jpg diff --git a/imgs/Branching Out.jpg b/imgs/Branching-Out.jpg similarity index 100% rename from imgs/Branching Out.jpg rename to imgs/Branching-Out.jpg diff --git a/imgs/Cornered Fox.jpg b/imgs/Cornered-Fox.jpg similarity index 100% rename from imgs/Cornered Fox.jpg rename to imgs/Cornered-Fox.jpg diff --git a/imgs/Davy-Jones'-Locker.jpg b/imgs/Davy-Jones'-Locker.jpg new file mode 100644 index 0000000..637562b Binary files /dev/null and b/imgs/Davy-Jones'-Locker.jpg differ diff --git a/imgs/Deepwater Gecko.jpg b/imgs/Deepwater-Gecko.jpg similarity index 100% rename from imgs/Deepwater Gecko.jpg rename to imgs/Deepwater-Gecko.jpg diff --git a/imgs/Durin_s-Bane.jpg b/imgs/Durin's-Bane.jpg similarity index 100% rename from imgs/Durin_s-Bane.jpg rename to imgs/Durin's-Bane.jpg diff --git a/imgs/Alternate-Gym-Route-#1.jpg b/imgs/Gym-Wall-0.5-(left-facing-face-of-Wall-1).jpg similarity index 100% rename from imgs/Alternate-Gym-Route-#1.jpg rename to imgs/Gym-Wall-0.5-(left-facing-face-of-Wall-1).jpg diff --git a/imgs/Alternate-Gym-Route-#2.jpg b/imgs/Gym-Wall-2.2-(left-side-of-Wall-#2).jpg similarity index 100% rename from imgs/Alternate-Gym-Route-#2.jpg rename to imgs/Gym-Wall-2.2-(left-side-of-Wall-#2).jpg diff --git a/imgs/Alternative-Gym-Route-#3.jpg b/imgs/Gym-Wall-2.3-(Right-facing-side-of-Wall-#2).jpg similarity index 100% rename from imgs/Alternative-Gym-Route-#3.jpg rename to imgs/Gym-Wall-2.3-(Right-facing-side-of-Wall-#2).jpg diff --git a/imgs/Shepherds-Folly.JPG b/imgs/Shepherd_s-Folly.jpg similarity index 100% rename from imgs/Shepherds-Folly.JPG rename to imgs/Shepherd_s-Folly.jpg diff --git a/imgs/The-Grandfathers-Flake.jpg b/imgs/The-Grandfather-Flake.jpg similarity index 100% rename from imgs/The-Grandfathers-Flake.jpg rename to imgs/The-Grandfather-Flake.jpg diff --git a/js/getRandomRoute.js b/js/getRandomRoute.js index 12427c9..e4ac779 100644 --- a/js/getRandomRoute.js +++ b/js/getRandomRoute.js @@ -18,5 +18,4 @@ async function getRandomRoute() { newUrl.searchParams.set("id", newRouteName); window.location.href = newUrl.href; - } \ No newline at end of file diff --git a/js/initialSortTable.js b/js/initAllRoutes.js similarity index 63% rename from js/initialSortTable.js rename to js/initAllRoutes.js index 6c27ffe..e305f0e 100644 --- a/js/initialSortTable.js +++ b/js/initAllRoutes.js @@ -36,7 +36,32 @@ function setupZoneFilter() { }); } +function fillTable() { + const STORAGE_KEY = "allRoutes"; + const content = JSON.parse(sessionStorage.getItem(STORAGE_KEY)); + + const elem = document.querySelector(".table.sortable tbody") + + Object.entries(content).forEach(([id, route]) => { + const newRow = elem.insertRow(); + const cellKey = newRow.insertCell(); + + const url = new URL("route.html", window.location.href); + url.searchParams.set("id", id) + + const link = document.createElement("a"); + link.href = url + link.textContent = route.route_name; + + cellKey.appendChild(link); + + const cellValue = newRow.insertCell(); + cellValue.textContent = route.route_location; + }) +} + function initAllRoutesPage() { + fillTable(); initialSortTable(); setupZoneFilter(); } \ No newline at end of file diff --git a/js/templateFill.js b/js/templateFill.js index 2ebdd23..64c497f 100644 --- a/js/templateFill.js +++ b/js/templateFill.js @@ -1,12 +1,9 @@ async function templateFill() { const urlParams = new URLSearchParams(window.location.search); const routeID = urlParams.get("id"); - console.log(routeID) - const content = JSON.parse(sessionStorage.getItem("allRoutes")); const route = content[routeID]; -console.log(route) let buffs = ""; if (route.buffs['Burst'] === true) { diff --git a/pages/all-routes.html b/pages/all-routes.html index 788a42f..f4f4e01 100644 --- a/pages/all-routes.html +++ b/pages/all-routes.html @@ -8,7 +8,7 @@ - +