Run prettier

This commit is contained in:
2026-02-07 00:38:56 +00:00
parent ca5e78e2b1
commit cfa1d44dbc
4 changed files with 1275 additions and 1265 deletions

View File

@@ -6,4 +6,4 @@ bun.lock
bun.lockb
# Miscellaneous
/static/
#/static/

View File

@@ -5,12 +5,6 @@
let searchTerm = '';
const formatDate = (dateVal: string | null) => {
if (!dateVal) return '---';
const d = new Date(dateVal);
return d.toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: '2-digit' });
};
$: filteredMaps = data.maps.filter(
(m) =>
m.routeId.toString().includes(searchTerm) ||
@@ -26,6 +20,21 @@
return checkedDate > oneYearAgo ? 'verified' : 'stale';
};
const formatDate = (dateVal: string | null) => {
if (!dateVal) return 'N/A';
const date = new Date(dateVal);
// Check for invalid dates to avoid "NaN/NaN/NaN"
if (isNaN(date.getTime())) return 'Invalid Date';
const d = date.getDate().toString().padStart(2, '0');
const m = (date.getMonth() + 1).toString().padStart(2, '0');
const y = date.getFullYear().toString().slice(-2);
return `${d}/${m}/${y}`;
};
</script>
<div class="page-wrapper">
@@ -91,9 +100,9 @@
</div>
<div class="card-footer">
<span>Created: {formatDate(map.created)}</span>
<span>Created on {formatDate(map.created)}</span>
{#if map.checked}
<span>• Checked: {formatDate(map.checked)}</span>
<span>• Checked & Updated on {formatDate(map.checked)}</span>
{/if}
</div>
</a>
@@ -108,7 +117,7 @@
:global(body) {
margin: 0;
background-color: #404c55;
background-image: radial-gradient(#2b343c,#404c55);
background-image: radial-gradient(#2b343c, #404c55);
color: #0f172a;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

File diff suppressed because it is too large Load Diff

View File

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