routes/index.html
2026-06-29 07:36:10 +00:00

113 lines
4.2 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="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">
<div>
<p class="eyebrow">Google Maps route collection</p>
<h1>Routes</h1>
<p class="intro">Save, edit, open, and share your favorite Google Maps route links.</p>
</div>
<div class="header-actions">
<a class="skip-link" href="#route-form">Add a route</a>
<button type="button" class="secondary" id="logout-button">Lock</button>
</div>
</header>
<main class="layout">
<section class="panel form-panel" aria-labelledby="form-title">
<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 URL
<input id="route-picture" name="picture" type="url" placeholder="https://example.com/photo.jpg" />
</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 edit</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>
<button type="button" class="secondary danger" id="clear-all" hidden>Remove all</button>
</div>
<div id="empty-state" class="empty-state">
<h3>No routes saved</h3>
<p>Add your first Google Maps route link using the form.</p>
</div>
<div id="routes-list" class="routes-list" aria-live="polite"></div>
</section>
</main>
</div>
<template id="route-card-template">
<article class="route-card">
<div class="route-image" aria-hidden="true"></div>
<div class="route-content">
<div class="route-meta"></div>
<h3><a class="route-title" target="_blank" rel="noopener noreferrer"></a></h3>
<p class="route-description"></p>
<div class="route-actions">
<a class="open-link" target="_blank" rel="noopener noreferrer">Open map</a>
<button type="button" class="secondary share-route">Share</button>
<button type="button" class="secondary edit-route">Edit</button>
<button type="button" class="secondary danger remove-route">Remove</button>
</div>
</div>
</article>
</template>
<script src="app.js" defer></script>
</body>
</html>