Skip to content

Commit 593cd70

Browse files
committed
product hunt announcement
1 parent b8a2b82 commit 593cd70

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

app/components/ph-announcement.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { FC } from 'react';
2+
3+
import { cn } from '@/lib/utils';
4+
5+
const CLIP_PATH =
6+
'polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)';
7+
8+
const BgHelper: FC<{ className?: string }> = ({ className }) => {
9+
return (
10+
<div aria-hidden="true" className={cn(`absolute top-1/2 -z-10 -translate-y-1/2 transform-gpu blur-2xl`, className)}>
11+
<div
12+
style={{ clipPath: CLIP_PATH }}
13+
className="aspect-577/310 w-144.25 bg-linear-to-r from-[#ff80b5] to-[#9089fc] opacity-40"
14+
/>
15+
</div>
16+
);
17+
};
18+
19+
export const PhAnnouncement = () => {
20+
return (
21+
<div className="relative isolate flex items-center justify-center flex-wrap gap-x-4 gap-y-1 overflow-hidden bg-gray-50 dark:bg-gray-800/50 px-2 py-2.5 after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10">
22+
<BgHelper className="left-[max(-7rem,calc(50%-52rem))]" />
23+
<BgHelper className="left-[max(45rem,calc(50%+8rem))]" />
24+
<p className="text-sm/6 text-gray-900 dark:text-gray-100">
25+
<strong className="font-semibold">We are live on Product Hunt today - check it out</strong>
26+
</p>
27+
<a
28+
href="https://www.producthunt.com/products/gitranks?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-gitranks"
29+
target="_blank"
30+
>
31+
<img
32+
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=988220&theme=light&t=1755193761436"
33+
alt="GitRanks - GitHub&#0032;Profile&#0032;Analytics&#0032;&#0038;&#0032;Rankings | Product Hunt"
34+
style={{ height: '36px' }}
35+
className="dark:hidden"
36+
/>
37+
<img
38+
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=988220&theme=dark&t=1755193761436"
39+
alt="GitRanks - GitHub&#0032;Profile&#0032;Analytics&#0032;&#0038;&#0032;Rankings | Product Hunt"
40+
style={{ height: '36px' }}
41+
className="hidden dark:block"
42+
/>
43+
</a>
44+
</div>
45+
);
46+
};

app/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import { CountryRankingSection } from './components/country-ranking-section';
66
import { GlobalRankingSection } from './components/global-ranking-section';
77
import InsightsCarousel from './components/insights-carousel';
88
import { MessengerIntegrationSection } from './components/messenger-integration-section';
9+
import { PhAnnouncement } from './components/ph-announcement';
910
import { SearchProfile } from './components/search-profiile';
1011

1112
export default function Home() {
1213
return (
1314
<>
15+
<PhAnnouncement />
1416
<div className="border-b bg-linear-45 from-background to-80% to-landing-page-gradient-start-color">
1517
<Header />
1618
<Page className="p-0">
@@ -31,6 +33,7 @@ export default function Home() {
3133
</div>
3234
</Page>
3335
</div>
36+
3437
<Page className="gap-4">
3538
<GlobalRankingSection />
3639
<CountryRankingSection />

0 commit comments

Comments
 (0)