67 lines
2.7 KiB
HTML
67 lines
2.7 KiB
HTML
{{define "app"}}
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="color-scheme" content="dark light">
|
|
<title>mangaBookmark</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<script src="/static/htmx.min.js" defer></script>
|
|
<script src="/static/filter.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<h1>mangaBookmark</h1>
|
|
<form method="post" action="/logout">
|
|
<button type="submit" class="ghost">Log out</button>
|
|
</form>
|
|
</header>
|
|
|
|
<input id="search" class="search" type="search" placeholder="Search titles…"
|
|
autocomplete="off" aria-label="Search titles">
|
|
|
|
<nav class="tabs" role="tablist">
|
|
<a role="tab" href="/?tab=all" class="{{if eq .Tab "all"}}active{{end}}"
|
|
hx-get="/ui/list?tab=all" hx-target="#list" hx-swap="innerHTML"
|
|
hx-push-url="/?tab=all" hx-on::after-request="setActiveTab(this)">All</a>
|
|
<a role="tab" href="/?tab=new" class="tab-new {{if eq .Tab "new"}}active{{end}}"
|
|
hx-get="/ui/list?tab=new" hx-target="#list" hx-swap="innerHTML"
|
|
hx-push-url="/?tab=new" hx-on::after-request="setActiveTab(this)">Updated</a>
|
|
<a role="tab" href="/?tab=fav" class="{{if eq .Tab "fav"}}active{{end}}"
|
|
hx-get="/ui/list?tab=fav" hx-target="#list" hx-swap="innerHTML"
|
|
hx-push-url="/?tab=fav" hx-on::after-request="setActiveTab(this)">Favourites</a>
|
|
<a role="tab" href="/?tab=archived" class="{{if eq .Tab "archived"}}active{{end}}"
|
|
hx-get="/ui/list?tab=archived" hx-target="#list" hx-swap="innerHTML"
|
|
hx-push-url="/?tab=archived" hx-on::after-request="setActiveTab(this)">Archived</a>
|
|
<a role="tab" href="/?tab=finished" class="{{if eq .Tab "finished"}}active{{end}}"
|
|
hx-get="/ui/list?tab=finished" hx-target="#list" hx-swap="innerHTML"
|
|
hx-push-url="/?tab=finished" hx-on::after-request="setActiveTab(this)">Finished</a>
|
|
</nav>
|
|
|
|
{{if .Recent}}
|
|
<section class="recent">
|
|
<h2>Continue reading</h2>
|
|
<div class="recent-strip">
|
|
{{range .Recent}}
|
|
<a class="recent-card" href="{{.ContinueURL}}" target="_blank" rel="noopener noreferrer">
|
|
<span class="recent-cover">
|
|
{{if .Cover}}<img src="{{.Cover}}" alt="" loading="lazy">
|
|
{{else}}<span class="cover-blank" aria-hidden="true">{{.Initial}}</span>{{end}}
|
|
{{if .HasNewChapter}}<span class="new-ribbon new-ribbon-sm">New</span>{{end}}
|
|
</span>
|
|
<span class="recent-title">{{.Title}}</span>
|
|
<span class="recent-chapter">Ch {{.LastChapter}}</span>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</section>
|
|
{{end}}
|
|
|
|
<main id="list" class="list">
|
|
{{template "list" .}}
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{end}}
|