Replace fontawesome with emoji for less dependencies

This commit is contained in:
FirephoenixX02 2025-09-06 16:07:45 +02:00
parent 62a4c700c3
commit 5132adc8be

View file

@ -3,7 +3,6 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>NOMYO Router Dashboard</title> <title>NOMYO Router Dashboard</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" rel="stylesheet">
<style> <style>
body { body {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
@ -18,9 +17,9 @@
margin: 0; margin: 0;
} }
#dark-mode-button { #dark-mode-button {
position: fixed; /* stays relative to the viewport */ position: fixed; /* stays relative to the viewport */
top: 1rem; /* distance from top edge */ top: 1rem; /* distance from top edge */
right: 1rem; /* distance from right edge */ right: 1rem; /* distance from right edge */
cursor: pointer; cursor: pointer;
min-width: 2.5rem; min-width: 2.5rem;
min-height: 2.5rem; min-height: 2.5rem;
@ -53,7 +52,7 @@
gap: 1rem; gap: 1rem;
margin-bottom: 0; margin-bottom: 0;
} }
#pull-section { #pull-section {
display: flex; display: flex;
align-items: center; align-items: center;
@ -88,7 +87,6 @@
} }
#pull-section button:hover { #pull-section button:hover {
background-color: #d1d1d1; background-color: #d1d1d1;
} }
#pull-status { #pull-status {
margin-left: 0.5rem; margin-left: 0.5rem;
@ -220,8 +218,10 @@
/></a> /></a>
<h1>Router Dashboard</h1> <h1>Router Dashboard</h1>
<button onclick="toggleDarkMode()" id="dark-mode-button"><i class="fas fa-moon"></i></button> <button onclick="toggleDarkMode()" id="dark-mode-button">
🌗
</button>
<div class="tables-wrapper"> <div class="tables-wrapper">
<!-- ---------- Tags ---------- --> <!-- ---------- Tags ---------- -->
<div class="table-container"> <div class="table-container">
@ -281,21 +281,21 @@
</div> </div>
</div> </div>
<div class="endpoints-container"> <div class="endpoints-container">
<h2>Configured Endpoints</h2> <h2>Configured Endpoints</h2>
<table id="endpoints-table"> <table id="endpoints-table">
<thead> <thead>
<tr> <tr>
<th>Endpoint</th> <th>Endpoint</th>
<th>Status</th> <th>Status</th>
<th>Version</th> <th>Version</th>
</tr> </tr>
</thead> </thead>
<tbody id="endpoints-body"> <tbody id="endpoints-body">
<tr> <tr>
<td colspan="3" class="loading">Loading…</td> <td colspan="3" class="loading">Loading…</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<script> <script>
@ -307,9 +307,9 @@
} }
return await resp.json(); return await resp.json();
} }
function toggleDarkMode() { function toggleDarkMode() {
document.documentElement.classList.toggle("dark-mode"); document.documentElement.classList.toggle("dark-mode");
} }
/* ---------- Endpoints ---------- */ /* ---------- Endpoints ---------- */
@ -474,6 +474,7 @@
if (!resp.ok) if (!resp.ok)
throw new Error(`Status ${resp.status}`); throw new Error(`Status ${resp.status}`);
const data = await resp.json(); const data = await resp.json();
console.log(data);
statusEl.textContent = `✅ ${JSON.stringify(data, null, 2)}`; statusEl.textContent = `✅ ${JSON.stringify(data, null, 2)}`;
statusEl.style.color = "green"; statusEl.style.color = "green";
loadTags(); loadTags();