Files
sprintpadawan/templates/index.html
T
2026-04-24 00:00:19 -06:00

144 lines
7.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard — SprintPadawan</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="/static/styles/main.css" />
<script src="/static/js/htmx.min.js" defer></script>
</head>
<body class="app-body">
<div class="app-shell">
<div id="sidebar-backdrop" class="sidebar-backdrop" onclick="document.getElementById('app-sidebar').classList.remove('open'); document.getElementById('sidebar-backdrop').classList.remove('open')"></div>
<!-- sidebar -->
<aside class="sidebar" id="app-sidebar">
<div class="sidebar-logo">
<div class="logo-icon"></div>
<span class="logo-text"><span>Sprint</span>Padawan</span>
</div>
<nav class="sidebar-nav">
<a href="/" class="nav-item active">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="3" y="3" width="7" height="7" />
<rect x="14" y="3" width="7" height="7" />
<rect x="3" y="14" width="7" height="7" />
<rect x="14" y="14" width="7" height="7" />
</svg>
Rooms
</a>
</nav>
<div class="sidebar-footer">
<div class="user-row">
<div class="user-avatar">{{slice .Username 0 1}}</div>
<div class="user-info">
<span class="user-name">{{.Username}}</span>
<span class="user-role">Member</span>
</div>
</div>
<form method="POST" action="/logout">
<button class="sign-out-btn" type="submit">
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
/>
<polyline points="16 17 21 12 16 7" />
<line x1="21" y1="12" x2="9" y2="12" />
</svg>
Sign Out
</button>
</form>
</div>
</aside>
<div class="main-content">
<header class="topbar">
<div style="display: flex; align-items: center; gap: 1rem;">
<button class="mobile-menu-btn" onclick="document.getElementById('app-sidebar').classList.toggle('open'); document.getElementById('sidebar-backdrop').classList.toggle('open')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</button>
<span class="topbar-title">Planning Rooms</span>
</div>
<button class="btn-primary" style="width: auto; padding: 0.5rem 1rem;" hx-get="/rooms/new" hx-target="body" hx-swap="beforeend">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
Create Room
</button>
</header>
<main class="page-content">
<div class="welcome-hero">
<p class="welcome-greeting">
Welcome back, <span>{{.Username}}</span>
</p>
<p class="welcome-sub">
Create or join a planning room to start estimating.
</p>
</div>
{{if .Rooms}}
<div class="rooms-grid">
{{range .Rooms}}
<a href="/rooms/{{.ID}}" class="room-card">
<div class="room-header">
<span class="room-name">{{.Name}}</span>
<div style="display: flex; gap: 0.5rem; align-items: center;">
{{if .IsOwner}}
<span class="room-owner-badge" style="position: static; margin: 0; padding: 0.2rem 0.5rem;">Owner</span>
{{end}}
<span class="room-code">{{.Code}}</span>
</div>
</div>
<div class="room-meta">
<span class="room-scale">{{.Scale}}</span>
<span class="room-members">{{.MemberCount}} members</span>
</div>
</a>
{{end}}
</div>
{{else}}
<div class="empty-state">
<p>No rooms yet. Create one to get started.</p>
</div>
{{end}}
</main>
</div>
</div>
<!-- modal container -->
<div id="modal-container"></div>
</body>
</html>