Compare commits
19 Commits
0.0.8
...
a036b0ba63
| Author | SHA1 | Date | |
|---|---|---|---|
| a036b0ba63 | |||
| 0b53f8ed81 | |||
| ee92b52552 | |||
| 4cc6140d86 | |||
| a458cc5e76 | |||
| cb9f826943 | |||
| fa1da3686f | |||
| d5270dc889 | |||
| 6366cb601b | |||
| fe1061875b | |||
| 699f2b760d | |||
| c8790e2aae | |||
| 3fbffc7589 | |||
| 84312abc75 | |||
| c6fa8794e0 | |||
| 8e65fd396e | |||
| 8a05d8358f | |||
| a8c3117259 | |||
| 2b2095604c |
@@ -6,6 +6,8 @@ const inputDir = './static/mapFiles/yaml';
|
|||||||
const outputDir = './static/mapFiles/json';
|
const outputDir = './static/mapFiles/json';
|
||||||
const indexFile = './static/map-index.json';
|
const indexFile = './static/map-index.json';
|
||||||
|
|
||||||
|
const noiseRegex = /\s+(single line|junction|jn|junc|jct|gf|north|south|east|west)\.?$/i;
|
||||||
|
|
||||||
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
||||||
|
|
||||||
const mapList = [];
|
const mapList = [];
|
||||||
@@ -18,12 +20,37 @@ fs.readdirSync(inputDir).forEach((file) => {
|
|||||||
const fileName = file.replace('.yaml', '.json');
|
const fileName = file.replace('.yaml', '.json');
|
||||||
fs.writeFileSync(path.join(outputDir, fileName), JSON.stringify(content));
|
fs.writeFileSync(path.join(outputDir, fileName), JSON.stringify(content));
|
||||||
|
|
||||||
|
const contentSet = new Set();
|
||||||
|
|
||||||
|
if (Array.isArray(content.routeDetail)) {
|
||||||
|
content.routeDetail.forEach(item => {
|
||||||
|
if ((item.type === 'junction' || item.type === 'station') && item.name) {
|
||||||
|
let cleanName = item.name;
|
||||||
|
|
||||||
|
// Run the replacement in a loop or twice to catch nested noise
|
||||||
|
// e.g., "Reading West Junction"
|
||||||
|
// Pass 1: "Reading West"
|
||||||
|
// Pass 2: "Reading"
|
||||||
|
let previousName;
|
||||||
|
do {
|
||||||
|
previousName = cleanName;
|
||||||
|
cleanName = cleanName.replace(noiseRegex, '').trim();
|
||||||
|
} while (cleanName !== previousName);
|
||||||
|
|
||||||
|
if (cleanName) {
|
||||||
|
contentSet.add(cleanName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
mapList.push({
|
mapList.push({
|
||||||
routeId: content.routeId || null,
|
routeId: content.routeId || null,
|
||||||
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,
|
||||||
|
contents: Array.from(contentSet),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
||||||
/>
|
/>
|
||||||
|
<link rel="manifest" href="/manifest.webmanifest" />
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body data-sveltekit-preload-data="hover">
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
|||||||
BIN
src/lib/assets/apple-touch-icon.png
Normal file
BIN
src/lib/assets/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><defs><radialGradient xlink:href="#a" id="b" cx="256" cy="256" r="254.04401" fx="256" fy="256" gradientUnits="userSpaceOnUse"/><linearGradient id="a"><stop offset="0" stop-color="#2b343c"/><stop offset="1" stop-color="#404c55"/></linearGradient></defs><circle cx="256" cy="256" r="254.04401" fill="url(#b)"/><path fill="#4fd1d1" d="M256 63.429688c-70.95778.000042-128.48044 57.522702-128.48047 128.480472.00022 14.10748 2.32313 28.1184 6.87695 41.4707l-.01-.0156 7.35742 17.3086c1.62516 3.0994 3.37536 6.13147 5.24805 9.08789.32127.56629.64671 1.13007.97656 1.6914L256 448.57031l108.0293-187.11719c.32985-.56133.65528-1.12511.97656-1.6914 1.8727-2.95642 3.62483-5.98849 5.25-9.08789l7.34766-17.28125v-.0117c4.55383-13.3523 6.87674-27.36322 6.87695-41.4707C384.48042 120.95241 326.95774 63.429742 256 63.429688Zm-77.58594 58.457032c.01-.00084.0211-.00045.0312 0 0 0 17.19849 15.57553 33.64258 24.45117 20.19639 10.90092 31.83331 10.07724 43.91211 24.80469 12.0788-14.72745 23.71572-13.90377 43.91211-24.80469 16.44409-8.87564 33.64258-24.45117 33.64258-24.45117 2.60037-.11599 0 42.34071 0 58.96094 0 42.83269-73.74774 87.10937-77.55469 87.04687-3.80695.0625-77.55469-44.21418-77.55469-87.04687 0-16.55531-2.58111-58.74622-.0312-58.96094z"/><path fill="#fd5" d="m256 247.27121-7.4932-25.90681 7.46586 6 7.52054-6z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
17
src/lib/assets/global.css
Normal file
17
src/lib/assets/global.css
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/* FONTS */
|
||||||
|
@font-face {
|
||||||
|
font-family: "urwgothic";
|
||||||
|
src: url("/fonts/urwgothic/urwgothic.woff2") format("woff2"), url("/font/urwgothic/urwgothic.woff") format("woff");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "urwgothic";
|
||||||
|
src: url("/fonts/urwgothic/urwgothicDemi.woff2") format("woff2"), url("/font/urwgothic/urwgothicDemi.woff") format("woff");
|
||||||
|
font-weight: 900;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
[id] {
|
||||||
|
scroll-margin-top: 100px;
|
||||||
|
}
|
||||||
1
src/lib/assets/maps-logo-maskable.svg
Normal file
1
src/lib/assets/maps-logo-maskable.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 562.09 562.09"><defs><radialGradient xlink:href="#a" id="b" cx="256" cy="256" r="254.04" fx="256" fy="256" gradientTransform="translate(27 27)" gradientUnits="userSpaceOnUse"/><linearGradient id="a"><stop offset="0" stop-color="#2b343c"/><stop offset="1" stop-color="#404c55"/></linearGradient></defs><path fill="url(#b)" d="M694.32 283a411.32 393.92 0 0 1-410.68 393.92 411.32 393.92 0 0 1-411.96-392.69 411.32 393.92 0 0 1 409.4-395.14A411.32 393.92 0 0 1 694.3 280.54" transform="translate(-1.96 -1.96)"/><path fill="#4fd1d1" d="M281.04 88.47c-70.95 0-128.48 57.53-128.48 128.48 0 14.11 2.33 28.12 6.88 41.47l-.01-.01 7.36 17.3a124.7 124.7 0 0 0 5.25 9.1l.97 1.69 108.03 187.1 108.03-187.1.98-1.7a128.5 128.5 0 0 0 5.25-9.08l7.35-17.28v-.02a128.48 128.48 0 0 0 6.87-41.47C409.52 146 352 88.47 281.04 88.47Zm-84.01 49.27 2.52 2.38c7.74 7.29 16.97 12.23 28.03 15.02 4.64 1.17 4.62 1.17 8.1-.34 25.92-11.2 64.62-11.22 91.01-.03 7.27 3.08 25.1-4.12 36.09-14.59a30.17 30.17 0 0 1 2.43-2.18c.35 0 .48 6.13.2 9.02a49.7 49.7 0 0 1-9.29 24.82l-1.47 2.06.7.94c38.07 51.55-7.46 115.42-60.6 85-1.3-.74-2.45-1.24-2.57-1.11-.2.2-5.5 10.18-9.4 17.68-1.76 3.39-1.4 3.4-3.26-.14-4.77-9.12-9.38-17.7-9.5-17.7-.08 0-1.18.58-2.45 1.31-52.6 30.1-99.03-34.13-60.98-84.33.78-1.02 1.1-1.66.95-1.87-7.68-10.44-11.39-21.86-10.7-32.92zm44.85 39.23a35.62 35.62 0 0 0-15.48 3.92c-35.26 17.47-16.98 71.79 21.65 64.33a35.5 35.5 0 0 0 22.5-14.71c1.25-1.78 1.67-2.22 1.88-1.93.14.2 2.14 3.61 4.44 7.59 4.87 8.43 4.1 7.82 5.9 4.67a497.41 497.41 0 0 1 7.32-12.44c.14-.08.96.9 1.86 2.22 16.09 23.62 52.73 18.48 61.43-8.6 8.52-26.58-16.98-51.8-43.57-43.1-12.13 3.98-20.13 12.66-27.95 30.34l-.7 1.56-1.38-3.13c-8.8-20-22.71-30.89-37.9-30.72zm76.41 18.05c4.34-.12 8.8 1.43 12.33 4.95 11.83 11.83.35 31.55-16.05 27.58-8.43-2.04-13.82-10.73-12.05-19.4 1.65-8.07 8.54-12.92 15.77-13.13zm-75.7.04c8.54-.48 16.99 5.68 17.6 15.6.66 11.02-10.1 19.75-20.85 16.88-12.5-3.33-16.72-18.35-7.72-27.46a16.6 16.6 0 0 1 10.97-5.02zm6.22 4.93c-1.1.07-2.17.56-3 1.54-3.25 3.86 1.28 9.24 5.7 6.74a4.52 4.52 0 0 0 2.21-3.84c0-2.82-2.5-4.61-4.9-4.44zm63.97.06c-3.15.2-5.02 3.3-3.63 6.36 1.05 2.31 4.26 3.26 6.3 1.87 3.77-2.56 2.44-7.95-2.03-8.23a5.19 5.19 0 0 0-.64 0z"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
1
src/lib/assets/round-logo-text.svg
Normal file
1
src/lib/assets/round-logo-text.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.0 KiB |
1
src/lib/assets/round-logo.svg
Normal file
1
src/lib/assets/round-logo.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 508.09 508.09"><defs><radialGradient xlink:href="#a" id="b" cx="256" cy="256" r="254.04" fx="256" fy="256" gradientUnits="userSpaceOnUse"/><linearGradient id="a"><stop offset="0" stop-color="#2b343c"/><stop offset="1" stop-color="#404c55"/></linearGradient></defs><circle cx="256" cy="256" r="254.04" fill="url(#b)" transform="translate(-1.96 -1.96)"/><path fill="#4fd1d1" d="M254.04 61.47c-70.95 0-128.48 57.53-128.48 128.48 0 14.11 2.33 28.12 6.88 41.47l-.01-.01 7.36 17.3a124.7 124.7 0 0 0 5.25 9.1l.97 1.69 108.03 187.1 108.03-187.1.98-1.7a128.5 128.5 0 0 0 5.25-9.08l7.35-17.28v-.02a128.48 128.48 0 0 0 6.87-41.47C382.52 119 325 61.47 254.04 61.47Zm-84.01 49.27 2.52 2.38c7.74 7.29 16.97 12.23 28.03 15.02 4.64 1.17 4.62 1.17 8.1-.34 25.92-11.2 64.62-11.22 91.01-.03 7.27 3.08 25.1-4.12 36.09-14.59a30.17 30.17 0 0 1 2.43-2.18c.35 0 .48 6.13.2 9.02a49.7 49.7 0 0 1-9.29 24.82l-1.47 2.06.7.94c38.07 51.55-7.46 115.42-60.6 85-1.3-.74-2.45-1.24-2.57-1.11-.2.2-5.5 10.18-9.4 17.68-1.76 3.39-1.4 3.4-3.26-.14-4.77-9.12-9.38-17.7-9.5-17.7-.08 0-1.18.58-2.45 1.31-52.6 30.1-99.03-34.13-60.98-84.33.78-1.02 1.1-1.66.95-1.87-7.68-10.44-11.39-21.86-10.7-32.92zm44.85 39.23a35.62 35.62 0 0 0-15.48 3.92c-35.26 17.47-16.98 71.79 21.65 64.33a35.5 35.5 0 0 0 22.5-14.71c1.25-1.78 1.67-2.22 1.88-1.93.14.2 2.14 3.61 4.44 7.59 4.87 8.43 4.1 7.82 5.9 4.67a497.41 497.41 0 0 1 7.32-12.44c.14-.08.96.9 1.86 2.22 16.09 23.62 52.73 18.48 61.43-8.6 8.52-26.58-16.98-51.8-43.57-43.1-12.13 3.98-20.13 12.66-27.95 30.34l-.7 1.56-1.38-3.13c-8.8-20-22.71-30.89-37.9-30.72zm76.41 18.05c4.34-.12 8.8 1.43 12.33 4.95 11.83 11.83.35 31.55-16.05 27.58-8.43-2.04-13.82-10.73-12.05-19.4 1.65-8.07 8.54-12.92 15.77-13.13zm-75.7.04c8.54-.48 16.99 5.68 17.6 15.6.66 11.02-10.1 19.75-20.85 16.88-12.5-3.33-16.72-18.35-7.72-27.46a16.6 16.6 0 0 1 10.97-5.02zm6.22 4.93c-1.1.07-2.17.56-3 1.54-3.25 3.86 1.28 9.24 5.7 6.74a4.52 4.52 0 0 0 2.21-3.84c0-2.82-2.5-4.61-4.9-4.44zm63.97.06c-3.15.2-5.02 3.3-3.63 6.36 1.05 2.31 4.26 3.26 6.3 1.87 3.77-2.56 2.44-7.95-2.03-8.23a5.19 5.19 0 0 0-.64 0z"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -6,9 +6,12 @@
|
|||||||
export let reversed: boolean = false;
|
export let reversed: boolean = false;
|
||||||
|
|
||||||
$: Icon = components[feature.type] || components.default;
|
$: Icon = components[feature.type] || components.default;
|
||||||
|
|
||||||
|
const slugify = (str?: string) =>
|
||||||
|
str?.toLocaleLowerCase().trim().replace(/\s+/g, '-') ?? 'unknown';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="row-container">
|
<div class="row-container" id="{slugify(feature.name)}">
|
||||||
<div class="mileage-col">
|
<div class="mileage-col">
|
||||||
<span class="miles">{feature.miles + 'm' || ''}</span>
|
<span class="miles">{feature.miles + 'm' || ''}</span>
|
||||||
<span class="chains">{feature.chains + 'ch' || ''}</span>
|
<span class="chains">{feature.chains + 'ch' || ''}</span>
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import BaseTrack from '$lib/components/mapIcons/BaseTrack.svelte';
|
import BaseTrack from '$lib/components/mapIcons/BaseTrack.svelte';
|
||||||
|
import type { ElecType } from '$lib/railStyles';
|
||||||
|
|
||||||
export let activeElec: string;
|
export let activeElec: ElecType;
|
||||||
export let feature: any;
|
export let feature: any;
|
||||||
export let reversed: boolean;
|
export let reversed: boolean;
|
||||||
|
|
||||||
|
const pinSVG: string = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 256.96 385.14"><path fill="#4fd1d1" d="M128.48 0C57.52 0 0 57.52 0 128.48c0 14.1 2.32 28.12 6.88 41.47l-.01-.01 7.35 17.3c1.63 3.1 3.38 6.14 5.25 9.1l.98 1.68 108.03 187.12 108.03-187.12.98-1.69a128.5 128.5 0 0 0 5.25-9.09l7.34-17.28a128.48 128.48 0 0 0 6.88-41.48C256.96 57.52 199.44 0 128.48 0ZM44.47 49.27l2.52 2.37c7.74 7.3 16.96 12.23 28.02 15.02 4.65 1.17 4.62 1.17 8.11-.34 25.92-11.2 64.61-11.21 91-.03 7.28 3.09 25.1-4.12 36.1-14.58a30.17 30.17 0 0 1 2.43-2.18c.34 0 .47 6.13.19 9.02a49.7 49.7 0 0 1-9.28 24.82l-1.48 2.06.7.94c38.07 51.55-7.45 115.42-60.6 85-1.3-.74-2.45-1.24-2.56-1.12-.2.2-5.5 10.18-9.4 17.68-1.77 3.4-1.41 3.4-3.26-.13-4.77-9.13-9.38-17.71-9.5-17.71-.09 0-1.19.6-2.45 1.32-52.6 30.1-99.04-34.14-60.98-84.34.77-1.02 1.1-1.66.94-1.86-7.67-10.45-11.38-21.86-10.7-32.92zM89.3 88.5a35.62 35.62 0 0 0-15.47 3.91c-35.27 17.48-16.99 71.8 21.65 64.34a35.5 35.5 0 0 0 22.49-14.72c1.26-1.78 1.68-2.21 1.88-1.93.15.2 2.15 3.62 4.44 7.6 4.88 8.42 4.11 7.82 5.91 4.67a554.85 554.85 0 0 1 7.31-12.45c.15-.07.97.91 1.86 2.23 16.1 23.61 52.74 18.48 61.43-8.6 8.53-26.59-16.97-51.8-43.57-43.1-12.12 3.98-20.12 12.66-27.95 30.34l-.69 1.56-1.38-3.14c-8.81-20-22.72-30.88-37.9-30.71zm76.42 18.05c4.34-.12 8.8 1.42 12.33 4.95 11.83 11.83.35 31.55-16.05 27.58-8.43-2.05-13.82-10.73-12.05-19.41 1.64-8.06 8.54-12.91 15.77-13.12zm-75.7.03c8.54-.47 16.98 5.68 17.59 15.6.67 11.03-10.1 19.76-20.84 16.89-12.5-3.34-16.73-18.36-7.72-27.46a16.6 16.6 0 0 1 10.97-5.03zm6.22 4.93c-1.1.08-2.18.56-3 1.54-3.25 3.87 1.28 9.25 5.69 6.75a4.52 4.52 0 0 0 2.22-3.85c0-2.81-2.5-4.6-4.91-4.44zm63.97.07c-3.15.2-5.02 3.3-3.64 6.36 1.05 2.3 4.27 3.26 6.3 1.87 3.77-2.56 2.44-7.96-2.02-8.23a5.19 5.19 0 0 0-.64 0z"/></svg>`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Check for 'feature.side' and place map pin on that side of the track.
|
||||||
|
Use 'reversed' to switch sides if the route is reversed.
|
||||||
|
-->
|
||||||
<svg viewBox="0 0 64 64" width="64" height="64" class="loops">
|
<svg viewBox="0 0 64 64" width="64" height="64" class="loops">
|
||||||
<BaseTrack {activeElec} height={64} />
|
<BaseTrack {activeElec} height={64} />
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import favicon from '$lib/assets/favicon.svg';
|
import favicon from '$lib/assets/round-logo.svg';
|
||||||
|
import appleLogo from '$lib/assets/apple-touch-icon.png';
|
||||||
|
import '$lib/assets/global.css';
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<link rel="icon" href={favicon} />
|
<link rel="icon" href={favicon} />
|
||||||
|
<link rel="apple-touch-icon" href={appleLogo} />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{@render children()}
|
{@render children()}
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import logo from '$lib/assets/round-logo-text.svg';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
import { base } from '$app/paths';
|
import { resolve } from '$app/paths';
|
||||||
export let data: PageData;
|
|
||||||
|
let { data }: { data: PageData } = $props();
|
||||||
|
let searchTerm = $state('');
|
||||||
|
|
||||||
let searchTerm = '';
|
let filteredMaps = $derived(
|
||||||
|
data.maps.filter((m) => {
|
||||||
|
const term = searchTerm.toLowerCase();
|
||||||
|
|
||||||
$: filteredMaps = data.maps.filter(
|
if (m.routeId.toString().includes(term)) return true;
|
||||||
(m) =>
|
|
||||||
m.routeId.toString().includes(searchTerm) ||
|
return m.contents.some(location =>
|
||||||
m.routeStart.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
location.toLowerCase().includes(term)
|
||||||
m.routeEnd.toLowerCase().includes(searchTerm.toLowerCase())
|
);
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const vibrate = (patern: number | number[] = 10) => {
|
const vibrate = (pattern: number | number[] = 10) => {
|
||||||
if (typeof window !== 'undefined' && window.navigator.vibrate) {
|
if (typeof window !== 'undefined' && window.navigator.vibrate) {
|
||||||
window.navigator.vibrate(pattern);
|
window.navigator.vibrate(pattern);
|
||||||
}
|
}
|
||||||
@@ -47,28 +53,24 @@
|
|||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
<div class="brand-container">
|
<div class="brand-container">
|
||||||
<img
|
<img
|
||||||
src="https://owlboard.info/images/logo/wide_logo.svg"
|
src={logo}
|
||||||
alt="OwlBoard Logo"
|
alt="OwlBoard Logo"
|
||||||
class="main-logo"
|
class="main-logo"
|
||||||
/>
|
/>
|
||||||
<div class="brand-text">
|
|
||||||
<h1>Routes</h1>
|
|
||||||
</div>
|
|
||||||
<div class="search-container">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
bind:value={searchTerm}
|
|
||||||
placeholder="Search index..."
|
|
||||||
class="search-input"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<a href="https://owlboard.info" class="button-link">Go to OwlBoard Live Departures & PIS</a>
|
<a href="https://owlboard.info" class="button-link">Go to OwlBoard Live Departures & PIS</a>
|
||||||
|
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
bind:value={searchTerm}
|
||||||
|
placeholder="Search"
|
||||||
|
class="search-input"
|
||||||
|
/>
|
||||||
{#each filteredMaps as map (map.routeId)}
|
{#each filteredMaps as map (map.routeId)}
|
||||||
<a href="{base}/map/{map.routeId.toString().padStart(4, '0')}" class="card" on:click={() => vibrate(10)}>
|
<a href={resolve(`/map/${map.routeId.toString().padStart(4, '0')}`)} class="card" onclick={() => vibrate(10)}>
|
||||||
<div class="card-top">
|
<div class="card-top">
|
||||||
<span class="route-id">{map.routeId.toString().padStart(4, '0')}</span>
|
<span class="route-id">{map.routeId.toString().padStart(4, '0')}</span>
|
||||||
<span class="status-badge {isVerifiedRecently(map.checked)}">
|
<span class="status-badge {isVerifiedRecently(map.checked)}">
|
||||||
@@ -120,6 +122,7 @@
|
|||||||
.main-header {
|
.main-header {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
height: 80px;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -144,26 +147,14 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-text h1 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 900;
|
|
||||||
margin: 0;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: -0.05em;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-container {
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: auto;
|
max-width: 500px;
|
||||||
height: 50px;
|
font-family: "urwgothic";
|
||||||
|
margin: auto;
|
||||||
|
height: 40px;
|
||||||
padding: 0.8rem 1rem;
|
padding: 0.8rem 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-transform: uppercase;
|
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
@@ -214,7 +205,7 @@
|
|||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
line-height: 0.5;
|
line-height: 0.8rem;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -263,13 +254,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.location {
|
.location {
|
||||||
font-size: 1.125rem;
|
font-family: "urwgothic";
|
||||||
|
font-size: 1.23rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.path-arrow {
|
.path-arrow {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
font-family: "urwgothic";
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0.2rem 0;
|
margin: 0.2rem 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
import type { PageLoad } from './$types';
|
import type { PageLoad } from './$types';
|
||||||
|
|
||||||
|
export interface RouteMapIndex {
|
||||||
|
routeId: string | number;
|
||||||
|
routeStart: string;
|
||||||
|
routeEnd: string;
|
||||||
|
created: string;
|
||||||
|
checked: string;
|
||||||
|
contents: string[];
|
||||||
|
}
|
||||||
|
|
||||||
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');
|
||||||
|
|
||||||
@@ -12,6 +21,6 @@ export const load: PageLoad = async ({ fetch }) => {
|
|||||||
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);
|
||||||
})
|
}) as RouteMapIndex[]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
45
src/routes/manifest.webmanifest/+server.ts
Normal file
45
src/routes/manifest.webmanifest/+server.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import { json } from "@sveltejs/kit";
|
||||||
|
import type { RequestHandler } from './$types';
|
||||||
|
import logo from '$lib/assets/round-logo.svg';
|
||||||
|
import maskableLogo from '$lib/assets/maps-logo-maskable.svg';
|
||||||
|
import appleLogo from '$lib/assets/apple-touch-icon.png';
|
||||||
|
|
||||||
|
export const prerender = true;
|
||||||
|
|
||||||
|
export const GET: RequestHandler = ({ url }) => {
|
||||||
|
const manifest = {
|
||||||
|
name: "OwlBoard Maps",
|
||||||
|
short_name: "OwlBoard Maps",
|
||||||
|
start_url: "/",
|
||||||
|
display: "standalone",
|
||||||
|
theme_color: "#3c6f79",
|
||||||
|
background_color: "#3d4952",
|
||||||
|
icons: [
|
||||||
|
{
|
||||||
|
src: logo,
|
||||||
|
sizes: "any",
|
||||||
|
type: "image/svg+xml",
|
||||||
|
purpose: "any",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: maskableLogo,
|
||||||
|
sizes: "any",
|
||||||
|
type: "image/svg+xml",
|
||||||
|
purpose: "maskable",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: appleLogo,
|
||||||
|
sizes: "180x180",
|
||||||
|
type: "image/png",
|
||||||
|
purpose: "any",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
return json(manifest, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/manifest+json',
|
||||||
|
'Cache-Control': 'public, max-age=3600',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
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';
|
import { resolve } from '$app/paths';
|
||||||
|
|
||||||
|
import logo from '$lib/assets/round-logo.svg';
|
||||||
|
|
||||||
// data.route contains: routeStart, routeEnd, routeId, elecStart, elecEnd, routeDetail[]
|
// data.route contains: routeStart, routeEnd, routeId, elecStart, elecEnd, routeDetail[]
|
||||||
export let data;
|
export let data;
|
||||||
@@ -61,8 +63,8 @@
|
|||||||
<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="{base}/" class="home-link" title="Back to Index">
|
<a href={resolve('/')} aria-label="Home" class="home-link" title="Back to Index">
|
||||||
<span class="home-icon">⌂</span>
|
<img src={logo} alt="OwlBoard Logo" class="nav-logo" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="route-stack">
|
<div class="route-stack">
|
||||||
@@ -149,6 +151,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
height: 80px;
|
||||||
left: 0;
|
left: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -171,20 +174,19 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 36px;
|
width: 52px;
|
||||||
height: 36px;
|
height: 52px;
|
||||||
background: #404c55;
|
|
||||||
border: 1px solid #334155;
|
|
||||||
border-radius: 8px;
|
|
||||||
color: #e1ebeb;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-link:hover {
|
.home-link:hover {
|
||||||
background: #2d2d2d;
|
transform: translateY(-1px) scale(1.05);
|
||||||
|
filter: brightness(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-link:active {
|
||||||
|
transform: scale(0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
.route-stack {
|
.route-stack {
|
||||||
@@ -229,11 +231,7 @@
|
|||||||
|
|
||||||
.top-nav {
|
.top-nav {
|
||||||
padding: 0 2rem;
|
padding: 0 2rem;
|
||||||
height: 90px;
|
height: 80px;
|
||||||
}
|
|
||||||
|
|
||||||
.map-spine {
|
|
||||||
padding-top: 90px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|||||||
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
static/fonts/urwgothic/urwgothic.woff
Normal file
BIN
static/fonts/urwgothic/urwgothic.woff
Normal file
Binary file not shown.
BIN
static/fonts/urwgothic/urwgothic.woff2
Normal file
BIN
static/fonts/urwgothic/urwgothic.woff2
Normal file
Binary file not shown.
BIN
static/fonts/urwgothic/urwgothicDemi.woff
Normal file
BIN
static/fonts/urwgothic/urwgothicDemi.woff
Normal file
Binary file not shown.
BIN
static/fonts/urwgothic/urwgothicDemi.woff2
Normal file
BIN
static/fonts/urwgothic/urwgothicDemi.woff2
Normal file
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
routeStart: Paddington
|
routeStart: Paddington
|
||||||
routeEnd: Reading West Jn
|
routeEnd: Reading
|
||||||
routeId: 0001
|
routeId: 0001
|
||||||
created: 2026-02-04
|
created: 2026-02-04
|
||||||
checked: 2026-02-06
|
checked: 2026-02-09
|
||||||
signallerStart: TVSC Paddington WS
|
signallerStart: TVSC Paddington WS
|
||||||
signallerEnd: TVSC Reading WS
|
signallerEnd: TVSC Reading WS
|
||||||
elecStart:
|
elecStart:
|
||||||
@@ -154,11 +154,11 @@ routeDetail:
|
|||||||
miles: 3
|
miles: 3
|
||||||
chains: 0
|
chains: 0
|
||||||
|
|
||||||
- type: junction
|
- type: siteof
|
||||||
name: Old Oak Common West
|
name: Old Oak Common West
|
||||||
diverges: left
|
diverges: left
|
||||||
direction: up
|
direction: up
|
||||||
description: Out of Use for HS2 Works
|
description: Junction has been removed
|
||||||
miles: 3
|
miles: 3
|
||||||
chains: 20
|
chains: 20
|
||||||
|
|
||||||
@@ -180,7 +180,8 @@ routeDetail:
|
|||||||
name: Friars Junction
|
name: Friars Junction
|
||||||
diverges: left
|
diverges: left
|
||||||
direction: up
|
direction: up
|
||||||
description: Out of Use for HS2 Works
|
elecBranch: none
|
||||||
|
description: Out of Use for HS2 Works. Track temporarily disconnected.
|
||||||
miles: 3
|
miles: 3
|
||||||
chains: 53
|
chains: 53
|
||||||
|
|
||||||
@@ -314,6 +315,7 @@ routeDetail:
|
|||||||
name: West Ealing Junction
|
name: West Ealing Junction
|
||||||
diverges: left
|
diverges: left
|
||||||
direction: down
|
direction: down
|
||||||
|
elecBranch: none
|
||||||
description: Dn/Up Greenford to Greenford & West Ealing Sidings
|
description: Dn/Up Greenford to Greenford & West Ealing Sidings
|
||||||
miles: 6
|
miles: 6
|
||||||
chains: 54
|
chains: 54
|
||||||
@@ -329,6 +331,7 @@ routeDetail:
|
|||||||
name: Hanwell Junction
|
name: Hanwell Junction
|
||||||
diverges: left
|
diverges: left
|
||||||
direction: up
|
direction: up
|
||||||
|
elecBranch: none
|
||||||
description: Dn/Up Loop to Greenford & West Ealing Sidings
|
description: Dn/Up Loop to Greenford & West Ealing Sidings
|
||||||
miles: 7
|
miles: 7
|
||||||
chains: 19
|
chains: 19
|
||||||
@@ -371,6 +374,8 @@ routeDetail:
|
|||||||
- type: loop
|
- type: loop
|
||||||
position: left
|
position: left
|
||||||
name: Hanwell Up & Dn Goods Loops
|
name: Hanwell Up & Dn Goods Loops
|
||||||
|
description: Both on Up side
|
||||||
|
elecLoop: none
|
||||||
miles: 8
|
miles: 8
|
||||||
chains: 20
|
chains: 20
|
||||||
|
|
||||||
@@ -392,6 +397,7 @@ routeDetail:
|
|||||||
name: Southall East Junction
|
name: Southall East Junction
|
||||||
diverges: right
|
diverges: right
|
||||||
direction: up
|
direction: up
|
||||||
|
elecBranch: none
|
||||||
description: Brentford Waste Terminal & Southall Depot
|
description: Brentford Waste Terminal & Southall Depot
|
||||||
miles: 8
|
miles: 8
|
||||||
chains: 62
|
chains: 62
|
||||||
@@ -638,6 +644,7 @@ routeDetail:
|
|||||||
name: Langley GF
|
name: Langley GF
|
||||||
diverges: left
|
diverges: left
|
||||||
description: Langley Sidings
|
description: Langley Sidings
|
||||||
|
elecBranch: none
|
||||||
direction: up
|
direction: up
|
||||||
miles: 15
|
miles: 15
|
||||||
chains: 76
|
chains: 76
|
||||||
@@ -1212,43 +1219,6 @@ routeDetail:
|
|||||||
miles: 35
|
miles: 35
|
||||||
chains: 78
|
chains: 78
|
||||||
|
|
||||||
- type: bridge
|
|
||||||
name: Caversham Road
|
|
||||||
position: under
|
|
||||||
category: minorRoad
|
|
||||||
miles: 35
|
|
||||||
chains: 11
|
|
||||||
|
|
||||||
- type: junction
|
|
||||||
diverges: right
|
|
||||||
direction: down
|
|
||||||
name: Westbury Line Junction
|
|
||||||
description: to Oxford Road Jn
|
|
||||||
miles: 36
|
|
||||||
chains: 17
|
|
||||||
|
|
||||||
- type: junction
|
|
||||||
diverges: right
|
|
||||||
direction: down
|
|
||||||
name: Caversham Road Junction
|
|
||||||
description: Reading Feeder Main/Relief diverge and pass under Reading Viaduct to Oxford Rd Jn
|
|
||||||
miles: 36
|
|
||||||
chains: 22
|
|
||||||
|
|
||||||
- type: crossovers
|
|
||||||
name: Reading High Level Junction
|
|
||||||
description: Down Reading Festival Connects to Down Main
|
|
||||||
miles: 36
|
|
||||||
chains: 47
|
|
||||||
|
|
||||||
- type: junction
|
|
||||||
diverges: right
|
|
||||||
direction: up
|
|
||||||
name: Reading West Junction
|
|
||||||
description: to Oxford Road Junction (From relief lines only)
|
|
||||||
miles: 37
|
|
||||||
chains: 17
|
|
||||||
|
|
||||||
- type: continues
|
- type: continues
|
||||||
routeName: Reading West Jn - Bristol TM
|
routeName: Reading - Bristol TM
|
||||||
routeId: '0002'
|
routeId: '0002'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
routeStart: Reading West Jn
|
routeStart: Reading
|
||||||
routeEnd: Bristol TM
|
routeEnd: Bristol TM
|
||||||
routeId: 0002
|
routeId: 0002
|
||||||
created: 2026-02-04
|
created: 2026-02-04
|
||||||
@@ -12,10 +12,47 @@ elecEnd:
|
|||||||
elec: none
|
elec: none
|
||||||
routeDetail:
|
routeDetail:
|
||||||
- type: continues
|
- type: continues
|
||||||
routeName: Paddington - Reading West Jn
|
routeName: Paddington - Reading
|
||||||
routeId: '0001'
|
routeId: '0001'
|
||||||
|
|
||||||
|
- type: station
|
||||||
|
name: Reading
|
||||||
|
miles: 35
|
||||||
|
chains: 78
|
||||||
|
|
||||||
|
- type: bridge
|
||||||
|
name: Caversham Road
|
||||||
|
position: under
|
||||||
|
category: minorRoad
|
||||||
|
miles: 35
|
||||||
|
chains: 11
|
||||||
|
|
||||||
|
- type: junction
|
||||||
|
diverges: right
|
||||||
|
direction: down
|
||||||
|
name: Westbury Line Junction
|
||||||
|
description: to Oxford Road Jn
|
||||||
|
miles: 36
|
||||||
|
chains: 17
|
||||||
|
|
||||||
|
- type: junction
|
||||||
|
diverges: right
|
||||||
|
direction: down
|
||||||
|
name: Caversham Road Junction
|
||||||
|
description: Reading Feeder Main/Relief diverge and pass under Reading Viaduct to Oxford Rd Jn
|
||||||
|
miles: 36
|
||||||
|
chains: 22
|
||||||
|
|
||||||
- type: crossovers
|
- type: crossovers
|
||||||
name: Scours Lane Junction
|
name: Reading High Level Junction
|
||||||
description: Line diverges
|
description: Down Reading Festival Connects to Down Main
|
||||||
miles: 38
|
miles: 36
|
||||||
chains: 90
|
chains: 47
|
||||||
|
|
||||||
|
- type: junction
|
||||||
|
diverges: right
|
||||||
|
direction: up
|
||||||
|
name: Reading West Junction
|
||||||
|
description: to Oxford Road Junction (From relief lines only)
|
||||||
|
miles: 37
|
||||||
|
chains: 17
|
||||||
|
|||||||
23
static/mapFiles/yaml/0240.yaml
Normal file
23
static/mapFiles/yaml/0240.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
routeStart: Wootton Bassett Junction
|
||||||
|
routeEnd: Stoke Gifford Junction
|
||||||
|
routeId: 0240
|
||||||
|
created: 2026-02-10
|
||||||
|
checked:
|
||||||
|
signallerStart: TVSC Swindon WS
|
||||||
|
signallerEnd: TVSC Stoke Gifford WS
|
||||||
|
elecStart:
|
||||||
|
elec: 25kvac
|
||||||
|
eco: Didcot (TVSC)
|
||||||
|
elecEnd:
|
||||||
|
elec: 25kvac
|
||||||
|
eco: Didcot (TVSC)
|
||||||
|
routeDetail:
|
||||||
|
- type: continues
|
||||||
|
routeName: Reading - Bristol TM
|
||||||
|
entryPoint: wootton-bassett-junction
|
||||||
|
routeId: '0002'
|
||||||
|
|
||||||
|
- type: continues
|
||||||
|
routeName: Bristol TM - Cardiff West Shunt
|
||||||
|
entryPoint: patchway-junction
|
||||||
|
routeId: '9999'
|
||||||
@@ -2,5 +2,16 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [sveltekit()]
|
plugins: [
|
||||||
|
sveltekit(),
|
||||||
|
],
|
||||||
|
build: {
|
||||||
|
assetsInlineLimit: 0,
|
||||||
|
cssCodeSplit: true,
|
||||||
|
sourcemap: false,
|
||||||
|
target: 'esnext',
|
||||||
|
modulePreload: {
|
||||||
|
polyfill: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user