🎥 Make videos programmatically with React
new landing page
Jonny Burgere414e2a383bc
diff --git a/packages/docs/components/LandingPage/FreePricing.tsx b/packages/docs/components/LandingPage/FreePricing.tsxindex ea26f6cf81..9c5e5d0c26 100644--- a/packages/docs/components/LandingPage/FreePricing.tsx+++ b/packages/docs/components/LandingPage/FreePricing.tsx@@ -40,8 +40,8 @@ export const FreePricing: React.FC = () => {<p>Remotion is free for individuals - you can even build a business onit! <br />- As a company, you need a license to use Remotion. <br /> Thanks to- your support, we keep improving Remotion for everyone.+ As a company, you need a license to use Remotion. <br /> With your+ support, we constantly improve Remotion for everyone.</p></Container><PricingTable></PricingTable>diff --git a/packages/docs/components/LandingPage/WriteInReact.tsx b/packages/docs/components/LandingPage/WriteInReact.tsxindex a1cce81c39..d41db2367f 100644--- a/packages/docs/components/LandingPage/WriteInReact.tsx+++ b/packages/docs/components/LandingPage/WriteInReact.tsx@@ -1,6 +1,5 @@-import React, { useState } from "react";+import React from "react";import styled from "styled-components";-import styles from "../../src/pages/styles.module.css";import { mobile } from "../layout/layout";import { GetStarted } from "./GetStartedStrip";import { PlayerPreview } from "./PlayerPreview";@@ -29,26 +28,6 @@ const Title = styled.h1`width: 500px;`;-const Snippet: React.FC<{- snippetValue: string;-}> = ({ snippetValue }) => {- const [copied, setCopied] = useState(false);- return (- <div className={styles.snippet}>- <div className={styles.snippetValue}>$ {snippetValue}</div>- <div- className={styles.copySnippet}- onClick={() => {- navigator.clipboard.writeText(snippetValue);- setCopied(true);- }}- >- {copied ? "Copied!" : "Copy"}- </div>- </div>- );-};-const Right = styled.div`flex: 1;${mobile`diff --git a/packages/docs/src/pages/header.module.css b/packages/docs/src/pages/header.module.cssdeleted file mode 100644index 23cfd9dfaa..0000000000--- a/packages/docs/src/pages/header.module.css+++ /dev/null@@ -1,30 +0,0 @@-.title {- font-size: 3em;- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,- Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;- font-weight: 700;- line-height: 1.2;- word-break: break-word;-}--.row {- display: flex;- flex-direction: row;- text-align: left;-}--.youtubeIframe{- align-self: center;-}--@media screen and (max-width: 1200px) {- .row {- flex-direction: column;- text-align: center;- }-- .tabContainer {- margin-top: 1rem;- justify-content: center;- }-}\ No newline at end of filediff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsxindex 6c46167118..5605b2dc63 100644--- a/packages/docs/src/pages/index.tsx+++ b/packages/docs/src/pages/index.tsx@@ -1,211 +1,68 @@-import Link from "@docusaurus/Link";-import useBaseUrl from "@docusaurus/useBaseUrl";import splitbee from "@splitbee/web";import Layout from "@theme/Layout";-import TabItem from "@theme/TabItem";-import Tabs from "@theme/Tabs";-import clsx from "clsx";-import React, { useState } from "react";-import headerStyles from "./header.module.css";-import styles from "./styles.module.css";+import React from "react";+import styled from "styled-components";+import { LightningFastEditor } from "../../components/LandingPage/editor";+import { FreePricing } from "../../components/LandingPage/FreePricing";+import { IfYouKnowReact } from "../../components/LandingPage/if-you-know-react";+import { Parametrize } from "../../components/LandingPage/parametrize";+import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";+import { WriteInReact } from "../../components/LandingPage/WriteInReact";+import { mobile } from "../../components/layout/layout";setTimeout(() => {splitbee.init();}, 100);-const features = [- {- title: "Leverage the web",- imageUrl: "img/wordcloud.png",- description: (- <>- You've seen magic being created using CSS, Canvas, SVG and WebGL – why- not use these powerful technologies for making videos?- </>- ),- },- {- title: "Leverage React",- imageUrl: "img/leverage-react.png",- description: (- <>- Instead of copy & paste and undo & redo, use React's powerful- composition model to reuse components and fix mistakes later.- </>- ),- },- {- title: "Programmatic videos",- imageUrl: "img/programmatic.png",- description: (- <>- Use programming to create more advanced visualizations.{" "}- <code>fetch</code> data from an API and render videos dynamically using- SSR.- </>- ),- },-];+const Content = styled.div`+ max-width: 1000px;+ margin: auto;+ padding-top: 10vh;+ padding-left: 20px;+ padding-right: 20px;+ ${mobile`+ max-width: 500px;+ `}+`;-const Feature: React.FC<{- imageUrl: string;- title: string;- description: JSX.Element;-}> = ({ imageUrl, title, description }) => {- const imgUrl = useBaseUrl(imageUrl);- return (- <div className={clsx("col col--4", styles.feature)}>- {imgUrl && (- <div className="text--center">- <img className={styles.featureImage} src={imgUrl} alt={title} />- </div>- )}- <h3>{title}</h3>- <p>{description}</p>- </div>- );-};--const Snippet: React.FC<{- snippetValue: string;-}> = ({ snippetValue }) => {- const [copied, setCopied] = useState(false);- return (- <div className={styles.snippet}>- <div className={styles.snippetValue}>$ {snippetValue}</div>- <div- className={styles.copySnippet}- onClick={() => {- navigator.clipboard.writeText(snippetValue);- setCopied(true);- }}- >- {copied ? "Copied!" : "Copy"}- </div>- </div>- );-};--const PageHeader: React.FC = () => {- return (- <div className={headerStyles.row}>- <div style={{ flex: 1 }}>- <h1 className={headerStyles.title}>- Write videos programmatically in React- </h1>- <p style={{ marginBottom: 0 }}>- Use your React knowledge to create real MP4 videos. Render videos- dynamically using server-side rendering and parametrization.- </p>- <Tabs- className={headerStyles.tabContainer}- defaultValue="npm"- values={[- { label: "NPM", value: "npm" },- { label: "Yarn", value: "yarn" },- ]}- >- <TabItem value="npm">- <Snippet snippetValue={"npm init video"} />- </TabItem>-- <TabItem value="yarn">- <Snippet snippetValue={"yarn create video"} />- </TabItem>- </Tabs>- </div>- <div style={{ width: 20 }}></div>- <iframe- style={{- width: 560,- height: 315,- maxWidth: "100%",- }}- className={headerStyles.youtubeIframe}- src="https://www.youtube.com/embed/gwlDorikqgY"- title="Remotion - Create videos programmatically in React"- frameBorder="0"- allow="autoplay"- allowFullScreen- />- </div>- );-};--function Home() {+const NewLanding: React.FC = () => {return (<Layouttitle="Write videos in React"description="Create MP4 motion graphics in React. Leverage CSS, SVG, WebGL and more technologies to render videos programmatically!">- <header className={clsx("hero ", styles.heroBanner)}>- <div className="container">- <PageHeader />-- <br />- <div>- <StartPageExplainer- img="img/vscode.png"- text="Write your videos using React 17 and Typescript."- />- <StartPageExplainer- img="img/editor.png"- text="Preview your video in the browser with Fast Refresh and Timeline."- />- </div>- <div- style={{- display: "flex",- flexDirection: "row",- justifyContent: "center",- alignItems: "center",- marginTop: 50,- }}- >- <div className={styles.buttons}>- <Link- className={clsx(- "button button--outline button--secondary button--lg",- styles.getStarted- )}- to={useBaseUrl("docs/")}- >- Get Started- </Link>- </div>- <div style={{ width: 8 }}></div>- </div>- </div>- </header>- <main>- {features && features.length > 0 && (- <section className={styles.features}>- <div className="container">- <div className="row">- {features.map((props, idx) => (- <Feature key={idx} {...props} />- ))}- </div>- </div>- </section>- )}- </main>+ <Content>+ <WriteInReact></WriteInReact>+ <br />+ <br />+ <br />+ <br />+ <br />+ <IfYouKnowReact></IfYouKnowReact>+ <br />+ <br />+ <br />+ <br />+ <br />+ <RealMP4Videos></RealMP4Videos>+ <br />+ <br />+ <br />+ <br />+ <LightningFastEditor></LightningFastEditor>+ <br />+ <br />+ <br />+ <br />+ <Parametrize></Parametrize>+ <br />+ <br />+ <br />+ <br />+ <FreePricing></FreePricing>+ </Content></Layout>);-}--function StartPageExplainer(props) {- return (- <div style={{ display: "inline-block", textAlign: "center" }}>- <img- src={props.img}- alt="Screenshot Remotion Player"- style={{ maxHeight: 400 }}- />- <br />- <div style={{ fontSize: 14 }}>{props.text}</div>- </div>- );-}+};-export default Home;+export default NewLanding;diff --git a/packages/docs/src/pages/new-landing.tsx b/packages/docs/src/pages/new-landing.tsxdeleted file mode 100644index 80c21b4d82..0000000000--- a/packages/docs/src/pages/new-landing.tsx+++ /dev/null@@ -1,63 +0,0 @@-import Layout from "@theme/Layout";-import React from "react";-import styled from "styled-components";-import { LightningFastEditor } from "../../components/LandingPage/editor";-import { FreePricing } from "../../components/LandingPage/FreePricing";-import { IfYouKnowReact } from "../../components/LandingPage/if-you-know-react";-import { Parametrize } from "../../components/LandingPage/parametrize";-import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";-import { WriteInReact } from "../../components/LandingPage/WriteInReact";-import { mobile } from "../../components/layout/layout";--const Content = styled.div`- max-width: 1000px;- margin: auto;- padding-top: 10vh;- padding-left: 20px;- padding-right: 20px;- ${mobile`- max-width: 500px;- `}-`;--const NewLanding: React.FC = () => {- return (- <Layout- title="Write videos in React"- description="Create MP4 motion graphics in React. Leverage CSS, SVG, WebGL and more technologies to render videos programmatically!"- >- <Content>- <WriteInReact></WriteInReact>- <br />- <br />- <br />- <br />- <br />- <IfYouKnowReact></IfYouKnowReact>- <br />- <br />- <br />- <br />- <br />- <RealMP4Videos></RealMP4Videos>- <br />- <br />- <br />- <br />- <LightningFastEditor></LightningFastEditor>- <br />- <br />- <br />- <br />- <Parametrize></Parametrize>- <br />- <br />- <br />- <br />- <FreePricing></FreePricing>- </Content>- </Layout>- );-};--export default NewLanding;diff --git a/packages/docs/src/pages/styles.module.css b/packages/docs/src/pages/styles.module.cssdeleted file mode 100644index e55e200e6d..0000000000--- a/packages/docs/src/pages/styles.module.css+++ /dev/null@@ -1,111 +0,0 @@-/* stylelint-disable docusaurus/copyright-header */--/**- * CSS files with the .module.css suffix will be treated as CSS modules- * and scoped locally.- */--.heroBanner {- padding: 4rem 0;- text-align: center;- position: relative;- overflow: hidden;-}--@media screen and (max-width: 966px) {- .heroBanner {- padding: 2rem;- }-}--.buttons {- display: flex;- align-items: center;- justify-content: center;-}--.features {- display: flex;- align-items: center;- padding: 2rem 0;- width: 100%;-}--.featureImage {- height: 200px;- width: 300px;-}--.container * {- color: white;-}--/* snippets part : */--.snippets {- max-width: 450px;- margin-top: 40px;- margin-bottom: 30px;- margin-left: auto;- margin-right: auto;-}--.snippetsTitle {- font-size: 1.3em;- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,- Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;- font-weight: 700;- line-height: 1.4;- margin-bottom: 20px;-}--.snippet {- max-width: 400px;- padding: 12px 12px 10px 20px;- background-color: #111111;- margin-bottom: 10px;- display: flex;- flex-direction: row;- align-items: center;- position: relative;- border-radius: 0.4rem;-}--.snippetValue {- color: white;- font-size: 1.5em;- font-family: monospace;-}--.copySnippet {- color: white;- right: 15px;- padding: 2px 10px;- border-radius: 0.4rem;- position: absolute;- width: fit-content;-}--.copySnippet:hover {- cursor: pointer;- background-color: rgba(255, 255, 255, 0.15);-}--@media screen and (max-width: 1200px) {- .snippet {- margin: 0 auto;- margin-bottom: 3rem;- }-}--@media screen and (max-width: 600px) {- .heroBanner {- padding: 1rem;- }- .snippetValue {- font-size: 1.25em;- }- .copySnippet {- font-size: 0.75em;- }-}diff --git a/packages/docs/static/img/editor.png b/packages/docs/static/img/editor.pngdeleted file mode 100644index 610e2163c4..0000000000Binary files a/packages/docs/static/img/editor.png and /dev/null differdiff --git a/packages/docs/static/img/leverage-react.png b/packages/docs/static/img/leverage-react.pngdeleted file mode 100644index 131a1bf469..0000000000Binary files a/packages/docs/static/img/leverage-react.png and /dev/null differdiff --git a/packages/docs/static/img/programmatic.png b/packages/docs/static/img/programmatic.pngdeleted file mode 100644index 4701af319e..0000000000Binary files a/packages/docs/static/img/programmatic.png and /dev/null differdiff --git a/packages/docs/static/img/vscode.png b/packages/docs/static/img/vscode.pngdeleted file mode 100644index bf978bc491..0000000000Binary files a/packages/docs/static/img/vscode.png and /dev/null differdiff --git a/packages/docs/static/img/wordcloud.png b/packages/docs/static/img/wordcloud.pngdeleted file mode 100644index f5d9614bd6..0000000000Binary files a/packages/docs/static/img/wordcloud.png and /dev/null differ