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;
}

View File

@@ -1,4 +1,4 @@
import { json } from "@sveltejs/kit";
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';
@@ -7,39 +7,39 @@ 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",
},
],
};
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',
}
})
}
return json(manifest, {
headers: {
'Content-Type': 'application/manifest+json',
'Cache-Control': 'public, max-age=3600'
}
});
};

View File

@@ -88,13 +88,13 @@
</header>
{#if showFilters}
<div
class="backdrop"
role="button"
tabindex="0"
onclick={() => (showFilters = false)}
onkeydown={(e) => (e.key === 'Enter' || e.key === ' ') && (showFilters = false)}
></div>
<div
class="backdrop"
role="button"
tabindex="0"
onclick={() => (showFilters = false)}
onkeydown={(e) => (e.key === 'Enter' || e.key === ' ') && (showFilters = false)}
></div>
<div class="filter-drawer" transition:slide>
<div class="drawer-header">