Fix linter warnings

This commit is contained in:
2026-02-06 23:54:50 +00:00
parent 46c897efcf
commit 6c10cb628e
8 changed files with 447 additions and 381 deletions

View File

@@ -23,11 +23,11 @@ fs.readdirSync(inputDir).forEach((file) => {
routeStart: content.routeStart || null, routeStart: content.routeStart || null,
routeEnd: content.routeEnd || null, routeEnd: content.routeEnd || null,
created: content.created || null, created: content.created || null,
checked: content.checked || null, checked: content.checked || null
}); });
} }
}); });
fs.writeFileSync(indexFile, JSON.stringify(mapList)); fs.writeFileSync(indexFile, JSON.stringify(mapList));
console.log(`Generated ${mapList.length} map files and index.`) console.log(`Generated ${mapList.length} map files and index.`);

View File

@@ -1,20 +1,20 @@
import { type HandleFetch } from "@sveltejs/kit"; import { type HandleFetch } from '@sveltejs/kit';
export const handleFetch: HandleFetch = async ({ request, fetch }) => { export const handleFetch: HandleFetch = async ({ request, fetch }) => {
if (request.url.startsWith('https://maps.owlboard.info')) { if (request.url.startsWith('https://maps.owlboard.info')) {
const newUrl = request.url.replace('https://maps.owlboard.info', 'http://localhost:3000'); const newUrl = request.url.replace('https://maps.owlboard.info', 'http://localhost:3000');
const headers = new Headers(request.headers);
headers.set('host', 'maps.owlboard.info');
request = new Request(newUrl, { const headers = new Headers(request.headers);
method: request.method, headers.set('host', 'maps.owlboard.info');
headers: headers,
body: request.body,
// @ts-ignore - 'duplex' is needed for node fetch with bodies
duplex: 'half'
});
}
return fetch(request); request = new Request(newUrl, {
} method: request.method,
headers: headers,
body: request.body,
// @ts-expect-error - 'duplex' is needed for node fetch with bodies
duplex: 'half'
});
}
return fetch(request);
};

View File

