|
4 | 4 | description: string; |
5 | 5 | url: string; |
6 | 6 | screenshot: string; |
| 7 | + source?: string; |
7 | 8 | } |
8 | 9 |
|
9 | | - let { title, description, url, screenshot }: Props = $props(); |
| 10 | + let { title, description, url, screenshot, source }: Props = $props(); |
10 | 11 | </script> |
11 | 12 |
|
12 | | -<div class="overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_5px_20px_#0001]"> |
| 13 | +<div class="overflow-hidden flex flex-col rounded-xl border border-slate-100 bg-white shadow-[0_5px_20px_#0001]"> |
13 | 14 | <div class="relative flex h-10 items-center justify-between border-b border-slate-100 px-4"> |
14 | 15 | <div class="flex items-center space-x-2"> |
15 | 16 | <div class="h-3 w-3 rounded-full bg-slate-200"></div> |
|
30 | 31 | <img src={screenshot} alt={title} class="h-full w-full object-cover object-top" /> |
31 | 32 | </div> |
32 | 33 |
|
33 | | - <div class="border-t border-slate-100 p-4"> |
34 | | - <p class="mb-3 text-sm text-slate-600">{description}</p> |
35 | | - <a |
36 | | - href={url} |
37 | | - target="_blank" |
38 | | - rel="noopener noreferrer" |
39 | | - class="inline-flex items-center gap-2 text-sm font-medium text-blue-500 transition-colors hover:text-blue-600" |
40 | | - > |
41 | | - View Live |
42 | | - <svg |
43 | | - xmlns="http://www.w3.org/2000/svg" |
44 | | - fill="none" |
45 | | - viewBox="0 0 24 24" |
46 | | - stroke-width="1.5" |
47 | | - stroke="currentColor" |
48 | | - class="h-4 w-4" |
49 | | - > |
50 | | - <path |
51 | | - stroke-linecap="round" |
52 | | - stroke-linejoin="round" |
53 | | - d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" |
54 | | - /> |
55 | | - </svg> |
56 | | - </a> |
| 34 | + <div class="border-t border-slate-100 p-4 flex-1"> |
| 35 | + <div class=" justify-between flex flex-col h-full"> |
| 36 | + <p class="mb-3 text-sm text-slate-600">{description}</p> |
| 37 | + <div class="flex items-center justify-between"> |
| 38 | + <a |
| 39 | + href={url} |
| 40 | + target="_blank" |
| 41 | + rel="noopener noreferrer" |
| 42 | + class="inline-flex items-center gap-2 text-sm font-medium text-blue-500 transition-colors hover:text-blue-600" |
| 43 | + > |
| 44 | + View Live |
| 45 | + <svg |
| 46 | + xmlns="http://www.w3.org/2000/svg" |
| 47 | + fill="none" |
| 48 | + viewBox="0 0 24 24" |
| 49 | + stroke-width="1.5" |
| 50 | + stroke="currentColor" |
| 51 | + class="h-4 w-4" |
| 52 | + > |
| 53 | + <path |
| 54 | + stroke-linecap="round" |
| 55 | + stroke-linejoin="round" |
| 56 | + d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" |
| 57 | + /> |
| 58 | + </svg> |
| 59 | + </a> |
| 60 | + {#if source} |
| 61 | + <a |
| 62 | + href={source} |
| 63 | + target="_blank" |
| 64 | + rel="noopener noreferrer" |
| 65 | + class="inline-flex items-center gap-2 text-sm font-medium text-slate-500 transition-colors hover:text-slate-700" |
| 66 | + > |
| 67 | + Source |
| 68 | + <img src="/github.svg" alt="github" class="h-4 w-4" /> |
| 69 | + </a> |
| 70 | + {/if} |
| 71 | + </div> |
| 72 | + </div> |
57 | 73 | </div> |
58 | 74 | </div> |
0 commit comments