The swiss army knife of lossless video/audio editing
Website: homepage redesign preview (hero, feature and quote cards)
Claude85d876c7fe46
diff --git a/website/package.json b/website/package.jsonindex a891175c..bed532e1 100644--- a/website/package.json+++ b/website/package.json@@ -13,6 +13,7 @@"@astrojs/react": "^7.1.0","@astrojs/starlight": "^0.42.6","astro": "^7.4.0",+ "lucide-react": "^1.59.0","mdast-util-from-markdown": "^2.1.0","mdast-util-to-string": "^4.0.0","react": "^19.3.1",diff --git a/website/src/components/Home.tsx b/website/src/components/Home.tsxindex 9c60b739..038d1be5 100644--- a/website/src/components/Home.tsx+++ b/website/src/components/Home.tsx@@ -1,5 +1,7 @@// The homepage content. Rendered to static HTML at build time (no client-side JavaScript).import type { ReactNode } from 'react';+import type { LucideIcon } from 'lucide-react';+import { AudioWaveform, Camera, Clock, CodeXml, Combine, Layers, ListOrdered, Monitor, PackageOpen, RefreshCw, RotateCw, Save, Scissors, Star, Tag, Terminal, ZoomIn } from 'lucide-react';import macAppStoreBadge from '../../../mac-app-store-badge.svg?url';import msStoreBadge from '../../../ms-store-badge.svg?url';@@ -15,6 +17,11 @@ import tracksScreenshot from '../assets/home/tracks-screenshot.jpg?url';import { authorUrl, donateUrl, githubUrl, socialLinks, storeUrls, supportEmail } from '../links.ts';import socialIconPaths from './socialIcons.ts';+// An optional short, silent screen recording for the hero (src/assets/home/demo.mp4 and/or demo.webm), shown instead of the screenshot+const demoClips = import.meta.glob<string>('../assets/home/demo.{webm,mp4}', { eager: true, query: '?url', import: 'default' });+const demoSources = Object.entries(demoClips).toSorted(([a], [b]) => (a.endsWith('.webm') ? -1 : 1) - (b.endsWith('.webm') ? -1 : 1))+ .map(([path, url]) => ({ url, type: path.endsWith('.webm') ? 'video/webm' : 'video/mp4' }));+const quotes = ['I\'ve been looking a long time for a program like LosslessCut','You just saved my butt and kept me from missing a pretty important deadline over a stupid mistake. THANK YOU.',@@ -26,21 +33,21 @@ const quotes = ['In Chinese, the word "Lossless" (pronounced like "Lao-Si-Le-Si") sounds incredibly similar to the luxury car brand "Rolls-Royce" ("Lao-Si-Lai-Si"). I think this is a beautiful coincidence because this software truly is the Rolls-Royce of the video-cutting world — smooth, premium, pure, and absolutely perfect.',];-const features = [- 'Losslessly trim or cut out parts of video/audio',- 'Lossless merge/concatenation of arbitrary files (identical codec parameters)',- 'Lossless stream editing: Combine arbitrary tracks from multiple files',- 'Losslessly extract all tracks from a file',- 'Remux into any compatible output format',- 'Take full-resolution snapshots from videos in JPEG/PNG format',- 'Apply a per-file timecode offset in the preview',- 'Change rotation/orientation metadata in videos',- 'Powerful timeline with zoom and frame/keyframe jumping',- 'Auto-saves per project cut segments to file',- 'View ffmpeg last command log so you can modify and re-run modify recent commands on the command line',- 'Give labels to cut segments',- 'Segment panel showing segments with details, export/import cut segments as CSV',- 'Video thumbnails and audio waveform',+const features: { text: string, Icon: LucideIcon }[] = [+ { text: 'Losslessly trim or cut out parts of video/audio', Icon: Scissors },+ { text: 'Lossless merge/concatenation of arbitrary files (identical codec parameters)', Icon: Combine },+ { text: 'Lossless stream editing: Combine arbitrary tracks from multiple files', Icon: Layers },+ { text: 'Losslessly extract all tracks from a file', Icon: PackageOpen },+ { text: 'Remux into any compatible output format', Icon: RefreshCw },+ { text: 'Take full-resolution snapshots from videos in JPEG/PNG format', Icon: Camera },+ { text: 'Apply a per-file timecode offset in the preview', Icon: Clock },+ { text: 'Change rotation/orientation metadata in videos', Icon: RotateCw },+ { text: 'Powerful timeline with zoom and frame/keyframe jumping', Icon: ZoomIn },+ { text: 'Auto-saves per project cut segments to file', Icon: Save },+ { text: 'View ffmpeg last command log so you can modify and re-run modify recent commands on the command line', Icon: Terminal },+ { text: 'Give labels to cut segments', Icon: Tag },+ { text: 'Segment panel showing segments with details, export/import cut segments as CSV', Icon: ListOrdered },+ { text: 'Video thumbnails and audio waveform', Icon: AudioWaveform },];const usageScenarios = [@@ -100,37 +107,64 @@ function FooterLink({ href, children }: { href: string, children: ReactNode }) {return <><a className="footer-link" href={href}>{children}</a>{' '}</>;}-export default function Home() {+function StoreBadges({ height }: { height: number }) {+ return (+ <div className="store-badges">+ {storeBadges.map(({ href, image, alt, rounded }) => (+ <a key={href} className="app-store" style={{ borderRadius: rounded ? `${Math.round(height * 0.26)}px` : undefined }} href={href}><img src={image} alt={alt} height={height} /></a>+ ))}+ </div>+ );+}++const formatStars = (stars: number) => (stars >= 1000 ? `${Math.floor(stars / 1000)}k+` : String(stars));++// stars: the GitHub star count, fetched at build time by index.astro (undefined if that failed)+export default function Home({ stars }: { stars?: number | undefined }) {return (<div className="page">- <nav className="top-nav">- <a href="/docs">Docs</a>- <a href={githubUrl}>GitHub</a>- </nav>-- <div className="hero">- <h1>LosslessCut</h1>- <div className="tagline">The Swiss Army Knife of Lossless Video/Audio Editing</div>- <div className="tagline" style={{ opacity: '0.7', marginTop: '.5em' }}>Official app by <a href={authorUrl} style={{ color: 'inherit' }}>Mikael Finstad</a></div>- <div className="hero-buttons">- <a className="button" href="#download">Download</a>- <a className="button secondary" href="/docs">Documentation</a>- </div>- </div>+ <header className="hero" style={{ backgroundImage: `linear-gradient(160deg, rgba(11, 52, 56, 0.93), rgba(40, 40, 40, 0.96) 65%), url(${background1})` }}>+ <nav className="top-nav">+ <a href="/docs">Docs</a>+ <a href={githubUrl}>GitHub</a>+ </nav>++ <div className="hero-content">+ <div className="hero-text">+ <h1>LosslessCut</h1>+ <div className="tagline">The Swiss Army Knife of Lossless Video/Audio Editing</div>+ <div className="hero-subtitle">Shave gigabytes off video and audio files in seconds without loss of quality</div>+ <div className="hero-buttons">+ <a className="button" href="#download">Download</a>+ <a className="button secondary" href="/docs">Documentation</a>+ </div>+ <StoreBadges height={40} />+ <ul className="proof">+ {stars != null && <li><Star aria-hidden size={16} className="star" /> {formatStars(stars)} stars on <a href={githubUrl}>GitHub</a></li>}+ <li><CodeXml aria-hidden size={16} /> Free and open source</li>+ <li><Monitor aria-hidden size={16} /> Windows, macOS, Linux</li>+ </ul>+ <div className="hero-author">Official app by <a href={authorUrl}>Mikael Finstad</a></div>+ </div>- <ScreenshotSection- background={background1}- screenshot={mainScreenshot}- alt="Main screenshot"- width={600}- borderRadius={9}- subtitle="Shave gigabytes off video and audio files in seconds without loss of quality"- />+ <div className="hero-media">+ {demoSources.length > 0 ? (+ <video autoPlay muted loop playsInline poster={mainScreenshot} aria-label="LosslessCut cutting a video">+ {demoSources.map(({ url, type }) => <source key={url} src={url} type={type} />)}+ </video>+ ) : (+ <img src={mainScreenshot} alt="LosslessCut main window" />+ )}+ </div>+ </div>+ </header>- <div className="quotes">+ <section className="quotes"><h2>Thousands of happy users</h2>- {quotes.map((quote) => <div key={quote} className="quote">{quote}</div>)}- </div>+ <div className="quote-grid">+ {quotes.map((quote) => <blockquote key={quote} className="quote-card">{quote}</blockquote>)}+ </div>+ </section><WhiteSection><div className="comparison" style={{ maxWidth: '700px' }}>@@ -168,8 +202,13 @@ export default function Home() {<WhiteSection><h2 style={{ margin: '20px 0' }}>Features</h2>- <div className="list">- <List items={features} />+ <div className="feature-grid">+ {features.map(({ text, Icon }) => (+ <div key={text} className="feature-card">+ <Icon aria-hidden size={28} strokeWidth={1.75} className="feature-icon" />+ <div>{text}</div>+ </div>+ ))}</div><h2 style={{ margin: '20px 0' }}>Other usage scenarios</h2>@@ -198,11 +237,7 @@ export default function Home() {If LosslessCut brings you value, please consider supporting my continued work by purchasing it from your favorite store, or <a href={donateUrl}>support me by donating.</a></p>- <div className="store-badges">- {storeBadges.map(({ href, image, alt, rounded }) => (- <a key={href} className="app-store" style={{ borderRadius: rounded ? '13px' : undefined }} href={href}><img src={image} alt={alt} height="50" /></a>- ))}- </div>+ <StoreBadges height={50} /></div></div>diff --git a/website/src/pages/index.astro b/website/src/pages/index.astroindex 9c0c1c3a..6bf667fd 100644--- a/website/src/pages/index.astro+++ b/website/src/pages/index.astro@@ -4,6 +4,20 @@ import { mastodonUrl } from '../links.ts';import structuredData from '../structuredData.ts';import '../styles/home.css';+// The GitHub star count for the homepage, at build time. Optional: the build doesn't fail if GitHub doesn't answer.+async function getGithubStars() {+ try {+ const response = await fetch('https://api.github.com/repos/mifi/lossless-cut', { headers: { accept: 'application/vnd.github+json' }, signal: AbortSignal.timeout(10_000) });+ if (!response.ok) throw new Error(`HTTP ${response.status}`);+ const { stargazers_count: stars } = await response.json();+ return typeof stars === 'number' ? stars : undefined;+ } catch (err) {+ console.warn('Could not get the GitHub star count:', err instanceof Error ? err.message : err);+ return undefined;+ }+}+const stars = await getGithubStars();+const title = 'LosslessCut – Free Lossless Video Cutter for Mac, Windows & Linux';const description = 'LosslessCut - Official downloads - free or paid version. Edit video, audio without quality loss. Cut, trim, merge on macOS, Windows and Linux.';---@@ -30,6 +44,6 @@ const description = 'LosslessCut - Official downloads - free or paid version. Ed<script type="application/ld+json" is:inline set:html={JSON.stringify(structuredData)} /></head><body>- <Home />+ <Home stars={stars} /></body></html>diff --git a/website/src/styles/home.css b/website/src/styles/home.cssindex faaedacc..e9b27331 100644--- a/website/src/styles/home.css+++ b/website/src/styles/home.css@@ -25,13 +25,19 @@ body {box-sizing: border-box;}-.top-nav {+.hero {align-self: stretch;+ background-size: cover;+ background-position: center;+ padding: 0 30px 70px;+ box-sizing: border-box;+}+.top-nav {display: flex;justify-content: flex-end;flex-wrap: wrap;gap: 4px 24px;- padding: 16px 30px;+ padding: 16px 0;}.top-nav a {color: white;@@ -41,32 +47,91 @@ body {.top-nav a:hover {text-decoration: underline;}--.hero {- max-width: 100%;- margin-top: 20px;- margin-bottom: 40px;- text-align: center;- padding: 0 30px;- box-sizing: border-box;+.hero-content {+ max-width: 1200px;+ margin: 30px auto 0;+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ justify-content: center;+ gap: 50px;+}+.hero-text {+ flex: 1 1 400px;+ max-width: 520px;}.hero h1 {- margin-bottom: 10px;+ margin: 0 0 10px;/* smaller on narrow phones, so it fits */- font-size: min(60px, 14vw);+ font-size: min(64px, 14vw);font-weight: 200;+ line-height: 1.1;}.tagline {- font-size: 18px;+ font-size: 22px;+ font-weight: 300;+}+.hero-subtitle {+ margin-top: 14px;+ font-size: 17px;font-weight: 300;+ line-height: 1.5;+ opacity: 0.8;}.hero-buttons {- margin-top: 30px;+ margin: 30px 0 18px;display: flex;flex-wrap: wrap;- justify-content: center;gap: 12px;}+.hero .store-badges {+ justify-content: flex-start;+}+.proof {+ list-style: none;+ margin: 22px 0 0;+ padding: 0;+ display: flex;+ flex-wrap: wrap;+ gap: 6px 18px;+ font-size: 15px;+ color: rgba(255, 255, 255, 0.85);+}+.proof li {+ display: flex;+ align-items: center;+ gap: 6px;+}+.proof a {+ color: inherit;+}+.proof svg {+ flex-shrink: 0;+ color: #33deef;+}+.proof svg.star {+ color: #f5c518;+ fill: #f5c518;+}+.hero-author {+ margin-top: 14px;+ font-size: 14px;+ opacity: 0.6;+}+.hero-author a {+ color: inherit;+}+.hero-media {+ flex: 1 1 500px;+ max-width: 640px;+}+.hero-media img, .hero-media video {+ display: block;+ width: 100%;+ height: auto;+ border-radius: 10px;+ box-shadow: rgba(0, 0, 0, 0.45) 0 20px 50px, rgba(51, 222, 239, 0.15) 0 0 0 1px;+}.button {display: inline-block;padding: 10px 24px;@@ -94,19 +159,41 @@ body {}.quotes {- font-weight: 600;- width: 800px;- box-sizing: border-box;- padding: 40px 30px;+ width: 1100px;max-width: 100%;+ box-sizing: border-box;+ padding: 70px 30px;}.quotes h2 {- padding-bottom: 20px;- padding-top: 20px;- padding-left: 35px;+ padding-bottom: 30px;+ text-align: center;color: #33deef;font-weight: 200;}+.quote-grid {+ columns: 3 280px;+ column-gap: 20px;+}+.quote-card {+ break-inside: avoid;+ margin: 0 0 20px;+ padding: 22px 24px 22px 56px;+ position: relative;+ border-radius: 10px;+ background-color: rgba(255, 255, 255, 0.05);+ border: 1px solid rgba(255, 255, 255, 0.08);+ line-height: 1.5;+}+.quote-card::before {+ content: '\201C';+ position: absolute;+ left: 16px;+ top: 6px;+ font-size: 56px;+ line-height: 1;+ font-family: Georgia, serif;+ color: #33deef;+}.white-section {width: 100%;@@ -132,6 +219,27 @@ body {width: 650px;max-width: 100%;}+.feature-grid {+ width: 1000px;+ max-width: 100%;+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));+ gap: 16px;+ margin-bottom: 40px;+}+.feature-card {+ display: flex;+ flex-direction: column;+ gap: 12px;+ padding: 20px;+ border-radius: 10px;+ background-color: #f4f8f8;+ border: 1px solid #e2ecec;+ line-height: 1.45;+}+.feature-icon {+ color: #1d8a96;+}.download {padding: 30px 20px;@@ -174,24 +282,6 @@ body {background-color: rgba(0, 0, 0, 0.4); margin: 30px 20px; border-radius: 7px; padding: 6px 10px; font-weight: 600; text-align: center;}-.quote {- margin-left: 40px;- padding: 15px 0;-}-.quote::before {- content: '"';- font-size: 70px;- font-weight: 200;- vertical-align: middle;- margin-right: 20px;- margin-left: -45px;- color: #33deef;- display: inline-block;- height: 10px;- line-height: 25px;- font-family: cursive;-}-.key-point {color: #2ebece;font-weight: 500;diff --git a/website/yarn.lock b/website/yarn.lockindex 2ff8b0b1..5c7e31bf 100644--- a/website/yarn.lock+++ b/website/yarn.lock@@ -3457,6 +3457,7 @@ __metadata:"@types/react": "npm:^19.3.0""@types/react-dom": "npm:^19.3.0"astro: "npm:^7.4.0"+ lucide-react: "npm:^1.59.0"mdast-util-from-markdown: "npm:^2.1.0"mdast-util-to-string: "npm:^4.0.0"react: "npm:^19.3.1"@@ -3475,6 +3476,19 @@ __metadata:languageName: nodelinkType: hard+"lucide-react@npm:^1.59.0":+ version: 1.59.0+ resolution: "lucide-react@npm:1.59.0"+ peerDependencies:+ "@types/react": "*"+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0+ peerDependenciesMeta:+ "@types/react":+ optional: true+ checksum: 10/12aa2440f23a94a6bcbff1ce37e8a771d567cdd9fa79b9c0de2d6f3867c647b2827d2b9361a3bd0e9a4847151a553f461a59c0eb0f2441b745a2820ad8ab0309+ languageName: node+ linkType: hard+"magic-string@npm:^1.2.3, magic-string@npm:^1.4.3":version: 1.4.3resolution: "magic-string@npm:1.4.3"