Run prettify

This commit is contained in:
2026-02-10 22:11:17 +00:00
parent 353fd07b92
commit 7777671cbb
8 changed files with 98 additions and 103 deletions

View File

@@ -2,9 +2,9 @@
import logo from '$lib/assets/round-logo-text.svg';
import type { PageData } from './$types';
import { resolve } from '$app/paths';
let { data }: { data: PageData } = $props();
let searchTerm = $state('');
let searchTerm = $state('');
let filteredMaps = $derived(
data.maps.filter((m) => {
@@ -12,9 +12,7 @@
if (m.routeId.toString().includes(term)) return true;
return m.contents.some(location =>
location.toLowerCase().includes(term)
);
return m.contents.some((location) => location.toLowerCase().includes(term));
})
);
@@ -22,7 +20,7 @@
if (typeof window !== 'undefined' && window.navigator.vibrate) {
window.navigator.vibrate(pattern);
}
}
};
const isVerifiedRecently = (dateVal: string | null) => {
if (!dateVal) return 'draft';
@@ -52,25 +50,20 @@
<div class="page-wrapper">
<header class="main-header">
<div class="brand-container">
<img
src={logo}
alt="OwlBoard Logo"
class="main-logo"
/>
<img src={logo} alt="OwlBoard Logo" class="main-logo" />
</div>
</header>
<div class="list-container">
<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"
/>
<input type="text" bind:value={searchTerm} placeholder="Search" class="search-input" />
{#each filteredMaps as map (map.routeId)}
<a href={resolve(`/map/${map.routeId.toString().padStart(4, '0')}`)} class="card" onclick={() => vibrate(10)}>
<a
href={resolve(`/map/${map.routeId.toString().padStart(4, '0')}`)}
class="card"
onclick={() => vibrate(10)}
>
<div class="card-top">
<span class="route-id">{map.routeId.toString().padStart(4, '0')}</span>
<span class="status-badge {isVerifiedRecently(map.checked)}">
@@ -150,7 +143,7 @@
.search-input {
width: 100%;
max-width: 500px;
font-family: "urwgothic";
font-family: 'urwgothic';
margin: auto;
height: 40px;
padding: 0.8rem 1rem;
@@ -254,14 +247,14 @@
}
.location {
font-family: "urwgothic";
font-family: 'urwgothic';
font-size: 1.23rem;
font-weight: 700;
}
.path-arrow {
color: #fff;
font-family: "urwgothic";
font-family: 'urwgothic';
font-size: 0.9rem;
margin: 0.2rem 0;
}