Skip to content

Commit

Permalink
feat: ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tunny17 committed Dec 4, 2024
1 parent 8a1863e commit c7af0e2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
8 changes: 8 additions & 0 deletions src/lib/assets/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 22 additions & 11 deletions src/lib/pages/home/marquee-card.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<script lang="ts">
import { cn } from '$lib/utils';
import starIcon from '$lib/assets/star.svg';
export let author_avatar: string;
export let name: string;
export let author: string;
export let description: string;
export let stars: number;
export let link: string;
</script>

<figure
<a
href={link}
target="_blank"
class={cn(
'relative w-72 cursor-pointer overflow-hidden rounded-2xl border p-4',
// light styles
Expand All @@ -16,15 +21,21 @@
'dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]'
)}
>
<div class="flex flex-row items-center gap-2">
<img class="rounded-full" width="32" height="32" alt="" src={author_avatar} />
<div class="flex flex-col">
<!-- svelte-ignore a11y-structure -->
<figcaption class="text-sm font-medium dark:text-white">
{name}
</figcaption>
<p class="text-xs font-medium dark:text-white/40">{author}</p>
<div class="flex flex-row justify-between items-center">
<div class="flex flex-row items-center gap-2">
<img class="rounded-full" width="32" height="32" alt="" src={author_avatar} />
<div class="flex flex-col">
<!-- svelte-ignore a11y-structure -->
<figcaption class="text-sm font-medium dark:text-white">
{name}
</figcaption>
<p class="text-xs font-medium dark:text-white/40">{author}</p>
</div>
</div>
<div class="flex items-center gap-2">
<img src={starIcon} alt="" class="w-5 text-white fill-white" />
<p class="text-xs">{stars}</p>
</div>
</div>
<blockquote class="mt-2 text-sm">{description}</blockquote>
</figure>
<blockquote class="mt-2 text-sm line-clamp-3">{description}</blockquote>
</a>

0 comments on commit c7af0e2

Please sign in to comment.