Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Blob2763 authored Aug 7, 2023
1 parent 4520a3f commit ff25f5c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />

<script src="/navbar.js"></script>
<script src="navbar.js"></script>

</head>

Expand Down Expand Up @@ -77,4 +77,4 @@ <h1 id="home-header"><span id="utils-header">404</span> page not found :/</h1>

</body>

</html>
</html>
10 changes: 6 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@

<div class="main">
<h1 id="home-header"><span id="utils-header">UTILS.</span> Your online toolbox</h1>
<div id="version">v0.13.2</div>
<div id="version">v0.13.3</div>
<h3>SAVED</h3>
<ul id="all-saved">
<li>LOADING...</li>
</ul>

<h3>WHAT'S NEW - v0.13.2</h3>
<h3>WHAT'S NEW - v0.13.3</h3>
<ul id="changelog">
<li>Added better 404 page</li>
<!-- <li>anything</li> -->

<!-- <h4>BUG FIXES</h4> -->
<h4>BUG FIXES</h4>
<li>Fixed 404 page style not loading</li>
<li>Fixed length conversions save link</li>
</ul>
</div>

Expand Down
6 changes: 3 additions & 3 deletions tools/conversions/distance.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/imgs/icon.png" type="image/x-icon">
<title>UTILS - DISTANCE CONVERSIONS</title>
<title>UTILS - LENGTH CONVERSIONS</title>
<link rel="stylesheet" href="../../style.css">

<script src="../../navbar.js"></script>
Expand All @@ -14,14 +14,14 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
</head>

<body onload="populateConversionSite('DISTANCE'); populateNavbar(); displaySave('DISTANCE')">
<body onload="populateConversionSite('DISTANCE'); populateNavbar(); displaySave('LENGTH')">

<div id="sidenav"></div>

<div class="main">
<div id="top">
<h1 id="heading"></h1>
<button id="save" onclick="save('DISTANCE')"></button>
<button id="save" onclick="save('LENGTH')"></button>
</div>

<button onclick="swapUnits()" id="swap"><span class="material-symbols-outlined">swap_horiz</span></button>
Expand Down
10 changes: 6 additions & 4 deletions tools/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ async function category(tool) {
try {
const toolsJSON = await getJSON();

console.log("TOOLSJSON", toolsJSON[[["PromiseResult"]]]);
console.log("TOOLSJSON", toolsJSON);

const firstToolJSON = toolsJSON[0];
console.log("FIRST TOOLSJSON", firstToolJSON);

for (const cat in firstToolJSON) {
if (tool in firstToolJSON[cat]) {
console.log("CATEGORY FOUND:", cat);
console.warn("CATEGORY FOUND:", cat);
content = cat;
}
}
Expand Down Expand Up @@ -113,8 +115,8 @@ async function displayAllSaved(home) {
console.log("NAME", name)
console.log("CATEGORY", cat)

if (tool === "distance") {
content = content.concat(`<li><a href="${linkStart(home)}${cat}${tool.toLowerCase()}.html">LENGTH</a></li>`)
if (tool === "DISTANCE") {
content = content.concat(`<li><a href="${linkStart(home)}conversions/${tool.toLowerCase()}.html">LENGTH</a></li>`)
} else {
content = content.concat(`<li><a href="${linkStart(home)}${cat}${tool.toLowerCase()}.html">${name}</a></li>`)
}
Expand Down

0 comments on commit ff25f5c

Please sign in to comment.