From 05a04ec922edc75b23d6e0ed8b00c08c1c0ae2b0 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 5 May 2026 19:24:31 +0100 Subject: [PATCH] Add PIS Data formatting to TrainService expander --- src/lib/components/ui/Textbox.svelte | 62 +++++++++--------- src/lib/components/ui/TrainService.svelte | 65 ++++++++++++++----- .../ui/cards/HeadcodeSearchCard.svelte | 7 +- 3 files changed, 85 insertions(+), 49 deletions(-) diff --git a/src/lib/components/ui/Textbox.svelte b/src/lib/components/ui/Textbox.svelte index 8619f50..95ccd23 100644 --- a/src/lib/components/ui/Textbox.svelte +++ b/src/lib/components/ui/Textbox.svelte @@ -33,7 +33,7 @@ if (onsubmit && value) { onsubmit(value); } - } + };
@@ -42,28 +42,28 @@ {/if}
- (isFocussed = true)} - onblur={() => (isFocussed = false)} - {...rest} - /> + (isFocussed = true)} + onblur={() => (isFocussed = false)} + {...rest} + /> - {#if onsubmit} - - {/if} + {#if onsubmit} + + {/if}
{#if error} @@ -125,18 +125,20 @@ align-items: center; justify-content: center; opacity: 0.75; - transition: opacity 0.2s, transform 0.2s; + transition: + opacity 0.2s, + transform 0.2s; } .submit-icon:hover:not(:disabled) { - opacity: 1; - transform: translateX(2px); - } + opacity: 1; + transform: translateX(2px); + } - .submit-icon:disabled { - opacity: 0.5; - cursor: not-allowed; - } + .submit-icon:disabled { + opacity: 0.5; + cursor: not-allowed; + } .all-caps { text-transform: uppercase; diff --git a/src/lib/components/ui/TrainService.svelte b/src/lib/components/ui/TrainService.svelte index 820918d..e83d87a 100644 --- a/src/lib/components/ui/TrainService.svelte +++ b/src/lib/components/ui/TrainService.svelte @@ -93,7 +93,7 @@ }; -
+
@@ -173,8 +181,7 @@ {#each details.locations as loc} - - + {loc.t} @@ -202,18 +209,17 @@ {/if} {#if loc.act && getRelevantActivities(loc.act).length > 0} - - -
- {#each getRelevantActivities(loc.act) as note} - {note} - {/each} -
- - + + +
+ {#each getRelevantActivities(loc.act) as note} + {note} + {/each} +
+ + {/if} - - {/each} + {/each}
@@ -318,6 +324,29 @@ color: red; } + /* + PIS Data + */ + .pis-detail { + display: flex; + align-items: center; + flex-direction: column; + gap: 0.2rem; + padding: 8px 0; + width: 100%; + } + .pis-code { + font-weight: 600; + font-size: 1.1rem; + letter-spacing: 0.05em; + } + + .pis-skip { + font-size: 0.85rem; + opacity: 0.75; + font-style: oblique; + } + /* Box Extention */ @@ -416,9 +445,9 @@ .activity-tag { background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.05); - padding: 2px 6px; - border-radius: 4px; + border: 1px solid rgba(255, 255, 255, 0.05); + padding: 2px 6px; + border-radius: 4px; } .tpl-cell { diff --git a/src/lib/components/ui/cards/HeadcodeSearchCard.svelte b/src/lib/components/ui/cards/HeadcodeSearchCard.svelte index 477e46a..975923c 100644 --- a/src/lib/components/ui/cards/HeadcodeSearchCard.svelte +++ b/src/lib/components/ui/cards/HeadcodeSearchCard.svelte @@ -18,7 +18,12 @@
- +