refactor: ETA templating engine for dashboard, shared nav/head/foot partials
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<script src="/dashboard/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PingQL<%= it.title ? ` — ${it.title}` : '' %></title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
body { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace; background: #0a0a0a; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-[#0a0a0a] text-gray-100 min-h-screen">
|
||||
@@ -0,0 +1,16 @@
|
||||
<nav class="border-b border-gray-800 px-6 py-4 flex items-center justify-between">
|
||||
<a href="/dashboard/home" class="text-xl font-bold tracking-tight">Ping<span class="text-blue-400">QL</span></a>
|
||||
<div class="flex items-center gap-5 text-sm text-gray-500">
|
||||
<% if (it.nav === 'monitors') { %>
|
||||
<span class="text-gray-300">Monitors</span>
|
||||
<% } else { %>
|
||||
<a href="/dashboard/home" class="hover:text-gray-300 transition-colors">Monitors</a>
|
||||
<% } %>
|
||||
<% if (it.nav === 'settings') { %>
|
||||
<span class="text-gray-300">Settings</span>
|
||||
<% } else { %>
|
||||
<a href="/dashboard/settings" class="hover:text-gray-300 transition-colors">Settings</a>
|
||||
<% } %>
|
||||
<button onclick="logout()" class="hover:text-gray-300 transition-colors">Logout</button>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user