47 lines
2.7 KiB
HTML
47 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Racks</title>
|
|
<link rel="icon" type="image/png" href="{{ LOGO_PNG }}">
|
|
<link href="/static/css/output.css" rel="stylesheet">
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-gray-300 text-gray-900 dark:bg-zinc-900 dark:text-gray-100 min-h-screen flex flex-col">
|
|
{% include 'header.html' %}
|
|
<div class="flex-1 flex items-center justify-center mx-4">
|
|
<div class="container py-8 max-w-md pt-20">
|
|
<h1 class="text-3xl font-bold mb-8 text-center">Racks</h1>
|
|
<div class="flex justify-center mb-6">
|
|
<a href="/rack/add" class="bg-gray-200 hover:bg-gray-400 dark:bg-zinc-700 dark:hover:bg-zinc-600 px-4 py-2 rounded-lg inline-block"><i class="fas fa-plus"></i> Add Rack</a>
|
|
</div>
|
|
<div class="space-y-6">
|
|
{% for rack in racks %}
|
|
<a href="/rack/{{ rack.id }}" class="bg-gray-200 hover:bg-gray-100 dark:bg-zinc-800 hover:dark:bg-zinc-700 rounded-lg shadow-md p-4 flex items-start justify-between hover:ring-2 hover:ring-gray-400 transition group">
|
|
<div>
|
|
<h2 class="text-xl font-bold dark:text-white mb-1">{{ rack.name }}</h2>
|
|
<div class="dark:text-gray-400">Site: {{ rack.site }} | Height: {{ rack.height_u }}U</div>
|
|
</div>
|
|
<div class="ml-6 flex-shrink-0">
|
|
<div class="relative flex items-center justify-center w-16 h-16 group">
|
|
<svg class="w-16 h-16 rotate-[-90deg]" viewBox="0 0 100 100">
|
|
<circle cx="50" cy="50" r="42" stroke="#374151" stroke-width="12" fill="none" />
|
|
<circle cx="50" cy="50" r="42" stroke="#6b7280" stroke-width="12" fill="none" stroke-dasharray="264" stroke-dashoffset="{{ 264 - (264 * rack.percent_full / 100) }}" style="transition: stroke-dashoffset 0.5s;" />
|
|
</svg>
|
|
<div class="absolute inset-0 flex flex-col items-center justify-center">
|
|
<span class="text-sm font-bold">{{ rack.percent_full }}%</span>
|
|
<span class="text-xs dark:text-gray-300">Full</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
{% else %}
|
|
<div class="text-center text-gray-400">No racks defined yet.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|