Apply the new design-system primitives across the remaining pages so the whole app shares one visual language: - Auth/entry: redesigned index, login, register (centered card layout, SVG icons, semantic tokens) - Admin: sidebar nav with icons, cohesive admin dashboard/users/library/ processing-issues/settings (tables use border-line + hover states; scan/websocket attributes preserved) - Secondary: analytics (stat cards), devices, progress, conflicts, queue, profile + form/modal all migrated to .card/.btn/.input primitives and SVG action icons - Docs + API explorer + setup wizard + collection/rules/modals + unlinked books + book-detail modals: consistent chrome, modal scrims use --surface-overlay, close buttons use icon-btn - reader.templ and error.templ intentionally left unchanged
101 lines
4.3 KiB
Templ
101 lines
4.3 KiB
Templ
package templates
|
|
|
|
templ Index(loggedIn bool) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>Bookhoard - Home</title>
|
|
<script src="/static/htmx.min.js"></script>
|
|
<script type="module" src="/static/main.js"></script>
|
|
<link href="/static/style.css" rel="stylesheet"/>
|
|
</head>
|
|
<body class="theme-tokyo-night" x-data="index" x-init="initIndexTheme(); checkAuthRedirect()">
|
|
<!-- Hero -->
|
|
<div class="relative overflow-hidden">
|
|
<div class="pointer-events-none absolute inset-0 bg-gradient-to-br from-brand/15 via-transparent to-brand/5"></div>
|
|
<div class="relative mx-auto max-w-5xl px-4 py-20 sm:px-6 lg:px-8 lg:py-28">
|
|
<div class="absolute right-4 top-4">
|
|
<select id="theme-select" @change="changeTheme" class="input w-auto py-1.5 text-xs">
|
|
for _, t := range ThemeOptions {
|
|
<option value={ t.Name }>{ t.Label }</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
<div class="text-center">
|
|
<div class="mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-2xl bg-brand/15 text-brand">
|
|
@Icon("book-open", "h-9 w-9")
|
|
</div>
|
|
<h1 class="text-4xl font-extrabold tracking-tight text-content sm:text-6xl">
|
|
Your books, beautifully organized.
|
|
</h1>
|
|
<p class="mx-auto mt-5 max-w-2xl text-lg text-content-muted">
|
|
A self-hosted ebook and comic library with cross-device sync, a built-in reader, and reading analytics.
|
|
</p>
|
|
<div class="mt-8 flex justify-center">
|
|
<a href="#auth" class="btn btn-primary px-8 py-3 text-base">
|
|
@Icon("arrow-right", "h-4 w-4")
|
|
Get Started
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Features -->
|
|
<div class="border-t border-line bg-surface-raised">
|
|
<div class="mx-auto max-w-5xl px-4 py-16 sm:px-6 lg:px-8">
|
|
<div class="mb-10 text-center">
|
|
<h2 class="text-2xl font-bold tracking-tight text-content">Why Bookhoard?</h2>
|
|
</div>
|
|
<div class="grid grid-cols-1 gap-5 md:grid-cols-3">
|
|
<div class="card p-6">
|
|
<div class="mb-4 flex h-11 w-11 items-center justify-center rounded-xl bg-brand/15 text-brand">
|
|
@Icon("clock", "h-6 w-6")
|
|
</div>
|
|
<h3 class="mb-1.5 text-base font-semibold text-content">Cross-device sync</h3>
|
|
<p class="text-sm leading-relaxed text-content-muted">Sync reading progress, bookmarks, and highlights across KOReader, Kobo, and the web.</p>
|
|
</div>
|
|
<div class="card p-6">
|
|
<div class="mb-4 flex h-11 w-11 items-center justify-center rounded-xl bg-brand/15 text-brand">
|
|
@Icon("book-open", "h-6 w-6")
|
|
</div>
|
|
<h3 class="mb-1.5 text-base font-semibold text-content">Built-in reader</h3>
|
|
<p class="text-sm leading-relaxed text-content-muted">Read EPUB, PDF, and comics in the browser with custom themes, fonts, and layouts.</p>
|
|
</div>
|
|
<div class="card p-6">
|
|
<div class="mb-4 flex h-11 w-11 items-center justify-center rounded-xl bg-brand/15 text-brand">
|
|
@Icon("chart", "h-6 w-6")
|
|
</div>
|
|
<h3 class="mb-1.5 text-base font-semibold text-content">Smart collections</h3>
|
|
<p class="text-sm leading-relaxed text-content-muted">Organize with rules-based collections, series tracking, and reading analytics.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Auth -->
|
|
if !loggedIn {
|
|
<div id="auth" class="mx-auto max-w-md px-4 py-16 sm:px-6 lg:px-8">
|
|
<div class="card p-6">
|
|
<h2 class="mb-5 text-center text-lg font-bold text-content">Sign in to Bookhoard</h2>
|
|
<form hx-post="/api/auth/login" hx-target="#auth-result" hx-swap="innerHTML" class="space-y-4">
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Email or Username</label>
|
|
<input type="text" name="login" class="input" required/>
|
|
</div>
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Password</label>
|
|
<input type="password" name="password" class="input" required/>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary w-full">Sign In</button>
|
|
</form>
|
|
</div>
|
|
<div id="auth-result" class="mt-6 text-center"></div>
|
|
</div>
|
|
}
|
|
</body>
|
|
</html>
|
|
}
|