From 7777671cbb281b93752368b26ebd06afb2a84332 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 10 Feb 2026 22:11:17 +0000 Subject: [PATCH] Run prettify --- scripts/parse-maps.js | 42 ++++++------- src/lib/assets/global.css | 24 +++++--- src/lib/components/RouteRow.svelte | 2 +- src/lib/components/mapIcons/SiteOf.svelte | 2 +- src/routes/+page.svelte | 37 +++++------ src/routes/manifest.webmanifest/+server.ts | 72 +++++++++++----------- src/routes/map/[slug]/+page.svelte | 14 ++--- vite.config.ts | 8 +-- 8 files changed, 98 insertions(+), 103 deletions(-) diff --git a/scripts/parse-maps.js b/scripts/parse-maps.js index c4194a1..c029690 100644 --- a/scripts/parse-maps.js +++ b/scripts/parse-maps.js @@ -22,27 +22,27 @@ fs.readdirSync(inputDir).forEach((file) => { 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 (Array.isArray(content.routeDetail)) { + content.routeDetail.forEach((item) => { + if ((item.type === 'junction' || item.type === 'station') && item.name) { + let cleanName = item.name; - if (cleanName) { - contentSet.add(cleanName); - } - } - }); -} + // 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({ routeId: content.routeId || null, @@ -50,7 +50,7 @@ if (Array.isArray(content.routeDetail)) { routeEnd: content.routeEnd || null, created: content.created || null, checked: content.checked || null, - contents: Array.from(contentSet), + contents: Array.from(contentSet) }); } }); diff --git a/src/lib/assets/global.css b/src/lib/assets/global.css index 1dbecea..dd525e1 100644 --- a/src/lib/assets/global.css +++ b/src/lib/assets/global.css @@ -1,17 +1,21 @@ /* 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-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; + 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; -} \ No newline at end of file + scroll-margin-top: 100px; +} diff --git a/src/lib/components/RouteRow.svelte b/src/lib/components/RouteRow.svelte index 3917c11..bd92df9 100644 --- a/src/lib/components/RouteRow.svelte +++ b/src/lib/components/RouteRow.svelte @@ -11,7 +11,7 @@ str?.toLocaleLowerCase().trim().replace(/\s+/g, '-') ?? 'unknown'; -
+
{feature.miles + 'm' || ''} {feature.chains + 'ch' || ''} diff --git a/src/lib/components/mapIcons/SiteOf.svelte b/src/lib/components/mapIcons/SiteOf.svelte index 582f3d5..c0439da 100644 --- a/src/lib/components/mapIcons/SiteOf.svelte +++ b/src/lib/components/mapIcons/SiteOf.svelte @@ -6,7 +6,7 @@ export let feature: any; export let reversed: boolean; - const pinSVG: string = `` + const pinSVG: string = ``;