routes/index.html
2026-06-29 08:20:03 +00:00

120 lines
4.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Routes</title>
<link rel="icon" href="favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<section id="auth-screen" class="auth-screen" aria-labelledby="auth-title">
<form id="auth-form" class="panel auth-card" autocomplete="off">
<p class="eyebrow">Private routes</p>
<h1 id="auth-title">Enter secret</h1>
<p class="intro">This route list is available only after entering the shared secret.</p>
<label>
Secret
<input id="auth-secret" name="secret" type="password" required autofocus />
</label>
<button type="submit">Unlock</button>
<p id="auth-message" class="auth-message" role="status" aria-live="polite"></p>
</form>
</section>
<div id="app-shell" hidden>
<header class="hero">
<h1>Routes</h1>
<div class="header-actions">
<button type="button" id="show-form-button">Add route</button>
<button type="button" class="secondary" id="logout-button">Lock</button>
</div>
</header>
<main class="layout">
<section id="route-editor" class="panel form-panel" aria-labelledby="form-title" hidden>
<h2 id="form-title">Add route</h2>
<form id="route-form" autocomplete="off">
<input type="hidden" id="route-id" />
<label>
Name <span aria-hidden="true">*</span>
<input id="route-name" name="name" required maxlength="120" placeholder="Weekend mountain drive" />
</label>
<label>
Google Maps link <span aria-hidden="true">*</span>
<input id="route-link" name="link" type="url" required placeholder="https://maps.app.goo.gl/..." />
</label>
<label>
Date
<input id="route-date" name="date" type="date" />
</label>
<label>
Picture
<input id="route-picture" name="picture" type="file" accept="image/*" />
</label>
<label>
Description
<textarea id="route-description" name="description" rows="5" placeholder="Notes about stops, distance, road conditions..."></textarea>
</label>
<div class="form-actions">
<button type="submit" id="save-button">Add route</button>
<button type="button" class="secondary" id="cancel-edit" hidden>Cancel</button>
</div>
</form>
</section>
<section class="routes-section" aria-labelledby="routes-title">
<div class="section-heading">
<div>
<h2 id="routes-title">Saved routes</h2>
<p id="route-count">No routes yet.</p>
</div>
</div>
<div id="empty-state" class="empty-state">
<h3>No routes saved</h3>
<p>Tap “Add route” to save your first map link.</p>
</div>
<div id="routes-list" class="routes-list" aria-live="polite"></div>
<details id="archive-section" class="archive-section" hidden>
<summary>Archived (<span id="archive-count">0</span>)</summary>
<div id="archived-routes-list" class="routes-list archived-routes-list" aria-live="polite"></div>
</details>
</section>
</main>
</div>
<template id="route-card-template">
<article class="route-card">
<div class="route-image" aria-hidden="true" hidden><img class="route-picture" alt="" /></div>
<div class="route-content">
<div class="route-meta"></div>
<div class="route-top">
<h3><a class="route-title" target="_blank" rel="noopener noreferrer"></a></h3>
<details class="route-menu">
<summary aria-label="Route actions"></summary>
<div class="menu-items">
<button type="button" class="share-route">Share</button>
<button type="button" class="edit-route">Edit</button>
<button type="button" class="archive-route">Archive</button>
<button type="button" class="danger remove-route">Delete</button>
</div>
</details>
</div>
<p class="route-description"></p>
</div>
</article>
</template>
<script src="config.js"></script>
<script src="app.js" defer></script>
</body>
</html>