🎥 Make videos programmatically with React
homepage improvements
Jonny Burger63a59c28bc5e
diff --git a/packages/create-video/src/templates.ts b/packages/create-video/src/templates.tsindex c8fc4805bb..06599ec48c 100644--- a/packages/create-video/src/templates.ts+++ b/packages/create-video/src/templates.ts@@ -362,7 +362,7 @@ export const FEATURED_TEMPLATES: Template[] = [repoName: 'template-code-hike',description: 'Beautiful code animations',longerDescription: `- Add code snippets and animate between them using{' '}+ Add code snippets and animate between them using<a href="https://codehike.org/">Code Hike</a>. Supports many languages,TypeScript error annotations, and many themes.`,diff --git a/packages/docs/components/LandingPage/WriteInReact.tsx b/packages/docs/components/LandingPage/WriteInReact.tsxindex eade2681f9..a3cff83240 100644--- a/packages/docs/components/LandingPage/WriteInReact.tsx+++ b/packages/docs/components/LandingPage/WriteInReact.tsx@@ -1,33 +1,33 @@-import React from "react";-import { ChooseTemplate } from "../../src/components/ChooseTemplate";-import { GetStarted } from "./GetStartedStrip";-import styles from "./writeinreact.module.css";+import React from 'react';+import {ChooseTemplate} from '../../src/components/ChooseTemplate';+import {GetStarted} from './GetStartedStrip';+import styles from './writeinreact.module.css';export const WriteInReact: React.FC = () => {- return (- <div>- <h1 className={styles.writeincsstitle}>Make videos programmatically.</h1>- <br />- <p- style={{- textAlign: "center",- fontSize: "1.2em",- fontWeight: 500,- }}- className={styles.text}- >- Create real MP4 videos using React. <br /> Scale your video production- using server-side rendering and parametrization.- </p>- <br />- <div className={styles.writeincss}>- <GetStarted />- </div>- <br />- <br />- <div>- <ChooseTemplate />- </div>- </div>- );+ return (+ <div>+ <h1 className={styles.writeincsstitle}>Make videos programmatically.</h1>+ <br />+ <p+ style={{+ textAlign: 'center',+ fontSize: '1.2em',+ fontWeight: 500,+ }}+ className={styles.text}+ >+ Create real MP4 videos with React. <br />+ Parametrize content, render server-side and build applications.+ </p>+ <br />+ <div className={styles.writeincss}>+ <GetStarted />+ </div>+ <br />+ <br />+ <div>+ <ChooseTemplate />+ </div>+ </div>+ );};diff --git a/packages/docs/src/components/TemplateModalContent.tsx b/packages/docs/src/components/TemplateModalContent.tsxindex 7289624cd0..38ad9b5b21 100644--- a/packages/docs/src/components/TemplateModalContent.tsx+++ b/packages/docs/src/components/TemplateModalContent.tsx@@ -188,11 +188,19 @@ export const TemplateModalContent: React.FC<{style={{display: 'flex',width: '100%',+ aspectRatio:+ template.type === 'video'+ ? `${template.promoVideo.width} / ${template.promoVideo.height}`+ : undefined,}}>{loaded || template.type === 'image' ? null : (<div style={loadingStyle}>- <Spinner style={spinner} />+ <Spinner+ style={{+ ...spinner,+ }}+ /></div>)}{template.type === 'video' ? (@@ -206,7 +214,6 @@ export const TemplateModalContent: React.FC<{aspectRatio: `${template.promoVideo.width} / ${template.promoVideo.height}`,width: '100%',height: 'auto',- maxHeight: 450,opacity: Number(loaded),display: loaded ? 'inline-flex' : 'none',borderRadius: 5,@@ -376,7 +383,13 @@ export const TemplateModalContent: React.FC<{>{template.shortName}</h1>- <div style={description}>{template.longerDescription}</div>+ <div+ // eslint-disable-next-line react/no-danger+ dangerouslySetInnerHTML={{+ __html: template.longerDescription,+ }}+ style={description}+ /><br /><br /></div>diff --git a/packages/docs/src/pages/templates/index.tsx b/packages/docs/src/pages/templates/index.tsxindex 8e9f6bed07..fd44f025ac 100644--- a/packages/docs/src/pages/templates/index.tsx+++ b/packages/docs/src/pages/templates/index.tsx@@ -55,7 +55,7 @@ const descriptionStyle: React.CSSProperties = {const Item: React.FC<{readonly label: string;- readonly description: React.ReactNode;+ readonly description: string;readonly children: React.ReactNode;}> = ({children, label, description}) => {return (@@ -67,7 +67,13 @@ const Item: React.FC<{<div style={labelStyle}>{label}</div></div><div>- <p style={descriptionStyle}>{description}</p>+ <p+ // eslint-disable-next-line react/no-danger+ dangerouslySetInnerHTML={{+ __html: description,+ }}+ style={descriptionStyle}+ /></div></div>);