Add homepage for openstreetmap.tools
Static index.html for the site root — lists the three tools (Public Transport → GeoJSON, OWL Places, OWL Map) with descriptions, includes an inline relation ID/URL form that redirects to the PT tool, and credits Edward Betts with a link to edwardbetts.com. Playfair Display headings + IBM Plex Sans body, dark navy header with subtle OSM-green grid, three cards (featured card spans full width). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3a158c189c
commit
c37b463c0e
1 changed files with 392 additions and 0 deletions
392
homepage/index.html
Normal file
392
homepage/index.html
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>OpenStreetMap Tools</title>
|
||||
<meta name="description" content="A collection of tools for working with OpenStreetMap data, built by Edward Betts.">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--green: #7EBC6F;
|
||||
--green-light: #f0f9ec;
|
||||
--green-border: #c6e6bb;
|
||||
--green-text: #4a7c40;
|
||||
--navy: #0f1c2e;
|
||||
--navy-mid: #1a3048;
|
||||
--text: #1c2333;
|
||||
--muted: #6b7280;
|
||||
--bg: #f7f6f3;
|
||||
--card: #ffffff;
|
||||
--border: #e5e7eb;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'IBM Plex Sans', sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
line-height: 1.6;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* ── Header ──────────────────────────────────────────────────── */
|
||||
|
||||
header {
|
||||
background: var(--navy);
|
||||
color: white;
|
||||
padding: 3.5rem 2rem 3rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
header::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image:
|
||||
linear-gradient(rgba(126,188,111,0.08) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(126,188,111,0.08) 1px, transparent 1px);
|
||||
background-size: 40px 40px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.site-label {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
color: var(--green);
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Playfair Display', Georgia, serif;
|
||||
font-size: clamp(2.2rem, 5vw, 3.5rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.08;
|
||||
color: white;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
font-size: 1rem;
|
||||
color: rgba(255,255,255,0.6);
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
/* ── Main ────────────────────────────────────────────────────── */
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
padding: 3rem 2rem;
|
||||
}
|
||||
|
||||
.section-label {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
padding-bottom: 0.85rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 1.75rem;
|
||||
}
|
||||
|
||||
/* ── Grid ────────────────────────────────────────────────────── */
|
||||
|
||||
.tools-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.tool-card--featured {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
/* ── Cards ───────────────────────────────────────────────────── */
|
||||
|
||||
.tool-card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
transition: box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.tool-card:hover {
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.07);
|
||||
}
|
||||
|
||||
.tool-card--featured {
|
||||
border-left: 3px solid var(--green);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.tool-name {
|
||||
font-family: 'Playfair Display', Georgia, serif;
|
||||
font-size: 1.45rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.tool-tag {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.04em;
|
||||
background: var(--green-light);
|
||||
color: var(--green-text);
|
||||
border: 1px solid var(--green-border);
|
||||
border-radius: 4px;
|
||||
padding: 0.2rem 0.55rem;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
.tool-desc {
|
||||
color: var(--muted);
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ── PT form ─────────────────────────────────────────────────── */
|
||||
|
||||
.pt-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.pt-form label {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
.pt-form-row {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.pt-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 0.6rem 0.9rem;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-size: 0.85rem;
|
||||
background: #fafaf8;
|
||||
color: var(--text);
|
||||
outline: none;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.pt-input:focus {
|
||||
border-color: var(--green);
|
||||
background: white;
|
||||
}
|
||||
|
||||
.pt-input::placeholder { color: #b0b8c4; }
|
||||
|
||||
.btn-go {
|
||||
padding: 0.6rem 1.3rem;
|
||||
background: var(--navy);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-family: 'IBM Plex Sans', sans-serif;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-go:hover { background: var(--green); color: var(--navy); }
|
||||
|
||||
.form-error {
|
||||
font-size: 0.8rem;
|
||||
color: #dc3545;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-error.visible { display: block; }
|
||||
|
||||
/* ── Card link ───────────────────────────────────────────────── */
|
||||
|
||||
.card-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
color: var(--navy);
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
border-bottom: 1.5px solid var(--green);
|
||||
padding-bottom: 1px;
|
||||
transition: color 0.15s;
|
||||
margin-top: auto;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.card-link:hover { color: var(--green-text); }
|
||||
|
||||
/* ── Footer ──────────────────────────────────────────────────── */
|
||||
|
||||
footer {
|
||||
border-top: 1px solid var(--border);
|
||||
padding: 1.5rem 2rem;
|
||||
text-align: center;
|
||||
font-size: 0.82rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
footer a:hover { color: var(--green-text); }
|
||||
.sep { margin: 0 0.65rem; color: var(--border); }
|
||||
|
||||
/* ── Responsive ──────────────────────────────────────────────── */
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.tools-grid { grid-template-columns: 1fr; }
|
||||
.tool-card--featured { grid-column: 1; }
|
||||
.pt-form-row { flex-direction: column; }
|
||||
.btn-go { width: 100%; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="header-inner">
|
||||
<p class="site-label">openstreetmap.tools</p>
|
||||
<h1>OpenStreetMap<br>Tools</h1>
|
||||
<p class="tagline">A collection of tools for working with OpenStreetMap data.</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<p class="section-label">Tools</p>
|
||||
|
||||
<div class="tools-grid">
|
||||
|
||||
<div class="tool-card tool-card--featured">
|
||||
<div class="card-header">
|
||||
<h2 class="tool-name">Public Transport → GeoJSON</h2>
|
||||
<span class="tool-tag">GeoJSON</span>
|
||||
</div>
|
||||
<p class="tool-desc">
|
||||
Fetch an OSM public transport route relation and export it as GeoJSON.
|
||||
Visualise the route on a map, select start and end stops to extract a
|
||||
segment, and download the result.
|
||||
</p>
|
||||
<div class="pt-form">
|
||||
<label for="relation-input">Relation ID or OSM URL</label>
|
||||
<div class="pt-form-row">
|
||||
<input class="pt-input" type="text" id="relation-input"
|
||||
placeholder="e.g. 15083963 or openstreetmap.org/relation/…"
|
||||
autocomplete="off" spellcheck="false">
|
||||
<button class="btn-go" id="btn-go">Go →</button>
|
||||
</div>
|
||||
<span class="form-error" id="form-error">Could not find a relation ID in that input.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tool-card">
|
||||
<div class="card-header">
|
||||
<h2 class="tool-name">OWL Places</h2>
|
||||
<span class="tool-tag">Wikidata</span>
|
||||
</div>
|
||||
<p class="tool-desc">
|
||||
Link OpenStreetMap places to Wikidata entries, one place at a time.
|
||||
Search for an OSM object, find its Wikidata counterpart, and add the
|
||||
connection — improving data quality across both datasets.
|
||||
</p>
|
||||
<a class="card-link" href="https://osm.wikidata.link/">Open OWL Places →</a>
|
||||
</div>
|
||||
|
||||
<div class="tool-card">
|
||||
<div class="card-header">
|
||||
<h2 class="tool-name">OWL Map</h2>
|
||||
<span class="tool-tag">Wikidata</span>
|
||||
</div>
|
||||
<p class="tool-desc">
|
||||
Map-based OSM/Wikidata linker. Pan to any area, see which objects
|
||||
need Wikidata links, and connect them at speed — faster to get
|
||||
started than OWL Places, built for covering ground at scale.
|
||||
</p>
|
||||
<a class="card-link" href="https://map.osm.wikidata.link/">Open OWL Map →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
Made by <a href="https://edwardbetts.com/">Edward Betts</a>
|
||||
<span class="sep">·</span>
|
||||
Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
function parseRelationId(text) {
|
||||
text = text.trim();
|
||||
const m = text.match(/relation\/(\d+)/);
|
||||
if (m) return m[1];
|
||||
if (/^\d+$/.test(text)) return text;
|
||||
return null;
|
||||
}
|
||||
|
||||
function goToRelation() {
|
||||
const input = document.getElementById('relation-input');
|
||||
const error = document.getElementById('form-error');
|
||||
const id = parseRelationId(input.value);
|
||||
if (id) {
|
||||
error.classList.remove('visible');
|
||||
window.location.href = '/public_transport_geojson/' + id;
|
||||
} else {
|
||||
error.classList.add('visible');
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('btn-go').addEventListener('click', goToRelation);
|
||||
document.getElementById('relation-input').addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Enter') goToRelation();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue