feat: move status to footer and clean up home page

This commit is contained in:
syntaxbullet
2026-01-07 13:21:36 +01:00
parent 292991c605
commit ff23f22337
4 changed files with 58 additions and 11 deletions

View File

@@ -1,20 +1,11 @@
import { BaseLayout } from "../views/layout";
import { formatUptime } from "../utils/format";
export function homeRoute(): Response {
const uptime = formatUptime(process.uptime());
const startTimestamp = Date.now() - (process.uptime() * 1000);
const content = `
<div class="card">
<h2>Welcome</h2>
<p>The Aurora web server is up and running!</p>
</div>
<div class="card">
<h3>Status</h3>
<p>System operational.</p>
<p><strong>Uptime:</strong> <span id="uptime-display" data-start-timestamp="${Math.floor(startTimestamp)}">${uptime}</span></p>
</div>
`;
const html = BaseLayout({ title: "Home", content });