Fix linter warnings
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import RouteRow from '$lib/components/RouteRow.svelte';
|
||||
import RouteEndLink from '$lib/components/mapIcons/RouteEndLink.svelte';
|
||||
import { slide } from 'svelte/transition';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
// data.route contains: routeStart, routeEnd, routeId, elecStart, elecEnd, routeDetail[]
|
||||
export let data;
|
||||
@@ -58,31 +59,31 @@
|
||||
</script>
|
||||
|
||||
<div class="map-layout">
|
||||
<header class="top-nav">
|
||||
<div class="nav-cluster">
|
||||
<a href="/" class="home-link" title="Back to Index">
|
||||
<span class="home-icon">⌂</span>
|
||||
</a>
|
||||
|
||||
<div class="route-stack">
|
||||
{#if data?.route}
|
||||
<h1 class="primary-station">
|
||||
{reversed ? data.route.routeEnd : data.route.routeStart}
|
||||
</h1>
|
||||
<span class="secondary-station">
|
||||
to {reversed ? data.route.routeStart : data.route.routeEnd}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<header class="top-nav">
|
||||
<div class="nav-cluster">
|
||||
<a href="{base}/" class="home-link" title="Back to Index">
|
||||
<span class="home-icon">⌂</span>
|
||||
</a>
|
||||
|
||||
<div class="quick-actions">
|
||||
<button class="icon-btn" on:click={() => (reversed = !reversed)}>
|
||||
⇄ {reversed ? 'UP' : 'DN'}
|
||||
</button>
|
||||
<button class="icon-btn" on:click={() => (showFilters = !showFilters)}> Settings </button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="route-stack">
|
||||
{#if data?.route}
|
||||
<h1 class="primary-station">
|
||||
{reversed ? data.route.routeEnd : data.route.routeStart}
|
||||
</h1>
|
||||
<span class="secondary-station">
|
||||
to {reversed ? data.route.routeStart : data.route.routeEnd}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="quick-actions">
|
||||
<button class="icon-btn" on:click={() => (reversed = !reversed)}>
|
||||
⇄ {reversed ? 'UP' : 'DN'}
|
||||
</button>
|
||||
<button class="icon-btn" on:click={() => (showFilters = !showFilters)}> Settings </button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{#if showFilters}
|
||||
<div class="backdrop" on:click={() => (showFilters = false)}></div>
|
||||
@@ -106,7 +107,7 @@
|
||||
|
||||
<div class="drawer-content">
|
||||
<div class="filter-flex">
|
||||
{#each Object.keys(visibleTypes) as type}
|
||||
{#each Object.keys(visibleTypes) as type (type)}
|
||||
<button
|
||||
class="filter-chip"
|
||||
class:active={visibleTypes[type]}
|
||||
@@ -143,82 +144,82 @@
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.top-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.5rem 1rem;
|
||||
background: #0f172a;
|
||||
color: white;
|
||||
gap: 1rem;
|
||||
}
|
||||
.top-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.5rem 1rem;
|
||||
background: #0f172a;
|
||||
color: white;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.nav-cluster {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
min-width: 0; /* Prevents flex children from overflowing */
|
||||
}
|
||||
.nav-cluster {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
min-width: 0; /* Prevents flex children from overflowing */
|
||||
}
|
||||
|
||||
.home-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: #1e293b;
|
||||
border: 1px solid #334155;
|
||||
border-radius: 8px;
|
||||
color: #94a3b8;
|
||||
text-decoration: none;
|
||||
font-size: 1.2rem;
|
||||
flex-shrink: 0; /* Keeps button from squishing on mobile */
|
||||
}
|
||||
.home-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: #1e293b;
|
||||
border: 1px solid #334155;
|
||||
border-radius: 8px;
|
||||
color: #94a3b8;
|
||||
text-decoration: none;
|
||||
font-size: 1.2rem;
|
||||
flex-shrink: 0; /* Keeps button from squishing on mobile */
|
||||
}
|
||||
|
||||
.home-link:hover {
|
||||
background: #334155;
|
||||
color: white;
|
||||
border-color: #475569;
|
||||
}
|
||||
.home-link:hover {
|
||||
background: #334155;
|
||||
color: white;
|
||||
border-color: #475569;
|
||||
}
|
||||
|
||||
.route-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
.route-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.primary-station {
|
||||
font-size: 1rem;
|
||||
font-weight: 800;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.primary-station {
|
||||
font-size: 1rem;
|
||||
font-weight: 800;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.secondary-station {
|
||||
font-size: 0.7rem;
|
||||
color: #94a3b8;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
}
|
||||
.secondary-station {
|
||||
font-size: 0.7rem;
|
||||
color: #94a3b8;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.quick-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.quick-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
background: #1e293b;
|
||||
border: 1px solid #334155;
|
||||
color: white;
|
||||
padding: 0.4rem 0.6rem;
|
||||
border-radius: 6px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.icon-btn {
|
||||
background: #1e293b;
|
||||
border: 1px solid #334155;
|
||||
color: white;
|
||||
padding: 0.4rem 0.6rem;
|
||||
border-radius: 6px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.map-spine {
|
||||
padding-top: 72px;
|
||||
|
||||
Reference in New Issue
Block a user