diff --git a/src/lib/components/ui/TocStyle.svelte b/src/lib/components/ui/TocStyle.svelte new file mode 100644 index 0000000..3349838 --- /dev/null +++ b/src/lib/components/ui/TocStyle.svelte @@ -0,0 +1,53 @@ + + +
+ {code} +
+ + \ No newline at end of file diff --git a/src/routes/pis/+page.svelte b/src/routes/pis/+page.svelte index b473dee..c33db91 100644 --- a/src/routes/pis/+page.svelte +++ b/src/routes/pis/+page.svelte @@ -4,7 +4,7 @@ import Button from '$lib/components/ui/Button.svelte'; import type { PisObjects } from '@owlboard/api-schema-types'; import { OwlClient, ApiError, ValidationError } from '$lib/owlClient'; - + import TocStyle from '$lib/components/ui/TocStyle.svelte'; let results = $state([]); let resultsLoaded = $state(false); @@ -70,10 +70,22 @@ {errorState.message} {:else} {#if results.length} -

{results.length} Result{#if results.length > 1}s{/if} found:

- {#each results as result} -

{JSON.stringify(result)}

- {/each} +

{results.length} Result{#if results.length > 1}s{/if} found

+ + + + + + + + {#each results as result} + + + + + + {/each} +
TOCCodeLocations
{result.code}{result.crsStops.join(' ')}
{:else}

No matching results

{/if} @@ -107,11 +119,33 @@ padding: 20px 0 20px 0; margin: auto; margin-top: 25px; + margin-bottom: 25px; width: 90%; - max-width: 1000px; + max-width: 500px; box-shadow: var(--shadow-std); } + .result-title { + color: var(--color-brand); + } + + .result-table { + width: 90%; + max-width: 350px; + margin: auto; + text-align: center; + table-layout: fixed; + border-collapse: separate; + border-spacing: 0 20px; + font-weight: 400; + } + + .locations-row { + font-family:'Courier New', Courier, monospace; + text-align: left; + padding-left: 20px; + } + .errCode { color: rgb(255, 54, 54); font-weight: 600;