From 39a4e702fd854a4b4c1be1c2b6659894611a9c23 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 14 Jan 2026 21:13:26 -0600 Subject: [PATCH] feat: add responsive tag overflow with dynamic video/image backgrounds - TagList component with binary search overflow calculation and +N pill - ProjectCard background media layer with gradient mask and hover effects - Random video/image selection per card with play on hover - Responsive tag wrapping with ResizeObserver --- web/src/app.css | 15 +++ web/src/lib/components/OverflowPill.svelte | 23 ++++ web/src/lib/components/ProjectCard.svelte | 118 +++++++++++++++-- web/src/lib/components/TagChip.svelte | 2 +- web/src/lib/components/TagList.svelte | 142 +++++++++++++++++++++ 5 files changed, 286 insertions(+), 14 deletions(-) create mode 100644 web/src/lib/components/OverflowPill.svelte create mode 100644 web/src/lib/components/TagList.svelte diff --git a/web/src/app.css b/web/src/app.css index bc223e7..dd943b3 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -175,3 +175,18 @@ html.dark { ::view-transition-new(page-content) { animation: vt-slide-from-right 250ms cubic-bezier(0.4, 0, 0.2, 1) both; } + +/* Media mask for project card background images/videos - fades from transparent (left) to solid (right) */ +.media-mask-fade-left { + mask-image: linear-gradient( + to right, + transparent 0%, + /* Non-linear stops to help breakup the gradient better */ + rgba(0, 0, 0, 0.08) 12%, + rgba(0, 0, 0, 0.2) 22%, + rgba(0, 0, 0, 0.4) 32%, + rgba(0, 0, 0, 0.65) 42%, + rgba(0, 0, 0, 0.85) 52%, + black 65% + ); +} diff --git a/web/src/lib/components/OverflowPill.svelte b/web/src/lib/components/OverflowPill.svelte new file mode 100644 index 0000000..f54a06e --- /dev/null +++ b/web/src/lib/components/OverflowPill.svelte @@ -0,0 +1,23 @@ + + + + +{count} + diff --git a/web/src/lib/components/ProjectCard.svelte b/web/src/lib/components/ProjectCard.svelte index b3d4433..44c4d10 100644 --- a/web/src/lib/components/ProjectCard.svelte +++ b/web/src/lib/components/ProjectCard.svelte @@ -1,12 +1,15 @@ diff --git a/web/src/lib/components/TagList.svelte b/web/src/lib/components/TagList.svelte new file mode 100644 index 0000000..e70cf00 --- /dev/null +++ b/web/src/lib/components/TagList.svelte @@ -0,0 +1,142 @@ + + +
+ {#each visibleTags as tag (tag.name)} + + {/each} + {#if hiddenTags.length > 0} + + {/if} +