NextExpense/templates/dashboard.html
cclohmar 67f5ed5624 feat: rebrand to ReceiptNext with 'The Terminal Mint' dark palette
- New favicon: Rx symbol in emerald green square (prescription/receipt)
- Dark theme: #0F172A base, #1E293B cards, #F8FAFC text
- Emerald #10B981 primary accent throughout
- Dashboard simplified to list view with event name + Open button
- Event page: receipt list with edit, Add Receipt button, Submit Event form
- Submit form shows total claim amount + email + format selection
- PWA manifest + service worker updated for ReceiptNext branding
- Variables-based theming for easy palette switching
2026-05-30 13:05:58 +00:00

113 lines
6.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="theme-color" content="#10b981">
<title>ReceiptNext</title>
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
<link rel="alternate icon" href="/static/icons/icon-192.png">
<link rel="manifest" href="/manifest.json">
<link rel="stylesheet" href="/static/css/style.css">
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
</head>
<body>
<div class="app-shell">
<header class="app-header">
<h1 class="app-title"><img src="/static/favicon.svg" width="24" height="24" alt="" style="vertical-align: middle; margin-right: 0.5rem;">ReceiptNext</h1>
</header>
<main class="main-content">
<div class="dashboard-header">
<h2>My Events</h2>
<button class="btn btn-primary btn-sm"
onclick="document.getElementById('create-event-form').classList.toggle('hidden')">
+ New
</button>
</div>
<div id="create-event-form" class="hidden" style="margin-bottom: 1rem;">
<div class="card" style="padding: 1rem;">
<form hx-post="/events" hx-target="body" hx-push-url="true">
<div class="form-group">
<input type="text" id="name" name="name" placeholder="Event name, e.g. WebSummit 2026" required>
</div>
<div class="form-group">
<select id="base_currency" name="base_currency" required>
<option value="EUR">EUR - Euro</option>
<option value="USD" selected>USD - US Dollar</option>
<option value="GBP">GBP - British Pound</option>
<option value="KES">KES - Kenyan Shilling</option>
<option value="CHF">CHF - Swiss Franc</option>
<option value="SEK">SEK - Swedish Krona</option>
<option value="NOK">NOK - Norwegian Krone</option>
<option value="PLN">PLN - Polish Zloty</option>
</select>
</div>
<div style="background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 0.5rem; padding: 0.75rem; margin-bottom: 0.5rem;">
<div style="font-size: 0.8rem; font-weight: 600; color: #166534; margin-bottom: 0.5rem;">Conversion Sample</div>
<p style="font-size: 0.75rem; color: #4b5563; margin-bottom: 0.5rem;">
From a payment notification: receipt amount and what you were charged.
</p>
<div class="form-row">
<div class="form-group">
<input type="number" id="sample_receipt_amount" name="sample_receipt_amount" step="0.01" min="0.01" placeholder="Receipt amount" required>
</div>
<div class="form-group" style="flex: 0 0 100px;">
<select id="sample_receipt_currency" name="sample_receipt_currency" required>
<option value="KES" selected>KES</option>
<option value="USD">USD</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
</select>
</div>
</div>
<div class="form-group">
<input type="number" id="sample_claim_amount" name="sample_claim_amount" step="0.01" min="0.01" placeholder="What you were charged" required>
</div>
</div>
<button type="submit" class="btn btn-primary btn-block">Create Event</button>
</form>
</div>
</div>
<div id="event-list">
{{if .Events}}
<div style="display: flex; flex-direction: column; gap: 0.5rem;">
{{range .Events}}
<div style="display: flex; align-items: center; justify-content: space-between; background: white; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.75rem 1rem;">
<div>
<div style="font-weight: 500;">{{.Name}}</div>
<div style="font-size: 0.75rem; color: #6b7280;">
{{.BaseCurrency}} · {{printf "%.6f" .ExchangeRate}} rate
</div>
</div>
<div style="display: flex; gap: 0.5rem;">
<a href="/events/{{.ID}}/expenses" class="btn btn-primary btn-sm"
hx-get="/events/{{.ID}}/expenses" hx-target="body" hx-push-url="true"
style="text-decoration: none;">
Open
</a>
{{if eq .Status "closed"}}
<button class="btn btn-secondary btn-sm"
hx-put="/events/{{.ID}}/reopen"
hx-target="#event-list"
hx-swap="outerHTML"
style="font-size: 0.75rem;">
Reopen
</button>
{{end}}
</div>
</div>
{{end}}
</div>
{{else}}
<div class="empty-state" style="text-align: center; padding: 3rem; color: #94a3b8;">
<p>No events yet. Create one to get started.</p>
</div>
{{end}}
</div>
</main>
</div>
</body>
</html>