🎥 Make videos programmatically with React
restructure templates
Jonny Burgercf366bc182f3
diff --git a/packages/create-video/src/templates.ts b/packages/create-video/src/templates.tsindex f2fb56fbc3..de92524c51 100644--- a/packages/create-video/src/templates.ts+++ b/packages/create-video/src/templates.ts@@ -111,10 +111,10 @@ export const FEATURED_TEMPLATES: Template[] = [showStackblitz: true,},{- homePageLabel: 'Next.js (App dir)',- shortName: 'Next.js (App dir)',+ homePageLabel: 'Next.js',+ shortName: 'Next.js',org: 'remotion-dev',- repoName: 'template-next-app-dir',+ repoName: 'template-next-app-dir-tailwind',description: 'SaaS template for video generation apps',longerDescription:'A SaaS starter kit which has the Remotion Player and rendering via Remotion Lambda built-in. Our recommended choice for people who want to build an app that can generate videos.',@@ -128,16 +128,39 @@ export const FEATURED_TEMPLATES: Template[] = [defaultBranch: 'main',featuredOnHomePage: 'Next.js',previewURL: 'https://next.remotion.dev',- templateInMonorepo: 'template-next-app',+ templateInMonorepo: 'template-next-app-tailwind',allowEnableTailwind: false,contributedBy: null,showStackblitz: true,},{- homePageLabel: 'Next.js (App dir + TailwindCSS)',- shortName: 'Next.js (App dir + TailwindCSS)',+ homePageLabel: 'Next.js (Vercel Sandbox)',+ shortName: 'Next.js (Vercel Sandbox)',org: 'remotion-dev',- repoName: 'template-next-app-dir-tailwind',+ repoName: 'template-vercel',+ description: 'Render videos on-demand using Vercel Sandbox',+ longerDescription:+ 'A template for rendering videos on-demand using Vercel Sandbox. Spawns ephemeral Linux VMs to render videos and stores them in Vercel Blob storage.',+ cliId: 'vercel' as const,+ promoBanner: {+ width: 655,+ height: 720,+ src: '/img/vercel-sandbox-template.png',+ },+ type: 'image' as const,+ defaultBranch: 'main',+ featuredOnHomePage: null,+ previewURL: null,+ templateInMonorepo: 'template-vercel',+ allowEnableTailwind: false,+ contributedBy: null,+ showStackblitz: false,+ },+ {+ homePageLabel: 'Next.js (No Tailwind)',+ shortName: 'Next.js (No Tailwind)',+ org: 'remotion-dev',+ repoName: 'template-next-app-dir',description: 'SaaS template for video generation apps',longerDescription:'A SaaS starter kit which has the Remotion Player and rendering via Remotion Lambda built-in. Our recommended choice for people who want to build an app that can generate videos.',@@ -146,12 +169,12 @@ export const FEATURED_TEMPLATES: Template[] = [height: 720,muxId: 'RufnZIJZh6L1MAaeG02jnXuM9pK96tNuHRxmXHbWqCBI',},- cliId: 'next-tailwind' as const,+ cliId: 'next-no-tailwind' as const,type: 'video' as const,defaultBranch: 'main',featuredOnHomePage: null,previewURL: 'https://next.remotion.dev',- templateInMonorepo: 'template-next-app-tailwind',+ templateInMonorepo: 'template-next-app',allowEnableTailwind: false,contributedBy: null,showStackblitz: true,@@ -579,29 +602,6 @@ export const FEATURED_TEMPLATES: Template[] = [contributedBy: null,showStackblitz: true,},- {- homePageLabel: 'Vercel Sandbox',- shortName: 'Vercel Sandbox',- org: 'remotion-dev',- repoName: 'template-vercel',- description: 'Render videos on-demand using Vercel Sandbox',- longerDescription:- 'A template for rendering videos on-demand using Vercel Sandbox. Spawns ephemeral Linux VMs to render videos and stores them in Vercel Blob storage.',- cliId: 'vercel' as const,- promoBanner: {- width: 655,- height: 720,- src: '/img/vercel-sandbox-template.png',- },- type: 'image' as const,- defaultBranch: 'main',- featuredOnHomePage: null,- previewURL: null,- templateInMonorepo: 'template-vercel',- allowEnableTailwind: false,- contributedBy: null,- showStackblitz: false,- },].filter(truthy);export const PAID_TEMPLATES = [diff --git a/packages/docs/src/components/IconForTemplate.tsx b/packages/docs/src/components/IconForTemplate.tsxindex aacb279ccb..66ed7d1b9d 100644--- a/packages/docs/src/components/IconForTemplate.tsx+++ b/packages/docs/src/components/IconForTemplate.tsx@@ -18,6 +18,7 @@ import {StillIcon} from './icons/still';import {TikTok} from './icons/tiktok';import {TypeScriptIcon} from './icons/ts';import {TTSIcon} from './icons/tts';+import {VercelIcon} from './icons/vercel';import {Waveform} from './icons/waveform';export const IconForTemplate: React.FC<{@@ -175,5 +176,9 @@ export const IconForTemplate: React.FC<{return <BrainIcon style={{height: scale * 36}} />;}+ if (template.cliId === 'vercel') {+ return <VercelIcon style={{height: scale * 28}} />;+ }+throw new Error(`Unknown template: ${template.cliId satisfies never}`);};diff --git a/packages/docs/src/components/icons/vercel.tsx b/packages/docs/src/components/icons/vercel.tsxnew file mode 100644index 0000000000..6f7b261489--- /dev/null+++ b/packages/docs/src/components/icons/vercel.tsx@@ -0,0 +1,16 @@+import React from 'react';++export const VercelIcon: React.FC<{+ readonly style: React.CSSProperties;+}> = ({style}) => {+ return (+ <svg+ fill="currentcolor"+ viewBox="0 0 76 65"+ style={style}+ xmlns="http://www.w3.org/2000/svg"+ >+ <path d="M37.5274 0L75.0548 65H0L37.5274 0Z" />+ </svg>+ );+};diff --git a/packages/promo-pages/src/components/homepage/IconForTemplate.tsx b/packages/promo-pages/src/components/homepage/IconForTemplate.tsxindex 1b1d9a9c1d..a67e81891c 100644--- a/packages/promo-pages/src/components/homepage/IconForTemplate.tsx+++ b/packages/promo-pages/src/components/homepage/IconForTemplate.tsx@@ -18,6 +18,7 @@ import {StillIcon} from '../icons/still';import {TikTok} from '../icons/tiktok';import {TypeScriptIcon} from '../icons/ts';import {TTSIcon} from '../icons/tts';+import {VercelIcon} from '../icons/vercel';import {Waveform} from '../icons/waveform';export const IconForTemplate: React.FC<{@@ -175,5 +176,9 @@ export const IconForTemplate: React.FC<{return <BrainIcon style={{height: scale * 36}} />;}+ if (template.cliId === 'vercel') {+ return <VercelIcon style={{height: scale * 28}} />;+ }+throw new Error(`Unknown template: ${template.cliId satisfies never}`);};diff --git a/packages/promo-pages/src/components/icons/vercel.tsx b/packages/promo-pages/src/components/icons/vercel.tsxnew file mode 100644index 0000000000..6f7b261489--- /dev/null+++ b/packages/promo-pages/src/components/icons/vercel.tsx@@ -0,0 +1,16 @@+import React from 'react';++export const VercelIcon: React.FC<{+ readonly style: React.CSSProperties;+}> = ({style}) => {+ return (+ <svg+ fill="currentcolor"+ viewBox="0 0 76 65"+ style={style}+ xmlns="http://www.w3.org/2000/svg"+ >+ <path d="M37.5274 0L75.0548 65H0L37.5274 0Z" />+ </svg>+ );+};