@@ -4,7 +4,15 @@
export let feature: { export let feature: {
position: 'over' | 'under'; position: 'over' | 'under';
category: 'rail' |'stream'| 'foot' | 'aroad' | 'minorRoad' | 'motorway' | 'waterway' | 'pipeline'; category:
| 'rail'
| 'stream'
| 'foot'
| 'aroad'
| 'minorRoad'
| 'motorway'
| 'waterway'
| 'pipeline';
roadName?: string; roadName?: string;
}; };
export let activeElec: ElecType; export let activeElec: ElecType;
@@ -98,11 +106,10 @@
{#if isOver} {#if isOver}
<BaseTrack {activeElec} height={64} /> <BaseTrack {activeElec} height={64} />
<!-- White edge, to provide separation between abutment line and bridge content -->
<rect x="0" y={32 - s.width / 2 - 4} width="64" height={s.width + 8} fill="white" />
<!-- White edge, to provide separation between abutment line and bridge content --> <rect x="6" y={32 - s.width / 2} width="52" height={s.width} fill={s.bg} />
<rect x=0 y={32 - (s.width / 2) - 4} width="64" height="{s.width + 8}" fill="white" />
<rect x="6" y={32 - (s.width / 2)} width="52" height={s.width} fill={s.bg} />
{#if s.type === 'road'} {#if s.type === 'road'}
<line <line
@@ -120,15 +127,17 @@
<line x1={xLeft} y1="36" x2={xRight} y2="36" stroke="#cbd5e1" stroke-width="1.5" /> <line x1={xLeft} y1="36" x2={xRight} y2="36" stroke="#cbd5e1" stroke-width="1.5" />
{/if} {/if}
<g fill="none" stroke={s.stroke} stroke-width="2.5" stroke-linecap="square"> <g fill="none" stroke={s.stroke} stroke-width="2.5" stroke-linecap="square">
<path d={`M 20 ${32 - s.width / 2 - 6} L 20 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 6}`} /> <path
d={`M 20 ${32 - s.width / 2 - 6} L 20 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 6}`}
<path d={`M 20 ${32 + s.width / 2 + 6} L 20 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 6}`} /> />
</g>
<path
d={`M 20 ${32 + s.width / 2 + 6} L 20 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 6}`}
/>
</g>
{:else} {:else}
<rect x="6" y={32 - s.width / 2} width="52" height={s.width} fill={s.bg} />
<rect x="6" y={32 - (s.width / 2)} width="52" height={s.width} fill={s.bg} />
{#if s.type === 'road'} {#if s.type === 'road'}
<line <line
@@ -148,9 +157,13 @@
<rect x="26" y={yTop} width="12" height="64" fill="white" /> <rect x="26" y={yTop} width="12" height="64" fill="white" />
<g stroke={s.stroke} stroke-width="2.5" fill="none" stroke-linecap="square"> <g stroke={s.stroke} stroke-width="2.5" fill="none" stroke-linecap="square">
<path d={`M 24 ${(32 - (s.width / 2)) - 5} L 25 ${(32 - (s.width / 2)) - 5} L 25 ${(32 - (s.width / 2)) + s.width + 5} L 24 ${(32 - (s.width / 2)) + s.width + 5}`} /> <path
d={`M 24 ${32 - s.width / 2 - 5} L 25 ${32 - s.width / 2 - 5} L 25 ${32 - s.width / 2 + s.width + 5} L 24 ${32 - s.width / 2 + s.width + 5}`}
/>
<path d={`M 40 ${(32 - (s.width / 2)) - 5} L 39 ${(32 - (s.width / 2)) - 5} L 39 ${(32 - (s.width / 2)) + s.width + 5} L 40 ${(32 - (s.width / 2)) + s.width + 5}`} /> <path
d={`M 40 ${32 - s.width / 2 - 5} L 39 ${32 - s.width / 2 - 5} L 39 ${32 - s.width / 2 + s.width + 5} L 40 ${32 - s.width / 2 + s.width + 5}`}
/>
</g> </g>
<BaseTrack {activeElec} height={64} /> <BaseTrack {activeElec} height={64} />

View File

@@ -18,7 +18,7 @@
}; };
const getPath = (side: 'left' | 'right') => { const getPath = (side: 'left' | 'right') => {
const yStart = visualUp ? 64 : 0; const yStart = visualUp ? 64 : 8;
const yEnd = visualUp ? 8 : 56; const yEnd = visualUp ? 8 : 56;
const xEnd = side === 'right' ? 56 : 8; const xEnd = side === 'right' ? 56 : 8;
return `M 32 ${yStart} Q 32 32 ${xEnd} ${yEnd}`; return `M 32 ${yStart} Q 32 32 ${xEnd} ${yEnd}`;
@@ -34,7 +34,7 @@
</script> </script>
<svg viewBox="0 0 64 64" width="64" height="64" class="junction"> <svg viewBox="0 0 64 64" width="64" height="64" class="junction">
{#each paths as d} {#each paths as d (d)}
<path {d} fill="none" stroke={branchColour} stroke-width="5" stroke-linecap="round" /> <path {d} fill="none" stroke={branchColour} stroke-width="5" stroke-linecap="round" />
{/each} {/each}
<BaseTrack {activeElec} height={64} /> <BaseTrack {activeElec} height={64} />

View File

@@ -1,283 +1,332 @@
<script lang="ts"> <script lang="ts">
import type { PageData } from './$types'; import type { PageData } from './$types';
export let data: PageData; import { base } from '$app/paths';
export let data: PageData;
let searchTerm = ''; let searchTerm = '';
const formatDate = (dateVal: string | null) => { const formatDate = (dateVal: string | null) => {
if (!dateVal) return '---'; if (!dateVal) return '---';
const d = new Date(dateVal); const d = new Date(dateVal);
return d.toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: '2-digit' }); return d.toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: '2-digit' });
}; };
$: filteredMaps = data.maps.filter(m => $: filteredMaps = data.maps.filter(
m.routeId.toString().includes(searchTerm) || (m) =>
m.routeStart.toLowerCase().includes(searchTerm.toLowerCase()) || m.routeId.toString().includes(searchTerm) ||
m.routeEnd.toLowerCase().includes(searchTerm.toLowerCase()) m.routeStart.toLowerCase().includes(searchTerm.toLowerCase()) ||
); m.routeEnd.toLowerCase().includes(searchTerm.toLowerCase())
);
const isVerifiedRecently = (dateVal: string | null) => { const isVerifiedRecently = (dateVal: string | null) => {
if (!dateVal) return 'draft'; if (!dateVal) return 'draft';
const checkedDate = new Date(dateVal).getTime(); const checkedDate = new Date(dateVal).getTime();
const oneYearAgo = Date.now() - (365 * 24 * 60 * 60 * 1000); const oneYearAgo = Date.now() - 365 * 24 * 60 * 60 * 1000;
return checkedDate > oneYearAgo ? 'verified' : 'stale'; return checkedDate > oneYearAgo ? 'verified' : 'stale';
}; };
</script> </script>
<div class="page-wrapper"> <div class="page-wrapper">
<header class="main-header"> <header class="main-header">
<div class="brand-container"> <div class="brand-container">
<img src="https://owlboard.info/images/logo/wide_logo.svg" alt="OwlBoard Logo" class="main-logo" /> <img
<div class="brand-text"> src="https://owlboard.info/images/logo/wide_logo.svg"
<h1>Routes</h1> alt="OwlBoard Logo"
<p class="sub-brand">by OwlBoard</p> class="main-logo"
</div> />
<div class="search-container"> <div class="brand-text">
<input <h1>Routes</h1>
type="text" </div>
bind:value={searchTerm} <div class="search-container">
placeholder="Search index..." <input
class="search-input" type="text"
/> bind:value={searchTerm}
</div> placeholder="Search index..."
</header> class="search-input"
/>
</div>
</div>
</header>
<div class="list-container"> <div class="list-container">
{#each filteredMaps as map} <a
<a href="/map/{map.routeId.toString().padStart(4, '0')}" class="card"> href="https://owlboard.info"
<div class="card-top"> class="card external-card"
<span class="route-id">{map.routeId.toString().padStart(4, '0')}</span> target="_blank"
<span class="status-badge {isVerifiedRecently(map.checked)}"> rel="noopener noreferrer"
{#if isVerifiedRecently(map.checked) === 'verified'} >
Reviewed <div class="card-top">
{:else if isVerifiedRecently(map.checked) === 'stale'} <span class="route-id system-tag">OWL</span>
Needs review <span class="status-badge external">External Tool</span>
{:else} </div>
Draft <div class="card-body">
{/if} <div class="location">OwlBoard</div>
</span> <p class="description">Live Departure Boards and PIS Codes</p>
</div> </div>
<div class="card-footer">
<div class="card-body"> <span>Visit owlboard.info ↗</span>
<div class="location origin">{map.routeStart}</div> </div>
<div class="path-arrow"></div> </a>
<div class="location destination">{map.routeEnd}</div> {#each filteredMaps as map (map.routeId)}
</div> <a href="{base}/map/{map.routeId.toString().padStart(4, '0')}" class="card">
<div class="card-top">
<span class="route-id">{map.routeId.toString().padStart(4, '0')}</span>
<span class="status-badge {isVerifiedRecently(map.checked)}">
{#if isVerifiedRecently(map.checked) === 'verified'}
Reviewed
{:else if isVerifiedRecently(map.checked) === 'stale'}
Needs review
{:else}
Draft
{/if}
</span>
</div>
<div class="card-footer"> <div class="card-body">
<span>Created: {formatDate(map.created)}</span> <div class="location origin">{map.routeStart}</div>
{#if map.checked} <div class="path-arrow">to</div>
<span>• Checked: {formatDate(map.checked)}</span> <div class="location destination">{map.routeEnd}</div>
{/if} </div>
</div>
</a> <div class="card-footer">
{:else} <span>Created: {formatDate(map.created)}</span>
<div class="empty-state">No maps found.</div> {#if map.checked}
{/each} <span>• Checked: {formatDate(map.checked)}</span>
</div> {/if}
</div>
</a>
{:else}
<div class="empty-state">No maps found.</div>
{/each}
</div>
</div> </div>
<style> <style>
/* Mobile-First Base Styles */ /* Mobile-First Base Styles */
:global(body) { :global(body) {
margin: 0; margin: 0;
background-color: #f8fafc; background-color: #f8fafc;
color: #0f172a; color: #0f172a;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
} }
.page-wrapper { .page-wrapper {
padding: 1rem; padding: 1rem;
max-width: 800px; max-width: 800px;
margin: 0 auto; margin: 0 auto;
} }
.main-header { .main-header {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
.brand-container { .brand-container {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 1rem; gap: 1rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
.main-logo { .main-logo {
/* Adjust height to fit your logo's aspect ratio */ /* Adjust height to fit your logo's aspect ratio */
height: 48px; height: 48px;
width: auto; width: auto;
display: block; display: block;
} }
.brand-text h1 { .brand-text h1 {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: 900; font-weight: 900;
margin: 0; margin: 0;
line-height: 1; line-height: 1;
letter-spacing: -0.05em; letter-spacing: -0.05em;
font-style: italic; font-style: italic;
} }
.sub-brand { .sub-brand {
font-size: 0.65rem; font-size: 0.65rem;
font-weight: 800; font-weight: 800;
color: #94a3b8; color: #94a3b8;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.1em; letter-spacing: 0.1em;
margin: 0.2rem 0 0 0; margin: 0.2rem 0 0 0;
} }
/* Desktop layout adjustment */ /* Desktop layout adjustment */
@media (min-width: 640px) { @media (min-width: 640px) {
.main-header { .main-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 3rem; margin-bottom: 3rem;
} }
.brand-container { .brand-container {
margin-bottom: 0; margin-bottom: 0;
} }
.main-logo { .main-logo {
height: 56px; height: 56px;
} }
} }
.search-input { .search-input {
width: 100%; width: 100%;
padding: 0.8rem 1rem; padding: 0.8rem 1rem;
border: 2px solid #e2e8f0; border: 2px solid #e2e8f0;
border-radius: 12px; border-radius: 12px;
font-size: 1rem; font-size: 1rem;
box-sizing: border-box; /* Ensures padding doesn't break width */ box-sizing: border-box; /* Ensures padding doesn't break width */
outline: none; outline: none;
} }
.search-input:focus { .search-input:focus {
border-color: #3b82f6; border-color: #3b82f6;
} }
/* Card Layout (Mobile) */ /* Card Layout (Mobile) */
.list-container { .list-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
} }
.card { .card {
display: block; display: block;
background: white; background: white;
padding: 1.25rem; padding: 1.25rem;
border-radius: 16px; border-radius: 16px;
text-decoration: none; text-decoration: none;
color: inherit; color: inherit;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
transition: transform 0.1s ease; transition: transform 0.1s ease;
} cursor: pointer;
}
.card:active { .card:active {
transform: scale(0.98); /* Tactile feedback for mobile */ transform: scale(0.98); /* Tactile feedback for mobile */
} }
.card-top { .card-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.route-id { .route-id {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-weight: 800; font-weight: 800;
color: #3b82f6; color: #3b82f6;
background: #eff6ff; background: #eff6ff;
padding: 0.2rem 0.5rem; padding: 0.2rem 0.5rem;
border-radius: 6px; border-radius: 6px;
} }
.card-body { .card-body {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.location { .location {
font-size: 1.125rem; font-size: 1.125rem;
font-weight: 700; font-weight: 700;
letter-spacing: -0.02em; letter-spacing: -0.02em;
} }
.path-arrow { .path-arrow {
color: #cbd5e1; color: #acc7e8;
font-size: 0.9rem; font-size: 0.9rem;
margin: 0.2rem 0; margin: 0.2rem 0;
} }
.card-footer { .card-footer {
font-size: 0.7rem; font-size: 0.7rem;
color: #64748b; color: #64748b;
text-transform: uppercase; text-transform: uppercase;
font-weight: 600; font-weight: 600;
letter-spacing: 0.05em; letter-spacing: 0.05em;
border-top: 1px solid #f1f5f9; border-top: 1px solid #f1f5f9;
padding-top: 0.75rem; padding-top: 0.75rem;
} }
/* Update your existing badge styles */ .status-badge {
.status-badge { font-size: 0.65rem;
font-size: 0.65rem; font-weight: 800;
font-weight: 800; text-transform: uppercase;
text-transform: uppercase; padding: 0.3rem 0.6rem;
padding: 0.3rem 0.6rem; border-radius: 999px;
border-radius: 999px; white-space: nowrap;
white-space: nowrap; /* Prevents label snapping on small screens */ }
}
.verified { .verified {
background: #dcfce7; background: #dcfce7;
color: #166534; color: #166534;
} }
.stale { .stale {
background: #fef3c7; /* Amber/Yellow background */ background: #fef3c7;
color: #92400e; /* Dark brown/gold text */ color: #92400e;
border: 1px solid #fcd34d; border: 1px solid #fcd34d;
} }
.draft { .draft {
background: #f1f5f9; background: #f1f5f9;
color: #475569; color: #475569;
} }
/* Desktop Adjustments */ @media (min-width: 640px) {
@media (min-width: 640px) { .page-wrapper {
.page-wrapper { padding: 3rem 1.5rem;
padding: 3rem 1.5rem; }
}
.main-header { .main-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.search-input { .search-input {
width: 300px; width: 300px;
} }
.path-arrow { .path-arrow {
display: inline-block; display: inline-block;
margin: 0 0.5rem; margin: 0 0.5rem;
transform: rotate(-90deg); /* Turn down arrow into right arrow */ }
}
.card-body { .card-body {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
</style>
.external-card {
border-left: 4px solid #6366f1;
background: linear-gradient(to right, #ffffff, #f5f3ff);
}
.system-tag {
background: #eef2ff !important;
color: #4338ca !important;
}
.status-badge.external {
background: #6366f1;
color: white;
}
.description {
margin: 0.25rem 0 0 0;
font-size: 0.9rem;
color: #64748b;
font-weight: 500;
}
.external-card:hover {
border-color: #4338ca;
background: #f5f3ff;
}
</style>

View File

@@ -1,17 +1,17 @@
import type { PageLoad } from "./$types"; import type { PageLoad } from './$types';
export const load: PageLoad = async ({ fetch }) => { export const load: PageLoad = async ({ fetch }) => {
const response = await fetch('map-index.json'); const response = await fetch('map-index.json');
if (!response.ok) { if (!response.ok) {
return { maps: [] }; return { maps: [] };
} }
const maps = await response.json(); const maps = await response.json();
return { return {
maps: maps.sort((a: any, b: any) => { maps: maps.sort((a: any, b: any) => {
return Number(a.routeId) - Number(b.routeId); return Number(a.routeId) - Number(b.routeId);
}) })
}; };
}; };

View File

@@ -2,6 +2,7 @@
import RouteRow from '$lib/components/RouteRow.svelte'; import RouteRow from '$lib/components/RouteRow.svelte';
import RouteEndLink from '$lib/components/mapIcons/RouteEndLink.svelte'; import RouteEndLink from '$lib/components/mapIcons/RouteEndLink.svelte';
import { slide } from 'svelte/transition'; import { slide } from 'svelte/transition';
import { base } from '$app/paths';
// data.route contains: routeStart, routeEnd, routeId, elecStart, elecEnd, routeDetail[] // data.route contains: routeStart, routeEnd, routeId, elecStart, elecEnd, routeDetail[]
export let data; export let data;
@@ -58,31 +59,31 @@
</script> </script>
<div class="map-layout"> <div class="map-layout">
<header class="top-nav"> <header class="top-nav">
<div class="nav-cluster"> <div class="nav-cluster">
<a href="/" class="home-link" title="Back to Index"> <a href="{base}/" class="home-link" title="Back to Index">
<span class="home-icon"></span> <span class="home-icon"></span>
</a> </a>
<div class="route-stack">
{#if data?.route}
<h1 class="primary-station">
{reversed ? data.route.routeEnd : data.route.routeStart}
</h1>
<span class="secondary-station">
to {reversed ? data.route.routeStart : data.route.routeEnd}
</span>
{/if}
</div>
</div>
<div class="quick-actions"> <div class="route-stack">
<button class="icon-btn" on:click={() => (reversed = !reversed)}> {#if data?.route}
{reversed ? 'UP' : 'DN'} <h1 class="primary-station">
</button> {reversed ? data.route.routeEnd : data.route.routeStart}
<button class="icon-btn" on:click={() => (showFilters = !showFilters)}> Settings </button> </h1>
</div> <span class="secondary-station">
</header> to {reversed ? data.route.routeStart : data.route.routeEnd}
</span>
{/if}
</div>
</div>
<div class="quick-actions">
<button class="icon-btn" on:click={() => (reversed = !reversed)}>
{reversed ? 'UP' : 'DN'}
</button>
<button class="icon-btn" on:click={() => (showFilters = !showFilters)}> Settings </button>
</div>
</header>
{#if showFilters} {#if showFilters}
<div class="backdrop" on:click={() => (showFilters = false)}></div> <div class="backdrop" on:click={() => (showFilters = false)}></div>
@@ -106,7 +107,7 @@
<div class="drawer-content"> <div class="drawer-content">
<div class="filter-flex"> <div class="filter-flex">
{#each Object.keys(visibleTypes) as type} {#each Object.keys(visibleTypes) as type (type)}
<button <button
class="filter-chip" class="filter-chip"
class:active={visibleTypes[type]} class:active={visibleTypes[type]}
@@ -143,82 +144,82 @@
padding-top: 0; padding-top: 0;
} }
.top-nav { .top-nav {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background: #0f172a; background: #0f172a;
color: white; color: white;
gap: 1rem; gap: 1rem;
} }
.nav-cluster { .nav-cluster {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 1rem; gap: 1rem;
min-width: 0; /* Prevents flex children from overflowing */ min-width: 0; /* Prevents flex children from overflowing */
} }
.home-link { .home-link {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 36px; width: 36px;
height: 36px; height: 36px;
background: #1e293b; background: #1e293b;
border: 1px solid #334155; border: 1px solid #334155;
border-radius: 8px; border-radius: 8px;
color: #94a3b8; color: #94a3b8;
text-decoration: none; text-decoration: none;
font-size: 1.2rem; font-size: 1.2rem;
flex-shrink: 0; /* Keeps button from squishing on mobile */ flex-shrink: 0; /* Keeps button from squishing on mobile */
} }
.home-link:hover { .home-link:hover {
background: #334155; background: #334155;
color: white; color: white;
border-color: #475569; border-color: #475569;
} }
.route-stack { .route-stack {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-width: 0; min-width: 0;
} }
.primary-station { .primary-station {
font-size: 1rem; font-size: 1rem;
font-weight: 800; font-weight: 800;
margin: 0; margin: 0;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.secondary-station { .secondary-station {
font-size: 0.7rem; font-size: 0.7rem;
color: #94a3b8; color: #94a3b8;
text-transform: uppercase; text-transform: uppercase;
font-weight: 600; font-weight: 600;
} }
.quick-actions { .quick-actions {
display: flex; display: flex;
gap: 0.5rem; gap: 0.5rem;
} }
.icon-btn { .icon-btn {
background: #1e293b; background: #1e293b;
border: 1px solid #334155; border: 1px solid #334155;
color: white; color: white;
padding: 0.4rem 0.6rem; padding: 0.4rem 0.6rem;
border-radius: 6px; border-radius: 6px;
font-size: 0.75rem; font-size: 0.75rem;
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
white-space: nowrap; white-space: nowrap;
} }
.map-spine { .map-spine {
padding-top: 72px; padding-top: 72px;

View File

@@ -11,6 +11,9 @@ elecStart:
elecEnd: elecEnd:
elec: none elec: none
routeDetail: routeDetail:
- type: continues
routeName: Paddington - Reading West Jn
routeId: "0001"
- type: crossovers - type: crossovers
name: Scours Lane Junction name: Scours Lane Junction
description: Line diverges description: Line diverges