diff --git a/src/components/GitRepoCard.tsx b/src/components/GitRepoCard.tsx index 2ffb136f..6aabc014 100644 --- a/src/components/GitRepoCard.tsx +++ b/src/components/GitRepoCard.tsx @@ -1,5 +1,12 @@ import type { NostrEvent } from "@nostrify/nostrify"; -import { Copy, ExternalLink, GitBranch, Globe, Wand2 } from "lucide-react"; +import { + BookMarked, + Copy, + ExternalLink, + GitFork, + Globe, + Wand2, +} from "lucide-react"; import { useState } from "react"; import { Button } from "@/components/ui/button"; @@ -58,38 +65,61 @@ export function GitRepoCard({ event }: GitRepoCardProps) { return (
-
- {/* Header: icon/favicon + title */} -
+
+ {/* Row 1: icon + name + badge */} +
{isApp && faviconUrl && !faviconError ? ( setFaviconError(true)} /> ) : ( - + )} -
-
- - {displayName} + + {displayName} + + {isPersonalFork ? ( + + Fork + + ) : ( + + Public + + )} +
+ + {/* Row 2: description */} + {description && ( +

+ {description} +

+ )} + + {/* Row 3: hashtags as inline metadata (like GitHub's language/stars row) */} + {hashtags.length > 0 && ( +
+ {hashtags.slice(0, 5).map((tag) => ( + + + {tag} + + ))} + {isPersonalFork && ( + + + Fork - {isPersonalFork && ( - - Fork - - )} -
- {description && ( -

- {description} -

)}
-
+ )} {/* Clone URL -- hidden for apps */} {!isApp && cloneUrls[0] && ( @@ -114,90 +144,73 @@ export function GitRepoCard({ event }: GitRepoCardProps) {
)} - {/* Tags */} - {hashtags.length > 0 && ( -
- {hashtags.slice(0, 6).map((tag) => ( - + {hasShakespeare && ( + )} + {isApp ? ( + + ) : webUrls[0] ? ( + + ) : !hasShakespeare && cloneUrls[0] ? ( + + ) : null}
)} - - {/* Action buttons */} -
- {hasShakespeare && ( - - )} - {isApp ? ( - - ) : webUrls[0] ? ( - - ) : !hasShakespeare && cloneUrls[0] ? ( - - ) : null} -
);