Skip to content

Commit cbd6d11

Browse files
committed
sticky
1 parent e3597de commit cbd6d11

File tree

1 file changed

+42
-36
lines changed

1 file changed

+42
-36
lines changed

sitio-sveltekit/src/routes/+page.svelte

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@
120120
}
121121
122122
const longDateFormatter = Intl.DateTimeFormat('es-AR', {
123-
weekday: 'long',
123+
weekday: 'short',
124124
day: '2-digit',
125-
month: 'long',
125+
month: '2-digit',
126126
year: 'numeric',
127127
timeZone: 'America/Argentina/Buenos_Aires'
128128
});
@@ -190,41 +190,47 @@
190190
{/if}
191191
</svelte:head>
192192

193-
<h1 class="mb-4 flex items-end justify-center">
194-
<img src={FlybondiSvg} alt="Flybondi" class="h-8" />
195-
<span class="text-4xl font-medium leading-none text-red-600">.fail</span>
196-
</h1>
197-
198193
<main class="mx-auto max-w-[1000px]">
199-
<nav class="mb-4 flex items-center justify-between gap-4 text-center">
200-
{#if hasYesterdayData}
201-
<Button
202-
variant="outline"
203-
size="icon"
204-
href="/?date={dayjs(date).subtract(1, 'day').format('YYYY-MM-DD')}"
205-
>
206-
<ArrowLeftIcon class="h-4 w-4" />
207-
</Button>
208-
{:else}
209-
<div></div>
210-
{/if}
211-
<h3 class="text-brand flex flex-col items-center justify-center">
212-
<span class="leading-tight">viendo datos de</span>
213-
<span class="text-2xl font-bold leading-tight"
214-
>{longDateFormatter.format(dayjs(date).toDate())}</span
215-
>
216-
</h3>
217-
{#if hasTomorrowData}
218-
<Button
219-
variant="outline"
220-
size="icon"
221-
href="/?date={dayjs(date).add(1, 'day').format('YYYY-MM-DD')}"
222-
>
223-
<ArrowRightIcon class="h-4 w-4" />
224-
</Button>
225-
{:else}
226-
<div></div>
227-
{/if}
194+
<nav
195+
class="sticky top-0 mb-4 flex flex-col border-b bg-white pb-1 text-center dark:bg-neutral-800"
196+
>
197+
<h1 class="flex items-end justify-center">
198+
<img src={FlybondiSvg} alt="Flybondi" class="h-8" />
199+
<span class="text-4xl font-medium leading-none text-red-600">.fail</span>
200+
</h1>
201+
202+
<div class="flex items-center justify-between gap-4">
203+
{#if hasYesterdayData}
204+
<Button
205+
variant="outline"
206+
size="icon"
207+
class="size-8"
208+
href="/?date={dayjs(date).subtract(1, 'day').format('YYYY-MM-DD')}"
209+
>
210+
<ArrowLeftIcon class="h-4 w-4" />
211+
</Button>
212+
{:else}
213+
<div></div>
214+
{/if}
215+
<h3 class="flex flex-col items-center justify-center text-neutral-700 dark:text-neutral-300">
216+
<span class="text-xs leading-tight">viendo datos de</span>
217+
<span class=" font-bold leading-tight"
218+
>{longDateFormatter.format(dayjs(date).toDate()).replace(',', '')}</span
219+
>
220+
</h3>
221+
{#if hasTomorrowData}
222+
<Button
223+
variant="outline"
224+
size="icon"
225+
class="size-8"
226+
href="/?date={dayjs(date).add(1, 'day').format('YYYY-MM-DD')}"
227+
>
228+
<ArrowRightIcon class="h-4 w-4" />
229+
</Button>
230+
{:else}
231+
<div></div>
232+
{/if}
233+
</div>
228234
</nav>
229235

230236
{#if vuelos.length > 0}

0 commit comments

Comments
 (0)