images go behind the dates now

This commit is contained in:
2026-02-11 19:55:48 +13:00
parent 74023040fc
commit 09585d8954
3 changed files with 4 additions and 4 deletions

View File

@@ -53,15 +53,15 @@
> >
{#snippet day({ day })} {#snippet day({ day })}
<CalendarDay> <CalendarDay>
{day.day}
{@const img = getImageForDate(day)} {@const img = getImageForDate(day)}
{#if img} {#if img}
<img <img
src={img} src={img}
alt="" alt=""
class="h-4 w-full rounded-sm object-cover" class="absolute inset-0 h-full w-full rounded-sm object-cover hover:opacity-20"
/> />
{/if} {/if}
<span class="relative z-10 text-white">{day.day}</span>
</CalendarDay> </CalendarDay>
{/snippet} {/snippet}
</Calendar> </Calendar>

View File

@@ -14,7 +14,7 @@
bind:ref bind:ref
class={cn( class={cn(
buttonVariants({ variant: "ghost" }), buttonVariants({ variant: "ghost" }),
"flex size-(--cell-size) flex-col items-center justify-center gap-1 p-0 leading-none font-normal whitespace-nowrap select-none", "relative flex flex-1 flex-col items-center justify-center gap-1 p-0 leading-none font-normal whitespace-nowrap select-none",
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground", "[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground",
"data-[selected]:bg-primary dark:data-[selected]:hover:bg-accent/50 data-[selected]:text-primary-foreground", "data-[selected]:bg-primary dark:data-[selected]:hover:bg-accent/50 data-[selected]:text-primary-foreground",
// Outside months // Outside months

View File

@@ -9,4 +9,4 @@
}: CalendarPrimitive.GridRowProps = $props(); }: CalendarPrimitive.GridRowProps = $props();
</script> </script>
<CalendarPrimitive.GridRow bind:ref class={cn("flex", className)} {...restProps} /> <CalendarPrimitive.GridRow bind:ref class={cn("flex flex-1 gap-1", className)} {...restProps} />