@remotion/promo-pages 5.0.0-canary → 5.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Homepage.js +1 -1
- package/dist/homepage/Pricing.js +1 -1
- package/package.json +15 -12
- package/.turbo/turbo-make.log +0 -8
- package/bundle.ts +0 -38
- package/eslint.config.mjs +0 -7
- package/index.html +0 -13
- package/public/fire.mp3 +0 -0
- package/public/img/cluster.png +0 -0
- package/public/img/code-sample-new.png +0 -0
- package/public/img/freelancers/alex.jpeg +0 -0
- package/public/img/freelancers/antoine.jpeg +0 -0
- package/public/img/freelancers/ayush.png +0 -0
- package/public/img/freelancers/benjamin.jpeg +0 -0
- package/public/img/freelancers/default.png +0 -0
- package/public/img/freelancers/florent.jpeg +0 -0
- package/public/img/freelancers/karel.jpeg +0 -0
- package/public/img/freelancers/lorenzo.jpeg +0 -0
- package/public/img/freelancers/mickael.jpeg +0 -0
- package/public/img/freelancers/mohit.jpeg +0 -0
- package/public/img/freelancers/pramod.jpg +0 -0
- package/public/img/freelancers/pranav.jpg +0 -0
- package/public/img/freelancers/rahul.png +0 -0
- package/public/img/freelancers/ray.jpeg +0 -0
- package/public/img/freelancers/stephen.png +0 -0
- package/public/img/freelancers/umungo.png +0 -0
- package/public/img/freelancers/yehor.jpeg +0 -0
- package/public/img/gt-planar-black.woff2 +0 -0
- package/public/img/gt-planar-bold.woff2 +0 -0
- package/public/img/gt-planar-medium.woff2 +0 -0
- package/public/img/gt-planar-regular.woff2 +0 -0
- package/public/img/logo-small.png +0 -0
- package/public/img/mp4.png +0 -0
- package/public/img/player-demo.mp4 +0 -0
- package/public/img/player-example-dark.png +0 -0
- package/public/img/player-example.png +0 -0
- package/public/img/writeinreact.png +0 -0
- package/public/partyhorn.mp3 +0 -0
- package/public/sad.mp3 +0 -0
- package/src/cn.ts +0 -6
- package/src/components/Homepage.tsx +0 -88
- package/src/components/homepage/BackgroundAnimation.tsx +0 -108
- package/src/components/homepage/ChooseTemplate.tsx +0 -57
- package/src/components/homepage/CodeExample.tsx +0 -89
- package/src/components/homepage/CommunityStats.tsx +0 -54
- package/src/components/homepage/CommunityStatsItems.tsx +0 -304
- package/src/components/homepage/Counter.tsx +0 -110
- package/src/components/homepage/Demo/Card.tsx +0 -273
- package/src/components/homepage/Demo/Cards.tsx +0 -129
- package/src/components/homepage/Demo/Comp.tsx +0 -157
- package/src/components/homepage/Demo/CurrentCountry.tsx +0 -97
- package/src/components/homepage/Demo/DemoError.tsx +0 -18
- package/src/components/homepage/Demo/DemoErrorIcon.tsx +0 -32
- package/src/components/homepage/Demo/DemoRender.tsx +0 -166
- package/src/components/homepage/Demo/DigitWheel.tsx +0 -179
- package/src/components/homepage/Demo/DisplayedEmoji.tsx +0 -81
- package/src/components/homepage/Demo/DoneCheckmark.tsx +0 -39
- package/src/components/homepage/Demo/DownloadNudge.tsx +0 -62
- package/src/components/homepage/Demo/DragAndDropNudge.tsx +0 -57
- package/src/components/homepage/Demo/EmojiCard.tsx +0 -198
- package/src/components/homepage/Demo/Minus.tsx +0 -21
- package/src/components/homepage/Demo/PlayPauseButton.tsx +0 -66
- package/src/components/homepage/Demo/PlayerControls.tsx +0 -48
- package/src/components/homepage/Demo/PlayerSeekBar.tsx +0 -325
- package/src/components/homepage/Demo/PlayerVolume.tsx +0 -83
- package/src/components/homepage/Demo/Progress.tsx +0 -38
- package/src/components/homepage/Demo/Spinner.tsx +0 -60
- package/src/components/homepage/Demo/Switcher.tsx +0 -54
- package/src/components/homepage/Demo/Temperature.tsx +0 -44
- package/src/components/homepage/Demo/TemperatureNumber.tsx +0 -68
- package/src/components/homepage/Demo/ThemeNudge.tsx +0 -72
- package/src/components/homepage/Demo/TimeDisplay.tsx +0 -43
- package/src/components/homepage/Demo/TrendingRepos.tsx +0 -106
- package/src/components/homepage/Demo/icons.tsx +0 -114
- package/src/components/homepage/Demo/index.tsx +0 -158
- package/src/components/homepage/Demo/math.ts +0 -43
- package/src/components/homepage/Demo/types.ts +0 -6
- package/src/components/homepage/Editor.tsx +0 -67
- package/src/components/homepage/EvaluateRemotion.tsx +0 -92
- package/src/components/homepage/FreePricing.tsx +0 -295
- package/src/components/homepage/GetStartedStrip.tsx +0 -77
- package/src/components/homepage/GitHubButton.tsx +0 -23
- package/src/components/homepage/IconForTemplate.tsx +0 -154
- package/src/components/homepage/IfYouKnowReact.tsx +0 -29
- package/src/components/homepage/InfoTooltip.tsx +0 -25
- package/src/components/homepage/MoreTemplatesButton.tsx +0 -29
- package/src/components/homepage/MuxVideo.tsx +0 -68
- package/src/components/homepage/NewsletterButton.tsx +0 -88
- package/src/components/homepage/Pricing.tsx +0 -49
- package/src/components/homepage/PricingBulletPoint.tsx +0 -50
- package/src/components/homepage/RealMp4Videos.tsx +0 -50
- package/src/components/homepage/Spacer.tsx +0 -5
- package/src/components/homepage/TemplateIcon.tsx +0 -36
- package/src/components/homepage/TextInput.tsx +0 -62
- package/src/components/homepage/TrustedByBanner.tsx +0 -194
- package/src/components/homepage/VideoApps.tsx +0 -231
- package/src/components/homepage/VideoAppsShowcase.tsx +0 -276
- package/src/components/homepage/VideoAppsTitle.tsx +0 -24
- package/src/components/homepage/VideoPlayerWithControls.tsx +0 -188
- package/src/components/homepage/WriteInReact.tsx +0 -34
- package/src/components/homepage/YouAreHere.tsx +0 -30
- package/src/components/homepage/custom.css +0 -57
- package/src/components/homepage/layout/Button.tsx +0 -93
- package/src/components/homepage/layout/colors.ts +0 -17
- package/src/components/homepage/layout/use-color-mode.tsx +0 -44
- package/src/components/homepage/layout/use-el-size.ts +0 -51
- package/src/components/homepage/layout/use-mobile-layout.ts +0 -8
- package/src/components/homepage/video-player.css +0 -24
- package/src/components/icons/blank.tsx +0 -13
- package/src/components/icons/clone.tsx +0 -10
- package/src/components/icons/code-hike.tsx +0 -15
- package/src/components/icons/cubes.tsx +0 -13
- package/src/components/icons/js.tsx +0 -17
- package/src/components/icons/next.tsx +0 -64
- package/src/components/icons/overlay.tsx +0 -24
- package/src/components/icons/remix.tsx +0 -24
- package/src/components/icons/skia.tsx +0 -13
- package/src/components/icons/stargazer.tsx +0 -13
- package/src/components/icons/still.tsx +0 -13
- package/src/components/icons/tailwind.tsx +0 -22
- package/src/components/icons/tiktok.tsx +0 -13
- package/src/components/icons/ts.tsx +0 -18
- package/src/components/icons/tts.tsx +0 -13
- package/src/components/icons/undo.tsx +0 -11
- package/src/components/icons/waveform.tsx +0 -13
- package/src/fonts.css +0 -30
- package/src/index.css +0 -74
- package/src/main.tsx +0 -12
- package/tsconfig.json +0 -15
- package/vite.config.ts +0 -9
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {useMobileLayout} from './layout/use-mobile-layout';
|
|
3
|
-
|
|
4
|
-
const icon: React.CSSProperties = {
|
|
5
|
-
height: 16,
|
|
6
|
-
marginLeft: 10,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const MoreTemplatesButton: React.FC = () => {
|
|
10
|
-
const mobileLayout = useMobileLayout();
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<a href="/templates" className="no-underline text-inherit">
|
|
14
|
-
<div className="right-0 border-2 rounded-full text-inherit px-4 py-2 fontbrand font-semibold text-sm flex flex-row items-center">
|
|
15
|
-
{mobileLayout ? 'Templates' : 'Find a template'}
|
|
16
|
-
<svg
|
|
17
|
-
style={icon}
|
|
18
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
-
viewBox="0 0 448 512"
|
|
20
|
-
>
|
|
21
|
-
<path
|
|
22
|
-
fill="currentColor"
|
|
23
|
-
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"
|
|
24
|
-
/>
|
|
25
|
-
</svg>
|
|
26
|
-
</div>
|
|
27
|
-
</a>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import Hls from 'hls.js';
|
|
2
|
-
import React, {forwardRef, useEffect, useImperativeHandle, useRef} from 'react';
|
|
3
|
-
import {VideoPlayerWithControls} from './VideoPlayerWithControls';
|
|
4
|
-
|
|
5
|
-
const getVideoToPlayUrl = (muxId: string) => {
|
|
6
|
-
return `https://stream.mux.com/${muxId}.m3u8`;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const MuxVideoForward: React.ForwardRefRenderFunction<
|
|
10
|
-
HTMLVideoElement,
|
|
11
|
-
React.DetailedHTMLProps<
|
|
12
|
-
React.VideoHTMLAttributes<HTMLVideoElement>,
|
|
13
|
-
HTMLVideoElement
|
|
14
|
-
> & {
|
|
15
|
-
readonly muxId: string;
|
|
16
|
-
}
|
|
17
|
-
> = ({muxId, ...props}, ref) => {
|
|
18
|
-
const videoRef = useRef<HTMLVideoElement>(null);
|
|
19
|
-
const vidUrl = getVideoToPlayUrl(muxId);
|
|
20
|
-
|
|
21
|
-
useImperativeHandle(ref, () => videoRef.current!, []);
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
let hls: Hls;
|
|
25
|
-
if (videoRef.current) {
|
|
26
|
-
const {current} = videoRef;
|
|
27
|
-
if (current.canPlayType('application/vnd.apple.mpegurl')) {
|
|
28
|
-
// Some browers (safari and ie edge) support HLS natively
|
|
29
|
-
current.src = vidUrl;
|
|
30
|
-
} else if (Hls.isSupported()) {
|
|
31
|
-
// This will run in all other modern browsers
|
|
32
|
-
hls = new Hls();
|
|
33
|
-
hls.loadSource(vidUrl);
|
|
34
|
-
hls.attachMedia(current);
|
|
35
|
-
} else {
|
|
36
|
-
// eslint-disable-next-line no-console
|
|
37
|
-
console.error("This is a legacy browser that doesn't support MSE");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return () => {
|
|
42
|
-
if (hls) {
|
|
43
|
-
hls.destroy();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}, [vidUrl, videoRef]);
|
|
47
|
-
|
|
48
|
-
return <video ref={videoRef} {...props} />;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const MuxVideo = forwardRef(MuxVideoForward);
|
|
52
|
-
|
|
53
|
-
export const NewMuxVideo: React.FC<{
|
|
54
|
-
readonly muxId: string;
|
|
55
|
-
}> = ({muxId}) => {
|
|
56
|
-
return (
|
|
57
|
-
<VideoPlayerWithControls
|
|
58
|
-
playbackId={muxId}
|
|
59
|
-
poster={'https://image.mux.com/' + muxId + '/thumbnail.png?time=1'}
|
|
60
|
-
onError={(error) => {
|
|
61
|
-
// eslint-disable-next-line no-console
|
|
62
|
-
console.log(error);
|
|
63
|
-
}}
|
|
64
|
-
onLoaded={() => undefined}
|
|
65
|
-
onSize={() => undefined}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React, {useCallback, useState} from 'react';
|
|
2
|
-
import {BlueButton} from './layout/Button';
|
|
3
|
-
import {Spacer} from './Spacer';
|
|
4
|
-
|
|
5
|
-
export const NewsletterButton: React.FC<{}> = () => {
|
|
6
|
-
const [email, setEmail] = useState('');
|
|
7
|
-
const [submitting, setSubmitting] = useState(false);
|
|
8
|
-
const [subscribed, setSubscribed] = useState(false);
|
|
9
|
-
|
|
10
|
-
const handleSubmit = useCallback(
|
|
11
|
-
async (e: React.FormEvent<HTMLFormElement>) => {
|
|
12
|
-
try {
|
|
13
|
-
setSubmitting(true);
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
|
|
16
|
-
const response = await fetch(
|
|
17
|
-
'https://www.remotion.pro/api/newsletter',
|
|
18
|
-
{
|
|
19
|
-
method: 'POST',
|
|
20
|
-
body: JSON.stringify({email}),
|
|
21
|
-
headers: {
|
|
22
|
-
'content-type': 'application/json',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
const json = await response.json();
|
|
27
|
-
if (json.success) {
|
|
28
|
-
setSubscribed(true);
|
|
29
|
-
} else {
|
|
30
|
-
// eslint-disable-next-line no-alert
|
|
31
|
-
alert('Something went wrong. Please try again later.');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
setSubmitting(false);
|
|
35
|
-
} catch {
|
|
36
|
-
// eslint-disable-next-line no-alert
|
|
37
|
-
alert('Something went wrong. Please try again later.');
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
[email],
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<div>
|
|
45
|
-
<div className="flex flex-col">
|
|
46
|
-
<div className={'w-full'}>
|
|
47
|
-
<div className={'border-effect bg-pane flex flex-col flex-1 p-5'}>
|
|
48
|
-
<div className={'text-2xl font-bold fontbrand'}>Newsletter</div>
|
|
49
|
-
<form
|
|
50
|
-
onSubmit={handleSubmit}
|
|
51
|
-
style={{
|
|
52
|
-
width: '100%',
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
<p className="leading-snug mt-1 text-muted fontbrand">
|
|
56
|
-
Read about new features and noteworthy updates we have made on
|
|
57
|
-
Remotion once in a while.
|
|
58
|
-
</p>
|
|
59
|
-
|
|
60
|
-
<input
|
|
61
|
-
className="w-full rounded-lg border-effect border-black outline-none px-3 py-3 fontbrand text-lg box-border focus:border-brand"
|
|
62
|
-
disabled={submitting}
|
|
63
|
-
value={email}
|
|
64
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
65
|
-
type={'email'}
|
|
66
|
-
required
|
|
67
|
-
placeholder="animator@gmail.com"
|
|
68
|
-
/>
|
|
69
|
-
<Spacer />
|
|
70
|
-
<Spacer />
|
|
71
|
-
<div>
|
|
72
|
-
<BlueButton
|
|
73
|
-
type="submit"
|
|
74
|
-
className="w-full"
|
|
75
|
-
loading={submitting}
|
|
76
|
-
disabled={submitting || subscribed}
|
|
77
|
-
size="sm"
|
|
78
|
-
>
|
|
79
|
-
{subscribed ? 'Subscribed!' : 'Subscribe'}
|
|
80
|
-
</BlueButton>
|
|
81
|
-
</div>
|
|
82
|
-
</form>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {CompanyPricing, EnterpriseLicense, FreePricing} from './FreePricing';
|
|
3
|
-
|
|
4
|
-
export const Pricing: React.FC = () => {
|
|
5
|
-
return (
|
|
6
|
-
<div
|
|
7
|
-
style={{
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexDirection: 'column',
|
|
10
|
-
gap: 20,
|
|
11
|
-
marginBottom: 40,
|
|
12
|
-
}}
|
|
13
|
-
>
|
|
14
|
-
<FreePricing />
|
|
15
|
-
<CompanyPricing />
|
|
16
|
-
<EnterpriseLicense />
|
|
17
|
-
<div
|
|
18
|
-
style={{
|
|
19
|
-
justifyContent: 'center',
|
|
20
|
-
display: 'flex',
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
<div
|
|
24
|
-
style={{
|
|
25
|
-
fontFamily: 'GTPlanar',
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
See our{' '}
|
|
29
|
-
<a
|
|
30
|
-
target="_blank"
|
|
31
|
-
className="bluelink"
|
|
32
|
-
href="https://remotion.pro/faq"
|
|
33
|
-
>
|
|
34
|
-
FAQ
|
|
35
|
-
</a>{' '}
|
|
36
|
-
and{' '}
|
|
37
|
-
<a
|
|
38
|
-
target="_blank"
|
|
39
|
-
className="bluelink"
|
|
40
|
-
href="https://www.remotion.pro/terms"
|
|
41
|
-
>
|
|
42
|
-
Terms and Conditions
|
|
43
|
-
</a>{' '}
|
|
44
|
-
for more details.
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const container: React.CSSProperties = {
|
|
4
|
-
display: 'flex',
|
|
5
|
-
flexDirection: 'row',
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
gap: '10px',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const greyCircle: React.CSSProperties = {
|
|
11
|
-
width: 20,
|
|
12
|
-
height: 20,
|
|
13
|
-
borderRadius: 10,
|
|
14
|
-
backgroundColor: 'var(--footer-border)',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const PricingBulletPoint: React.FC<{
|
|
18
|
-
readonly text: React.ReactNode;
|
|
19
|
-
readonly checked: boolean;
|
|
20
|
-
readonly children?: React.ReactNode;
|
|
21
|
-
}> = ({text, checked, children}) => {
|
|
22
|
-
const checkmarkSVG = (
|
|
23
|
-
<svg
|
|
24
|
-
width="20"
|
|
25
|
-
height="20"
|
|
26
|
-
viewBox="0 0 20 20"
|
|
27
|
-
fill="none"
|
|
28
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
29
|
-
style={{
|
|
30
|
-
flexShrink: 0,
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
<circle cx="10" cy="10" r="10" fill="#0B84F3" />
|
|
34
|
-
<path
|
|
35
|
-
d="M14.7908 7.20505C15.0697 7.47844 15.0697 7.92243 14.7908 8.19583L9.07711 13.795C8.79813 14.0683 8.34505 14.0683 8.06606 13.795L5.20924 10.9954C4.93025 10.722 4.93025 10.278 5.20924 10.0046C5.48823 9.73121 5.9413 9.73121 6.22029 10.0046L8.5727 12.3077L13.7819 7.20505C14.0609 6.93165 14.514 6.93165 14.793 7.20505H14.7908Z"
|
|
36
|
-
fill="white"
|
|
37
|
-
/>
|
|
38
|
-
</svg>
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div style={container}>
|
|
43
|
-
{checked ? checkmarkSVG : <div style={greyCircle} />}
|
|
44
|
-
<div className={'fontbrand text-lg '}>
|
|
45
|
-
{text}
|
|
46
|
-
{children}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, {useCallback, useEffect, useRef, useState} from 'react';
|
|
2
|
-
|
|
3
|
-
export const RealMP4Videos: React.FC = () => {
|
|
4
|
-
const ref = useRef<HTMLDivElement>(null);
|
|
5
|
-
const [isIntersecting, setIsIntersecting] = useState(false);
|
|
6
|
-
|
|
7
|
-
const callback: IntersectionObserverCallback = useCallback((data) => {
|
|
8
|
-
setIsIntersecting(data[0].isIntersecting);
|
|
9
|
-
}, []);
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const {current} = ref;
|
|
13
|
-
if (!current) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const observer = new IntersectionObserver(callback, {
|
|
18
|
-
root: null,
|
|
19
|
-
threshold: 0.5,
|
|
20
|
-
});
|
|
21
|
-
observer.observe(current);
|
|
22
|
-
|
|
23
|
-
return () => observer.unobserve(current);
|
|
24
|
-
}, [callback]);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div ref={ref} className={'flex flex-col lg:flex-row'}>
|
|
28
|
-
<div>
|
|
29
|
-
<h2 className="text-4xl fontbrand">
|
|
30
|
-
Real <span className={'text-brand'}>.mp4</span> videos
|
|
31
|
-
</h2>
|
|
32
|
-
<p className="leading-relaxed">
|
|
33
|
-
Remotion renders all frames to images and <br /> encodes them to a
|
|
34
|
-
real video - audio support included. <br /> WebM and other formats are
|
|
35
|
-
also supported.
|
|
36
|
-
</p>
|
|
37
|
-
</div>
|
|
38
|
-
<div className="flex flex-1 justify-start lg:justify-end items-end">
|
|
39
|
-
<img
|
|
40
|
-
src="/img/mp4.png"
|
|
41
|
-
className="mb-[30px] lg:mb-0"
|
|
42
|
-
style={{
|
|
43
|
-
width: 110,
|
|
44
|
-
animationPlayState: isIntersecting ? 'running' : 'paused',
|
|
45
|
-
}}
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {useMobileLayout} from './layout/use-mobile-layout';
|
|
3
|
-
|
|
4
|
-
const icon: React.CSSProperties = {
|
|
5
|
-
display: 'flex',
|
|
6
|
-
width: 36,
|
|
7
|
-
height: 36,
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
margin: 0,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const outer: React.CSSProperties = {
|
|
14
|
-
textAlign: 'center',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
flexDirection: 'column',
|
|
18
|
-
color: 'var(--ifm-font-color-base)',
|
|
19
|
-
cursor: 'pointer',
|
|
20
|
-
filter: 'drop-shadow(0px 0px 4px var(--background))',
|
|
21
|
-
textDecoration: 'none',
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const TemplateIcon: React.FC<{
|
|
25
|
-
readonly label: string;
|
|
26
|
-
readonly children: React.ReactNode;
|
|
27
|
-
}> = ({children, label}) => {
|
|
28
|
-
const mobileLayout = useMobileLayout();
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<span style={outer}>
|
|
32
|
-
<div style={icon}>{children}</div>
|
|
33
|
-
{mobileLayout ? null : <div className="text-xs fontbrand">{label}</div>}
|
|
34
|
-
</span>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type {DetailedHTMLProps} from 'react';
|
|
2
|
-
import React, {useCallback, useState} from 'react';
|
|
3
|
-
|
|
4
|
-
const inputStyle: React.CSSProperties = {
|
|
5
|
-
padding: 16,
|
|
6
|
-
border: 'none',
|
|
7
|
-
outline: 'none',
|
|
8
|
-
borderRadius: 4,
|
|
9
|
-
minWidth: 35,
|
|
10
|
-
fontSize: 16,
|
|
11
|
-
background: 'var(--background)',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const backgroundStyle = (
|
|
15
|
-
focused: boolean,
|
|
16
|
-
fullWidth: boolean,
|
|
17
|
-
): React.CSSProperties => {
|
|
18
|
-
return {
|
|
19
|
-
padding: 2,
|
|
20
|
-
background: focused
|
|
21
|
-
? 'var(--ifm-color-primary)'
|
|
22
|
-
: 'var(--ifm-font-color-base)',
|
|
23
|
-
display: fullWidth ? 'block' : 'inline-block',
|
|
24
|
-
transition: '0.2s background-color',
|
|
25
|
-
borderRadius: 7,
|
|
26
|
-
overflow: 'hidden',
|
|
27
|
-
width: fullWidth ? '100%' : undefined,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
type Props = Omit<
|
|
32
|
-
DetailedHTMLProps<
|
|
33
|
-
React.InputHTMLAttributes<HTMLInputElement>,
|
|
34
|
-
HTMLInputElement
|
|
35
|
-
>,
|
|
36
|
-
'onFocus' | 'onBlur'
|
|
37
|
-
> & {
|
|
38
|
-
readonly fullWidth?: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const CoolInput: React.FC<Props> = ({style, fullWidth, ...props}) => {
|
|
42
|
-
const [focus, setFocused] = useState(false);
|
|
43
|
-
|
|
44
|
-
const onFocus = useCallback(() => {
|
|
45
|
-
setFocused(true);
|
|
46
|
-
}, [setFocused]);
|
|
47
|
-
|
|
48
|
-
const onBlur = useCallback(() => {
|
|
49
|
-
setFocused(false);
|
|
50
|
-
}, [setFocused]);
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<div style={backgroundStyle(focus, fullWidth!)}>
|
|
54
|
-
<input
|
|
55
|
-
style={{...inputStyle, ...style}}
|
|
56
|
-
{...props}
|
|
57
|
-
onFocus={onFocus}
|
|
58
|
-
onBlur={onBlur}
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
};
|