|
1 |
| -import { Github } from 'lucide-react' |
| 1 | +import { ArrowUpRight } from 'lucide-react' |
| 2 | +import { useMediaQuery } from '@/hooks/useMediaQuery' |
2 | 3 |
|
3 | 4 | export type ProjectTileProps = {
|
4 | 5 | title: string
|
5 | 6 | description: string
|
6 | 7 | repo: boolean,
|
7 |
| - repoUrl: string |
| 8 | + repoUrl?: string, |
| 9 | + live: boolean, |
| 10 | + liveUrl?: string, |
8 | 11 | }
|
9 | 12 |
|
10 |
| -export function ProjectTile({ title, description, repo, repoUrl }: ProjectTileProps) { |
| 13 | +export function ProjectTile({ title, description, repo, repoUrl, live, liveUrl }: ProjectTileProps) { |
| 14 | + const isDesktop = useMediaQuery('(min-width: 768px)') |
11 | 15 | return (
|
12 |
| - <div className="bg-white dark:bg-neutral-800 p-6 rounded-lg shadow-md"> |
13 |
| - <div className="flex justify-between items-start mb-2"> |
| 16 | + <div className="items-center"> |
| 17 | + <div className="flex flex-col md:items-start justify-between sm:flex-row mb-2"> |
14 | 18 | <h3 className="text-xl font-semibold">{title}</h3>
|
15 |
| - {repo && ( |
16 |
| - <a href={repoUrl} target="_blank" rel="noopener noreferrer" aria-label={`GitHub repository for ${title}`}> |
17 |
| - <Github className="w-6 h-6" /> |
18 |
| - </a> |
19 |
| - )} |
| 19 | + <div className="space-x-2 justify-end"> |
| 20 | + {repo && ( |
| 21 | + <a |
| 22 | + href={repoUrl} target="_blank" |
| 23 | + rel="noopener noreferrer" aria-label={`GitHub repository for ${title}`} |
| 24 | + className="text-pink-500 inline-flex items-center hover:underline" |
| 25 | + > |
| 26 | + github <ArrowUpRight className="w-4 h-4 md:w-5 md:h-5"/> |
| 27 | + </a> |
| 28 | + )} |
| 29 | + {live && ( |
| 30 | + <a |
| 31 | + href={liveUrl} target="_blank" |
| 32 | + rel="noopener noreferrer" aria-label={`Live link for ${title}`} |
| 33 | + className="text-midnight-blue-500 inline-flex items-center hover:underline" |
| 34 | + > |
| 35 | + link <ArrowUpRight className="w-4 h-4 md:w-5 md:h-5"/> |
| 36 | + </a> |
| 37 | + )} |
| 38 | + </div> |
20 | 39 | </div>
|
21 | 40 | <p className="text-gray-700 dark:text-gray-300">{description}</p>
|
22 | 41 | </div>
|
|
0 commit comments