Skip to content

Commit 53db25a

Browse files
committed
Show the Product Hunt badge beside the page heading for launch day
1 parent 8177fb8 commit 53db25a

2 files changed

Lines changed: 33 additions & 7 deletions

File tree

‎src/components/PageIntro.tsx‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import ProductHuntBadge from './ProductHuntBadge'
2+
13
/**
24
* The indexable copy from Home.vue.
35
*
@@ -11,13 +13,16 @@
1113
*/
1214
export function PageHeading() {
1315
return (
14-
<header>
15-
<h1 className="text-base font-semibold tracking-tight">
16-
FFmpeg Command Generator for Common Encoding Workflows
17-
</h1>
18-
<p className="text-sm text-muted">
19-
Build FFmpeg commands without memorizing every flag.
20-
</p>
16+
<header className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
17+
<div>
18+
<h1 className="text-base font-semibold tracking-tight">
19+
FFmpeg Command Generator for Common Encoding Workflows
20+
</h1>
21+
<p className="text-sm text-muted">
22+
Build FFmpeg commands without memorizing every flag.
23+
</p>
24+
</div>
25+
<ProductHuntBadge />
2126
</header>
2227
)
2328
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const HREF =
2+
'https://www.producthunt.com/products/ffmpeg-commander?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-ffmpeg-commander'
3+
const SRC = 'https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1263419&t=1790766831054'
4+
const ALT = 'FFmpeg Commander - A web GUI for generating FFmpeg command-line operations. | Product Hunt'
5+
6+
/**
7+
* Launch-day badge for Product Hunt. Temporary: drop it from PageHeading once
8+
* the launch is over.
9+
*
10+
* Two images toggled by the theme class rather than a <picture> with
11+
* prefers-color-scheme, since the theme here is the user's choice and can
12+
* disagree with their OS.
13+
*/
14+
export default function ProductHuntBadge() {
15+
return (
16+
<a href={HREF} target="_blank" rel="noopener noreferrer" className="shrink-0">
17+
<img alt={ALT} width="250" height="54" src={`${SRC}&theme=light`} className="dark:hidden" />
18+
<img alt={ALT} width="250" height="54" src={`${SRC}&theme=dark`} className="hidden dark:block" />
19+
</a>
20+
)
21+
}

0 commit comments

Comments
 (0)