🎥 Make videos programmatically with React
small homepage tweaks
Jonny Burger00eb9d729ae4
diff --git a/packages/docs/src/pages/PageHeader.tsx b/packages/docs/src/pages/PageHeader.tsxnew file mode 100644index 0000000000..b9a652e215--- /dev/null+++ b/packages/docs/src/pages/PageHeader.tsx@@ -0,0 +1,28 @@+import React from "react";+import styles from "./header.module.css";++export const PageHeader: React.FC = () => {+ return (+ <div className={styles.row}>+ <div style={{ flex: 1 }}>+ <h1 className={styles.title}>Write videos programmatically in React</h1>+ <p>+ Use your React knowledge to create real MP4 videos. Render videos+ dynamically using server-side rendering and parametrization.+ </p>+ </div>+ <iframe+ style={{+ width: 560,+ height: 315,+ maxWidth: "100%",+ }}+ src="https://www.youtube.com/embed/gwlDorikqgY"+ title="Remotion - Create videos programmatically in React"+ frameBorder="0"+ allow="autoplay"+ allowFullScreen+ />+ </div>+ );+};diff --git a/packages/docs/src/pages/header.module.css b/packages/docs/src/pages/header.module.cssnew file mode 100644index 0000000000..21d2ab6b26--- /dev/null+++ b/packages/docs/src/pages/header.module.css@@ -0,0 +1,19 @@+.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;+}++.row {+ display: flex;+ flex-direction: row;+ text-align: left;+}++@media screen and (max-width: 1200px) {+ .row {+ flex-direction: column;+ }+}diff --git a/packages/docs/src/pages/index.js b/packages/docs/src/pages/index.tsxsimilarity index 69%rename from packages/docs/src/pages/index.jsrename to packages/docs/src/pages/index.tsxindex e3a50c7a97..1e6292b848 100644--- a/packages/docs/src/pages/index.js+++ b/packages/docs/src/pages/index.tsx@@ -1,13 +1,16 @@-import React from "react";-import clsx from "clsx";-import Layout from "@theme/Layout";import Link from "@docusaurus/Link";-import useDocusaurusContext from "@docusaurus/useDocusaurusContext";import useBaseUrl from "@docusaurus/useBaseUrl";+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";import splitbee from "@splitbee/web";+import Layout from "@theme/Layout";+import clsx from "clsx";+import React from "react";+import { PageHeader } from "./PageHeader";import styles from "./styles.module.css";-splitbee.init();+setTimeout(() => {+ splitbee.init();+}, 100);const features = [{@@ -43,7 +46,11 @@ const features = [},];-function Feature({ imageUrl, title, description }) {+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)}>@@ -56,25 +63,22 @@ function Feature({ imageUrl, title, description }) {<p>{description}</p></div>);-}+};function Home() {const context = useDocusaurusContext();- const { siteConfig = {} } = context;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 hero--primary", styles.heroBanner)}>+ <header className={clsx("hero ", styles.heroBanner)}><div className="container">- <h1 className="hero__title" style={{ color: "white" }}>- {siteConfig.title}- </h1>- <p className="hero__subtitle" style={{ color: "white" }}>- {siteConfig.tagline}- </p>- <iframe style={{ width:560, height:315, maxWidth: '100%',maxHeight:400 }} src="https://www.youtube.com/embed/gwlDorikqgY" title="Remotion - Create videos programmatically in React" frameborder="0" allow="autoplay" allowfullscreen />+ <PageHeader></PageHeader>+ <br />+ <br />+ <br />+ <br /><div><StartPageExplainerimg="img/vscode.png"@@ -100,28 +104,12 @@ function Home() {"button button--outline button--secondary button--lg",styles.getStarted)}- style={{ color: "white" }}to={useBaseUrl("docs/")}>Get Started</Link></div><div style={{ width: 8 }}></div>- <a- data-splitbee-event="External Link"- data-splitbee-event-target="Product Hunt"- href="https://www.producthunt.com/posts/remotion-3?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-remotion-3"- target="_blank"- style={{ display: "inline-flex" }}- >- <img- src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=283561&theme=light"- alt="Remotion - Create videos programmatically in React | Product Hunt"- style={{ width: 250, height: 54, display: "inline-block" }}- width="250"- height="54"- />- </a></div></div></header>@@ -151,7 +139,7 @@ function StartPageExplainer(props) {style={{ maxHeight: 400 }}/><br />- <div style={{ color: "white", fontSize: 14 }}>{props.text}</div>+ <div style={{ fontSize: 14 }}>{props.text}</div></div>);}