Skip to content

🎥 Make videos programmatically with React

left-align

Jonny Burgerd96482f6fc43
diff --git a/packages/docs/src/components/ExpertPage.tsx b/packages/docs/src/components/ExpertPage.tsx
index f0419a43ad..a05663750f 100644
--- a/packages/docs/src/components/ExpertPage.tsx
+++ b/packages/docs/src/components/ExpertPage.tsx
@@ -56,6 +56,7 @@ const emailButton: React.CSSProperties = {
const description: React.CSSProperties = {
fontSize: 20,
+ minWidth: 900,
};
const socialIcon: React.CSSProperties = {
@@ -323,8 +324,8 @@ export default () => {
</svg>
<div style={{flex: 1}}>
Remotion Experts are independent freelancers with proven Remotion
- expertise and portfolios. However, due diligence is recommended
- before hiring.
+ expertise and portfolios. However, perform due diligence before
+ hiring.
</div>
</div>
<Spacer />
diff --git a/packages/promo-pages/src/components/experts/ExpertsPage.tsx b/packages/promo-pages/src/components/experts/ExpertsPage.tsx
index 5179d15dd1..a462467762 100644
--- a/packages/promo-pages/src/components/experts/ExpertsPage.tsx
+++ b/packages/promo-pages/src/components/experts/ExpertsPage.tsx
@@ -1,40 +1,25 @@
-import {Card} from '@remotion/design';
import React, {useMemo} from 'react';
import {random} from 'remotion';
-import {BlueButton} from '../homepage/layout/Button';
-import {Spacer} from '../homepage/Spacer';
-import {experts} from './experts-data';
import {
EmailLogo,
GitHubLogo,
LinkedInLogo,
- PersonalWebsite,
TwitterLogo,
- VideoCallLogo,
-} from './experts-icons';
+} from '../team/TeamCards';
+import type {Expert} from './experts-data';
+import {experts} from './experts-data';
+import {PersonalWebsite} from './experts-icons';
+
+const arrowIcon: React.CSSProperties = {
+ height: 16,
+ marginLeft: 10,
+};
const dateString = (date: Date) =>
date.getDate() + '-' + date.getMonth() + '-' + date.getFullYear();
const todayHash = dateString(new Date());
-const docsButtonStyle: React.CSSProperties = {
- textDecoration: 'none',
-};
-
-const flex: React.CSSProperties = {
- flex: 1,
-};
-
-const linkStyle: React.CSSProperties = {
- textDecoration: 'none',
- color: 'inherit',
- width: '100%',
- display: 'flex',
- flexDirection: 'row',
- paddingTop: 8,
-};
-
const infoCard: React.CSSProperties = {
backgroundColor: 'var(--footer-background)',
padding: 20,
@@ -42,9 +27,7 @@ const infoCard: React.CSSProperties = {
flexDirection: 'row',
display: 'flex',
fontSize: 13,
- alignItems: 'center',
maxWidth: 700,
- margin: '20px auto',
border: '1px solid var(--ifm-color-emphasis-300)',
borderRadius: 8,
};
@@ -61,35 +44,134 @@ const wrapperStyle: React.CSSProperties = {
paddingTop: 60,
paddingLeft: 20,
paddingRight: 20,
+ paddingBottom: 100,
};
-const cardStyle: React.CSSProperties = {
- padding: 16,
- borderRadius: 6,
- marginBottom: 16,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
-};
-
-const profileStyle: React.CSSProperties = {
- height: 200,
- borderRadius: 100,
-};
-
-const spacerStyle: React.CSSProperties = {
- height: 20,
- width: 20,
-};
-
-const titleStyle: React.CSSProperties = {
- fontSize: '1.2rem',
- marginBottom: 0,
- fontWeight: 'bold',
+type ExpertCardProps = {
+ readonly expert: Expert;
+ readonly Link: React.ComponentType<{
+ style?: React.CSSProperties;
+ className?: string;
+ href: string;
+ children: React.ReactNode;
+ }>;
};
-const rightStyle: React.CSSProperties = {
- width: '100%',
+const ExpertCard: React.FC<ExpertCardProps> = ({expert, Link}) => {
+ return (
+ <div className="flex-1 rounded-[15px] flex flex-col md:flex-row gap-2 md:gap-4">
+ <Link
+ href={`/experts/${expert.slug}`}
+ className="no-underline text-inherit"
+ >
+ <img
+ src={expert.image}
+ className="w-[250px] h-[250px] rounded-xl border-effect object-cover"
+ />
+ </Link>
+ <div className="flex flex-col border-effect px-4 py-3 bg-pane flex-1">
+ <Link
+ href={`/experts/${expert.slug}`}
+ className="no-underline text-inherit"
+ >
+ <h2 className="text-[1.6em] mb-1 mt-3 text-[var(--ifm-color-primary)] font-brand">
+ {expert.name}
+ </h2>
+ </Link>
+ <div className="mt-2 mb-3 leading-normal font-brand">
+ {expert.description}
+ </div>
+ <div className="leading-6 mb-4">
+ <Link
+ className="no-underline text-brand font-brand font-bold inline-flex flex-row items-center"
+ href={`/experts/${expert.slug}`}
+ >
+ View profile{' '}
+ <svg
+ style={arrowIcon}
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 448 512"
+ >
+ <path
+ fill="currentColor"
+ d="M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z"
+ />
+ </svg>
+ </Link>
+ {expert.videocall ? (
+ <>
+ <br />
+ <a
+ className="no-underline text-brand font-brand font-bold inline-flex flex-row items-center"
+ target="_blank"
+ href={expert.videocall}
+ >
+ Book a call{' '}
+ <svg
+ style={arrowIcon}
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 448 512"
+ >
+ <path
+ fill="currentColor"
+ d="M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z"
+ />
+ </svg>
+ </a>
+ </>
+ ) : null}
+ </div>
+ <div className="flex-1" />
+ <div className="gap-3 flex flex-row flex-wrap">
+ {expert.website ? (
+ <a
+ className="no-underline text-inherit"
+ target="_blank"
+ href={expert.website}
+ >
+ <PersonalWebsite />
+ </a>
+ ) : null}
+ {expert.x ? (
+ <a
+ className="no-underline text-inherit"
+ target="_blank"
+ href={`https://x.com/${expert.x}`}
+ >
+ <TwitterLogo />
+ </a>
+ ) : null}
+ {expert.github ? (
+ <a
+ className="no-underline text-inherit"
+ target="_blank"
+ href={`https://github.com/${expert.github}`}
+ >
+ <GitHubLogo />
+ </a>
+ ) : null}
+ {expert.linkedin ? (
+ <a
+ className="no-underline text-inherit"
+ target="_blank"
+ href={`https://www.linkedin.com/${expert.linkedin}`}
+ >
+ <LinkedInLogo />
+ </a>
+ ) : null}
+ {expert.email ? (
+ <a
+ className="no-underline text-inherit"
+ target="_blank"
+ href={`mailto:${expert.email}`}
+ >
+ <EmailLogo />
+ </a>
+ ) : null}
+ </div>
+ </div>
+ </div>
+ );
};
type ExpertsPageProps = {
@@ -154,179 +236,19 @@ export const ExpertsPageContent: React.FC<ExpertsPageProps> = ({Link}) => {
</svg>
<div style={{flex: 1}}>
Remotion Experts are independent freelancers with proven Remotion
- expertise and portfolios. However, due diligence is recommended
- before hiring.
+ expertise and portfolios. However, perform due diligence before
+ hiring. <br /> Remotion does not arbitrate disputes between experts
+ and clients.
</div>
</div>
<br />
<br />
- {expertsInRandomOrder.map((e) => {
- return (
- <Card key={e.name} style={cardStyle}>
- <Link
- style={linkStyle}
- className="experts-card-content"
- href={`/experts/${e.slug}`}
- >
- <img
- className="experts-profile"
- style={profileStyle}
- src={e.image}
- />
- <div style={spacerStyle} />
- <div style={rightStyle}>
- <div style={titleStyle}>{e.name}</div>
- <p>{e.description}</p>
- </div>
- </Link>
- <Spacer />
- <Spacer />
- <Spacer />
- <Spacer />
- <div
- style={{
- display: 'flex',
- flexDirection: 'row',
- width: '100%',
- }}
- className="experts-buttons-in-column"
- >
- {e.website ? (
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={`${e.website}`}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <PersonalWebsite /> Website
- </BlueButton>
- </a>
- </div>
- ) : null}
-
- {e.x ? (
- <>
- {e.website ? (
- <>
- <Spacer />
- <Spacer />
- </>
- ) : null}
-
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={`https://x.com/${e.x}`}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <TwitterLogo /> X
- </BlueButton>
- </a>
- </div>
- </>
- ) : null}
-
- {e.github ? (
- <>
- {/* Check if the expert has a website and a GitHub profile, but not a Twitter */}
- {e.website && !e.x ? (
- <>
- <Spacer />
- <Spacer />
- </>
- ) : null}
-
- {e.x ? (
- <>
- <Spacer />
- <Spacer />
- </>
- ) : null}
-
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={`https://github.com/${e.github}`}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <GitHubLogo /> GitHub
- </BlueButton>
- </a>
- </div>
- </>
- ) : null}
- </div>
- <Spacer />
- <Spacer />
- <div
- style={{
- display: 'flex',
- flexDirection: 'row',
- width: '100%',
- }}
- className="experts-buttons-in-column"
- >
- {e.linkedin ? (
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={`https://www.linkedin.com/${e.linkedin}`}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <LinkedInLogo /> LinkedIn
- </BlueButton>
- </a>
- </div>
- ) : null}
-
- {e.email ? (
- <>
- {e.linkedin ? (
- <>
- <Spacer />
- <Spacer />
- </>
- ) : null}
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={`mailto:${e.email}`}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <EmailLogo /> Email
- </BlueButton>
- </a>
- </div>
- </>
- ) : null}
-
- {e.videocall ? (
- <>
- <Spacer />
- <Spacer />
- <div style={flex} className="experts-docs-button">
- <a
- style={docsButtonStyle}
- target={'_blank'}
- href={e.videocall}
- >
- <BlueButton loading={false} fullWidth size="sm">
- <VideoCallLogo /> Call
- </BlueButton>
- </a>
- </div>
- </>
- ) : null}
- </div>
- </Card>
- );
- })}
+ <div className="flex flex-col gap-12 md:gap-4">
+ {expertsInRandomOrder.map((e) => {
+ return <ExpertCard key={e.name} expert={e} Link={Link} />;
+ })}
+ </div>
</div>
</div>
);
diff --git a/packages/promo-pages/src/components/experts/experts-icons.tsx b/packages/promo-pages/src/components/experts/experts-icons.tsx
index edd3ae0538..e65008c67d 100644
--- a/packages/promo-pages/src/components/experts/experts-icons.tsx
+++ b/packages/promo-pages/src/components/experts/experts-icons.tsx
@@ -97,11 +97,10 @@ export const PersonalWebsite: React.FC = () => {
viewBox="0 0 576 576"
style={{
width: 30,
- marginRight: 10,
}}
>
<path
- fill="white"
+ fill="currentcolor"
d="M317.9 422.7C296.4 465.6 272.7 480 256 480c-7.9 0-17.3-3.2-27.3-11l-6.9 18.6c-2.9 7.8-7.7 14.7-13.9 19.9c15.6 3 31.6 4.5 48.1 4.5c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256c0 16.4 1.5 32.5 4.5 48.1c5.3-6.2 12.1-11 19.9-13.9l9.6-3.5c-1.4-10-2.1-20.2-2.1-30.6c0-22.2 3.2-43.7 9.3-64H132c-2.5 19.2-3.9 39.3-4 60l32.2-11.9c.5-16.7 1.9-32.8 4.1-48.1H347.7c2.8 20.2 4.3 41.7 4.3 64s-1.5 43.8-4.3 64H283.6l-11.8 32H342c-5.9 27-14.2 50.9-24.1 70.7zM194.1 89.3C215.6 46.4 239.3 32 256 32s40.4 14.4 61.9 57.3c9.9 19.8 18.2 43.7 24.1 70.7H170c5.9-27 14.2-50.9 24.1-70.7zM384 256c0-22.1-1.4-43.5-4-64h90.8c6 20.3 9.3 41.8 9.3 64s-3.2 43.7-9.3 64H380c2.6-20.5 4-41.9 4-64zm-9.3-96c-9.6-47.6-26.2-88-47.2-116.3c57.8 19.5 105 61.8 130.9 116.3H374.7zM53.6 160c25.9-54.5 73.1-96.9 130.9-116.3c-21 28.3-37.5 68.8-47.2 116.3H53.6zM374.7 352h83.8c-25.9 54.5-73.1 96.9-130.9 116.3c21-28.3 37.6-68.8 47.2-116.3zM271 261.5c2.2-5.9 .7-12.4-3.7-16.8s-11-5.9-16.8-3.7l-215 79.2c-6.2 2.3-10.3 8.1-10.5 14.7s3.8 12.6 9.9 15.1l74 30.5L4.7 484.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L131.5 403.1l30.5 74c2.5 6.1 8.5 10 15.1 9.9s12.4-4.3 14.7-10.5l79.2-215zM143.3 360L85.1 336 229 283 176 426.9l-24-58.2c-1.6-3.9-4.8-7.1-8.7-8.7z"
/>
</svg>
diff --git a/packages/promo-pages/src/index.css b/packages/promo-pages/src/index.css
index 6af5a70b0f..9be330831c 100644
--- a/packages/promo-pages/src/index.css
+++ b/packages/promo-pages/src/index.css
@@ -148,11 +148,9 @@ body {
.experts-pagetitle {
font-size: 3em;
- text-align: center;
}
.experts-tagline {
- text-align: center;
}
.experts-card:hover {