Skip to content

Commit

Permalink
fix(timelineHome): item gradient (#113)
Browse files Browse the repository at this point in the history
* fix(timelineHome): improved gradients

* fix(timelineHome): improved gradients
  • Loading branch information
bbtgnn committed Sep 18, 2023
1 parent 36dec1b commit 60598fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/timeline/home/TimelineHomeItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
export let item: TimelineItem;
const { bg, accent, border } = timelineColors[item.type] ?? timelineColors['default'];
const isDefaultBackground = accent == timelineColors.default.accent;
</script>

<div class="relative py-6 select-none">
Expand All @@ -16,14 +18,16 @@
<div class="space-y-3 text-white relative p-4 h-0 grow overflow-hidden">
{#if item.description}
<p class="text-gray-400 text-xl">{item.description}</p>
<div class={`absolute bottom-0 left-0 w-full h-full bg-gradient-to-t from-black`} />
<div class="absolute bottom-0 left-0 w-full h-full bg-gradient-to-t from-[var(--secondary-accent-color)]" />
{/if}
<div class={`absolute bottom-0 left-0 w-full h-full ${bg}`} />
</div>
<div class={`${bg} p-4 shrink-0`}>
<a
href={`/timeline#${encodeURIComponent(item.title)}`}
class={`block w-fit ${accent} px-3 py-2 rounded-full text-lg`}
class={`block w-fit ${accent} px-3 py-2 rounded-full text-lg ${
isDefaultBackground ? 'text-black' : 'text-white'
}`}
>
See more
</a>
Expand Down

0 comments on commit 60598fb

Please sign in to comment.