-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'yippe' into remove-tooltip
- Loading branch information
Showing
13 changed files
with
250 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ProductPost } from "../types"; | ||
import { Pill } from "./Pill"; | ||
|
||
export const MobileCard = ({ post }: { post: ProductPost }) => { | ||
const link = new URL(post.url); | ||
return ( | ||
<a | ||
href={`${link.origin}${link.pathname}?utm_source=oghunt.com`} | ||
key={post.id} | ||
target="_blank" | ||
className="items-cener group w-full cursor-pointer flex-col gap-8 rounded-2xl duration-300 hover:bg-neutral-300/50 dark:hover:bg-neutral-900" | ||
> | ||
<div className="flex flex-col items-start gap-2"> | ||
<div className="flex items-center gap-2"> | ||
<div className="transition-transform duration-300 group-hover:translate-x-2"> | ||
{post.thumbnailUrl && ( | ||
<img src={post.thumbnailUrl} className="size-9 rounded-lg object-cover" alt="logo" /> | ||
)} | ||
</div> | ||
<h2 className="max-w-[69ch] truncate text-lg font-bold duration-300 group-hover:translate-x-2 group-hover:underline md:text-2xl"> | ||
{post.name} | ||
</h2> | ||
</div> | ||
|
||
<p className="max-w-[69ch] text-sm opacity-60 md:text-base">{post.tagline}</p> | ||
<div className="flex flex-wrap gap-2"> | ||
{post.topics && | ||
post.topics.map(({ id, name }) => <Pill key={`${id}${post.id}`} name={name} />)} | ||
</div> | ||
<p className="line-clamp-3 max-w-[69ch] text-sm md:text-base">{post.description}</p> | ||
</div> | ||
</a> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.