@remotion/promo-pages 4.0.260 → 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.
Files changed (131) hide show
  1. package/dist/Homepage.js +2 -4
  2. package/package.json +52 -48
  3. package/.turbo/turbo-lint.log +0 -5
  4. package/.turbo/turbo-make.log +0 -8
  5. package/LICENSE.md +0 -49
  6. package/bundle.ts +0 -46
  7. package/eslint.config.mjs +0 -7
  8. package/index.html +0 -13
  9. package/public/fire.mp3 +0 -0
  10. package/public/img/cluster.png +0 -0
  11. package/public/img/code-sample-new.png +0 -0
  12. package/public/img/freelancers/alex.jpeg +0 -0
  13. package/public/img/freelancers/antoine.jpeg +0 -0
  14. package/public/img/freelancers/ayush.png +0 -0
  15. package/public/img/freelancers/benjamin.jpeg +0 -0
  16. package/public/img/freelancers/default.png +0 -0
  17. package/public/img/freelancers/florent.jpeg +0 -0
  18. package/public/img/freelancers/karel.jpeg +0 -0
  19. package/public/img/freelancers/lorenzo.jpeg +0 -0
  20. package/public/img/freelancers/mickael.jpeg +0 -0
  21. package/public/img/freelancers/mohit.jpeg +0 -0
  22. package/public/img/freelancers/pramod.jpg +0 -0
  23. package/public/img/freelancers/pranav.jpg +0 -0
  24. package/public/img/freelancers/rahul.png +0 -0
  25. package/public/img/freelancers/ray.jpeg +0 -0
  26. package/public/img/freelancers/stephen.png +0 -0
  27. package/public/img/freelancers/umungo.png +0 -0
  28. package/public/img/freelancers/yehor.jpeg +0 -0
  29. package/public/img/gt-planar-black.woff2 +0 -0
  30. package/public/img/gt-planar-bold.woff2 +0 -0
  31. package/public/img/gt-planar-medium.woff2 +0 -0
  32. package/public/img/gt-planar-regular.woff2 +0 -0
  33. package/public/img/logo-small.png +0 -0
  34. package/public/img/mp4.png +0 -0
  35. package/public/img/player-demo.mp4 +0 -0
  36. package/public/img/player-example-dark.png +0 -0
  37. package/public/img/player-example.png +0 -0
  38. package/public/img/writeinreact.png +0 -0
  39. package/public/partyhorn.mp3 +0 -0
  40. package/public/sad.mp3 +0 -0
  41. package/src/cn.ts +0 -6
  42. package/src/components/Homepage.tsx +0 -88
  43. package/src/components/homepage/BackgroundAnimation.tsx +0 -108
  44. package/src/components/homepage/ChooseTemplate.tsx +0 -57
  45. package/src/components/homepage/CodeExample.tsx +0 -89
  46. package/src/components/homepage/CommunityStats.tsx +0 -54
  47. package/src/components/homepage/CommunityStatsItems.tsx +0 -304
  48. package/src/components/homepage/Counter.tsx +0 -110
  49. package/src/components/homepage/Demo/Card.tsx +0 -273
  50. package/src/components/homepage/Demo/Cards.tsx +0 -129
  51. package/src/components/homepage/Demo/Comp.tsx +0 -157
  52. package/src/components/homepage/Demo/CurrentCountry.tsx +0 -97
  53. package/src/components/homepage/Demo/DemoError.tsx +0 -18
  54. package/src/components/homepage/Demo/DemoErrorIcon.tsx +0 -32
  55. package/src/components/homepage/Demo/DemoRender.tsx +0 -166
  56. package/src/components/homepage/Demo/DigitWheel.tsx +0 -179
  57. package/src/components/homepage/Demo/DisplayedEmoji.tsx +0 -81
  58. package/src/components/homepage/Demo/DoneCheckmark.tsx +0 -39
  59. package/src/components/homepage/Demo/DownloadNudge.tsx +0 -62
  60. package/src/components/homepage/Demo/DragAndDropNudge.tsx +0 -57
  61. package/src/components/homepage/Demo/EmojiCard.tsx +0 -198
  62. package/src/components/homepage/Demo/Minus.tsx +0 -21
  63. package/src/components/homepage/Demo/PlayPauseButton.tsx +0 -66
  64. package/src/components/homepage/Demo/PlayerControls.tsx +0 -48
  65. package/src/components/homepage/Demo/PlayerSeekBar.tsx +0 -325
  66. package/src/components/homepage/Demo/PlayerVolume.tsx +0 -83
  67. package/src/components/homepage/Demo/Progress.tsx +0 -38
  68. package/src/components/homepage/Demo/Spinner.tsx +0 -60
  69. package/src/components/homepage/Demo/Switcher.tsx +0 -54
  70. package/src/components/homepage/Demo/Temperature.tsx +0 -44
  71. package/src/components/homepage/Demo/TemperatureNumber.tsx +0 -68
  72. package/src/components/homepage/Demo/ThemeNudge.tsx +0 -72
  73. package/src/components/homepage/Demo/TimeDisplay.tsx +0 -43
  74. package/src/components/homepage/Demo/TrendingRepos.tsx +0 -106
  75. package/src/components/homepage/Demo/icons.tsx +0 -114
  76. package/src/components/homepage/Demo/index.tsx +0 -158
  77. package/src/components/homepage/Demo/math.ts +0 -43
  78. package/src/components/homepage/Demo/types.ts +0 -6
  79. package/src/components/homepage/Editor.tsx +0 -67
  80. package/src/components/homepage/EvaluateRemotion.tsx +0 -92
  81. package/src/components/homepage/FreePricing.tsx +0 -295
  82. package/src/components/homepage/GetStartedStrip.tsx +0 -77
  83. package/src/components/homepage/GitHubButton.tsx +0 -23
  84. package/src/components/homepage/IconForTemplate.tsx +0 -154
  85. package/src/components/homepage/IfYouKnowReact.tsx +0 -29
  86. package/src/components/homepage/InfoTooltip.tsx +0 -25
  87. package/src/components/homepage/MoreTemplatesButton.tsx +0 -29
  88. package/src/components/homepage/MuxVideo.tsx +0 -68
  89. package/src/components/homepage/NewsletterButton.tsx +0 -88
  90. package/src/components/homepage/Pricing.tsx +0 -49
  91. package/src/components/homepage/PricingBulletPoint.tsx +0 -50
  92. package/src/components/homepage/RealMp4Videos.tsx +0 -50
  93. package/src/components/homepage/Spacer.tsx +0 -5
  94. package/src/components/homepage/TemplateIcon.tsx +0 -36
  95. package/src/components/homepage/TextInput.tsx +0 -62
  96. package/src/components/homepage/TrustedByBanner.tsx +0 -194
  97. package/src/components/homepage/VideoApps.tsx +0 -231
  98. package/src/components/homepage/VideoAppsShowcase.tsx +0 -276
  99. package/src/components/homepage/VideoAppsTitle.tsx +0 -24
  100. package/src/components/homepage/VideoPlayerWithControls.tsx +0 -188
  101. package/src/components/homepage/WriteInReact.tsx +0 -34
  102. package/src/components/homepage/YouAreHere.tsx +0 -30
  103. package/src/components/homepage/custom.css +0 -57
  104. package/src/components/homepage/layout/Button.tsx +0 -93
  105. package/src/components/homepage/layout/colors.ts +0 -17
  106. package/src/components/homepage/layout/use-color-mode.tsx +0 -44
  107. package/src/components/homepage/layout/use-el-size.ts +0 -51
  108. package/src/components/homepage/layout/use-mobile-layout.ts +0 -8
  109. package/src/components/homepage/video-player.css +0 -24
  110. package/src/components/icons/blank.tsx +0 -13
  111. package/src/components/icons/clone.tsx +0 -10
  112. package/src/components/icons/code-hike.tsx +0 -15
  113. package/src/components/icons/cubes.tsx +0 -13
  114. package/src/components/icons/js.tsx +0 -17
  115. package/src/components/icons/next.tsx +0 -64
  116. package/src/components/icons/overlay.tsx +0 -24
  117. package/src/components/icons/remix.tsx +0 -24
  118. package/src/components/icons/skia.tsx +0 -13
  119. package/src/components/icons/stargazer.tsx +0 -13
  120. package/src/components/icons/still.tsx +0 -13
  121. package/src/components/icons/tailwind.tsx +0 -22
  122. package/src/components/icons/tiktok.tsx +0 -13
  123. package/src/components/icons/ts.tsx +0 -18
  124. package/src/components/icons/tts.tsx +0 -13
  125. package/src/components/icons/undo.tsx +0 -11
  126. package/src/components/icons/waveform.tsx +0 -13
  127. package/src/fonts.css +0 -30
  128. package/src/index.css +0 -74
  129. package/src/main.tsx +0 -12
  130. package/tsconfig.json +0 -15
  131. package/vite.config.ts +0 -9
package/dist/Homepage.js CHANGED
@@ -834,7 +834,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
834
834
  setNonce(context.getNonce);
835
835
  }, [context]);
836
836
  return nonce;
837
- }, exports_timeline_position_state, CompositionManager, EditorPropsContext, editorPropsProviderRef, timeValueRef, EditorPropsProvider = ({ children }) => {
837
+ }, exports_timeline_position_state, CompositionManager, EditorPropsContext, editorPropsProviderRef, EditorPropsProvider = ({ children }) => {
838
838
  const [props, setProps] = React42.useState({});
839
839
  const updateProps = useCallback22(({
840
840
  defaultProps,
@@ -5509,7 +5509,6 @@ var init_esm = __esm(() => {
5509
5509
  }
5510
5510
  });
5511
5511
  editorPropsProviderRef = React42.createRef();
5512
- timeValueRef = React42.createRef();
5513
5512
  validCodecs = [
5514
5513
  "h264",
5515
5514
  "h265",
@@ -5820,8 +5819,7 @@ var init_esm = __esm(() => {
5820
5819
  Log,
5821
5820
  LogLevelContext,
5822
5821
  useLogLevel,
5823
- playbackLogging,
5824
- timeValueRef
5822
+ playbackLogging
5825
5823
  };
5826
5824
  PERCENTAGE = NUMBER + "%";
5827
5825
  IsInsideSeriesContext = createContext19(false);
package/package.json CHANGED
@@ -1,49 +1,53 @@
1
1
  {
2
- "name": "@remotion/promo-pages",
3
- "version": "4.0.260",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "type": "module",
8
- "dependencies": {
9
- "hls.js": "1.5.19",
10
- "polished": "4.3.1",
11
- "vite": "^5.4.12",
12
- "zod": "3.22.3",
13
- "@remotion/animated-emoji": "4.0.260",
14
- "@remotion/lambda": "4.0.260",
15
- "@remotion/lottie": "4.0.260",
16
- "@remotion/paths": "4.0.260",
17
- "@remotion/player": "4.0.260",
18
- "@remotion/shapes": "4.0.260",
19
- "create-video": "4.0.260",
20
- "remotion": "4.0.260"
21
- },
22
- "devDependencies": {
23
- "@eslint/eslintrc": "3.1.0",
24
- "@types/react": "19.0.0",
25
- "@types/react-dom": "19.0.0",
26
- "eslint": "9.19.0",
27
- "eslint-config-next": "15.0.4",
28
- "plyr": "^3.7.3",
29
- "postcss": "8.4.47",
30
- "tailwindcss": "4.0.0",
31
- "@tailwindcss/cli": "4.0.0",
32
- "@tailwindcss/vite": "4.0.0",
33
- "react": "19.0.0",
34
- "react-dom": "19.0.0",
35
- "@vitejs/plugin-react-swc": "^3.5.0",
36
- "tailwind-merge": "2.5.2",
37
- "bun-plugin-tailwind": "0.0.13",
38
- "clsx": "2.1.1",
39
- "@remotion/eslint-config-internal": "4.0.260"
40
- },
41
- "repository": {
42
- "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"
43
- },
44
- "scripts": {
45
- "make": "bun --env-file=../.env.bundle bundle.ts",
46
- "lint": "tsc && eslint src",
47
- "dev": "vite"
48
- }
49
- }
2
+ "name": "@remotion/promo-pages",
3
+ "version": "5.0.0-canary.3",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "scripts": {
8
+ "make": "bun --env-file=../.env.bundle bundle.ts",
9
+ "lint": "tsc && eslint src",
10
+ "dev": "vite"
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "type": "module",
16
+ "dependencies": {
17
+ "@remotion/animated-emoji": "4.0.259",
18
+ "@remotion/lambda": "4.0.259",
19
+ "@remotion/lottie": "4.0.259",
20
+ "@remotion/paths": "4.0.259",
21
+ "@remotion/player": "4.0.259",
22
+ "@remotion/shapes": "4.0.259",
23
+ "create-video": "4.0.259",
24
+ "hls.js": "1.5.19",
25
+ "polished": "4.3.1",
26
+ "remotion": "4.0.259",
27
+ "vite": "^5.4.12",
28
+ "zod": "3.22.3"
29
+ },
30
+ "devDependencies": {
31
+ "@remotion/eslint-config-internal": "4.0.259",
32
+ "@eslint/eslintrc": "3.1.0",
33
+ "@types/react": "19.0.0",
34
+ "@types/react-dom": "19.0.0",
35
+ "eslint": "9.14.0",
36
+ "eslint-config-next": "15.0.4",
37
+ "plyr": "^3.7.3",
38
+ "postcss": "8.4.47",
39
+ "tailwindcss": "4.0.0",
40
+ "@tailwindcss/cli": "4.0.0",
41
+ "@tailwindcss/vite": "4.0.0",
42
+ "react": "19.0.0",
43
+ "react-dom": "19.0.0",
44
+ "tailwindcss-scoped-preflight": "3.4.10",
45
+ "@vitejs/plugin-react-swc": "^3.5.0",
46
+ "tailwind-merge": "2.5.2",
47
+ "bun-plugin-tailwind": "0.0.13",
48
+ "clsx": "2.1.1"
49
+ },
50
+ "repository": {
51
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"
52
+ }
53
+ }
@@ -1,5 +0,0 @@
1
-
2
- 
3
- > @remotion/promo-pages@4.0.259 lint /Users/jonathanburger/remotion/packages/promo-pages
4
- > tsc && eslint src
5
-
@@ -1,8 +0,0 @@
1
-
2
- 
3
- > @remotion/promo-pages@4.0.259 make /Users/jonathanburger/remotion/packages/promo-pages
4
- > bun --env-file=../.env.bundle bundle.ts
5
-
6
- ≈ tailwindcss v4.0.0
7
-
8
- Done in 65ms
package/LICENSE.md DELETED
@@ -1,49 +0,0 @@
1
- # Remotion License
2
-
3
- In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
4
-
5
- ---
6
-
7
- Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
8
-
9
- - [Free license](#free-license)
10
- - [Company license](#company-license)
11
-
12
- ## Free license
13
-
14
- Copyright © 2025 [Remotion](https://www.remotion.dev)
15
-
16
- ### Eligibility
17
-
18
- You are eligible to use Remotion for free if you are:
19
-
20
- - an individual
21
- - a for-profit organization with up to 3 employees
22
- - a non-profit or not-for-profit organization
23
- - evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
24
-
25
- ### Allowed use cases
26
-
27
- Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
28
-
29
- ### Disallowed use cases
30
-
31
- It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
32
-
33
- ### Warranty notice
34
-
35
- The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
36
-
37
- ### Support
38
-
39
- Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
40
-
41
- ## Company license
42
-
43
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
44
-
45
- Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
46
-
47
- ### FAQs
48
-
49
- Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
package/bundle.ts DELETED
@@ -1,46 +0,0 @@
1
- import {$} from 'bun';
2
- import {NoReactInternals} from 'remotion/no-react';
3
-
4
- if (process.env.NODE_ENV !== 'production') {
5
- throw new Error('This script must be run using NODE_ENV=production');
6
- }
7
-
8
- const nodeVersion =
9
- await $`node -e "console.log(typeof structuredClone)"`.text();
10
- if (nodeVersion.trim() === 'undefined') {
11
- if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
12
- throw new Error(
13
- 'Error: You are using Node.js without structuredClone. Please upgrade to Node.js 17 or newer.',
14
- );
15
- } else {
16
- console.log(
17
- 'Node does not have structuredClone. Passing because we are not building the site.',
18
- );
19
- process.exit(0);
20
- }
21
- }
22
-
23
- await $`bunx tailwindcss -i src/index.css -o dist/tailwind.css`;
24
-
25
- const result = await Bun.build({
26
- entrypoints: [
27
- './src/components/Homepage.tsx',
28
- './src/components/homepage/Pricing.tsx',
29
- ],
30
- format: 'esm',
31
- external: [
32
- 'react',
33
- 'react/jsx-runtime',
34
- 'react-dom',
35
- 'lottie-web',
36
- 'hls.js',
37
- 'plyr',
38
- 'zod',
39
- ],
40
- });
41
-
42
- for (const output of result.outputs) {
43
- await Bun.write('dist/' + output.path, await output.text());
44
- }
45
-
46
- export {};
package/eslint.config.mjs DELETED
@@ -1,7 +0,0 @@
1
- import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
-
3
- const config = remotionFlatConfig({react: true});
4
-
5
- export default {
6
- ...config,
7
- };
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Vite + React + TS</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
13
- </html>
package/public/fire.mp3 DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/public/sad.mp3 DELETED
Binary file
package/src/cn.ts DELETED
@@ -1,6 +0,0 @@
1
- import {clsx, type ClassValue} from 'clsx';
2
- import {twMerge} from 'tailwind-merge';
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
@@ -1,88 +0,0 @@
1
- 'use client';
2
-
3
- import React from 'react';
4
- import {BackgroundAnimation} from './homepage/BackgroundAnimation';
5
- import CommunityStats from './homepage/CommunityStats';
6
- import './homepage/custom.css';
7
- import {Demo} from './homepage/Demo';
8
- import {LightningFastEditor} from './homepage/Editor';
9
- import EvaluateRemotionSection from './homepage/EvaluateRemotion';
10
- import {IfYouKnowReact} from './homepage/IfYouKnowReact';
11
- import type {ColorMode} from './homepage/layout/use-color-mode';
12
- import {ColorModeProvider} from './homepage/layout/use-color-mode';
13
- import {NewsletterButton} from './homepage/NewsletterButton';
14
- import {Pricing} from './homepage/Pricing';
15
- import {RealMP4Videos} from './homepage/RealMp4Videos';
16
- import TrustedByBanner from './homepage/TrustedByBanner';
17
- import {VideoApps} from './homepage/VideoApps';
18
- import VideoAppsShowcase from './homepage/VideoAppsShowcase';
19
- import {SectionTitle, VideoAppsTitle} from './homepage/VideoAppsTitle';
20
- import {WriteInReact} from './homepage/WriteInReact';
21
-
22
- export const NewLanding: React.FC<{
23
- readonly colorMode: ColorMode;
24
- readonly setColorMode: (colorMode: ColorMode) => void;
25
- }> = ({colorMode, setColorMode}) => {
26
- return (
27
- <ColorModeProvider colorMode={colorMode} setColorMode={setColorMode}>
28
- <div className="bg-[var(--background)] relative">
29
- <div>
30
- <div>
31
- <BackgroundAnimation />
32
- </div>
33
- <br />
34
- <br />
35
- <br />
36
- <br />
37
- <div className="max-w-[500px] lg:max-w-[1000px] m-auto pl-5 pr-5 relative">
38
- <WriteInReact />
39
- <br />
40
- <IfYouKnowReact />
41
- <br />
42
- <br />
43
- <br />
44
- <br />
45
- <br />
46
- <br />
47
- <RealMP4Videos />
48
- <br />
49
- <br />
50
- <br />
51
- <br />
52
- <LightningFastEditor />
53
- <br />
54
- <br />
55
- <br />
56
- <VideoAppsTitle />
57
- <VideoApps active="remotion" />
58
- <br />
59
- <br />
60
- <VideoAppsShowcase />
61
- <br />
62
- <br />
63
- <Demo />
64
- <br />
65
- <br />
66
- <br />
67
- <SectionTitle>Pricing</SectionTitle>
68
- <Pricing />
69
- <TrustedByBanner />
70
- <br />
71
- <EvaluateRemotionSection />
72
- <br />
73
- <br />
74
- <br />
75
- <CommunityStats />
76
- <br />
77
- <br />
78
- <br />
79
- <NewsletterButton />
80
- <br />
81
- <br />
82
- <br />
83
- </div>
84
- </div>
85
- </div>
86
- </ColorModeProvider>
87
- );
88
- };
@@ -1,108 +0,0 @@
1
- 'use client';
2
-
3
- import {getLength} from '@remotion/paths';
4
- import React, {useEffect} from 'react';
5
-
6
- const rx = 0.2;
7
- const ry = 0.45;
8
-
9
- function ellipseToPath(cx: number, cy: number): string {
10
- let output = 'M' + (cx - rx).toString() + ',' + cy.toString();
11
- output +=
12
- 'a' +
13
- rx.toString() +
14
- ',' +
15
- ry.toString() +
16
- ' 0 1,0 ' +
17
- (2 * rx).toString() +
18
- ',0';
19
- output +=
20
- 'a' +
21
- rx.toString() +
22
- ',' +
23
- ry.toString() +
24
- ' 0 1,0 ' +
25
- (-2 * rx).toString() +
26
- ',0';
27
- return output;
28
- }
29
-
30
- const strokeWidth = 0.035;
31
-
32
- export const BackgroundAnimation: React.FC = () => {
33
- const d = ellipseToPath(0.5, 0.5);
34
- const length = getLength(d);
35
-
36
- const css = `
37
- @keyframes bganimation {
38
- from {
39
- stroke-dashoffset: 0
40
- }
41
-
42
- to {
43
- stroke-dashoffset: ${length};
44
- }
45
- }
46
- `;
47
-
48
- useEffect(() => {
49
- const _style = document.createElement('style');
50
- _style.innerHTML = css;
51
- document.head.appendChild(_style);
52
- }, [css]);
53
-
54
- return (
55
- <div className=" w-full h-full left-[50%] ml-[-50%] min-w-0 lg:m-auto lg:relative lg:min-w-[700px] lg:max-w-[1200px] lg:ml-auto lg:left-auto pointer-events-none">
56
- <svg
57
- className="translate-y-[-30%] lg:translate-y-[-50%]"
58
- viewBox="0 0 1 1"
59
- style={{
60
- width: '100%',
61
- position: 'absolute',
62
- }}
63
- >
64
- <path
65
- d={d}
66
- fill="none"
67
- stroke="var(--ifm-color-primary)"
68
- strokeLinecap="round"
69
- className="stroke-[0.04] lg:stroke-[0.035]"
70
- style={{
71
- transformOrigin: 'center center',
72
- transform: `rotate(120deg)`,
73
- animation: `bganimation 20s linear infinite`,
74
- strokeDasharray: `${length * 0.2} ${length * 0.8}`,
75
- }}
76
- />
77
- <path
78
- d={d}
79
- fill="none"
80
- stroke="var(--ifm-color-primary)"
81
- strokeLinecap="round"
82
- strokeWidth={strokeWidth}
83
- className="stroke-[0.04] lg:stroke-[0.035]"
84
- style={{
85
- transformOrigin: 'center center',
86
- transform: `rotate(0deg)`,
87
- animation: `bganimation 20s linear infinite`,
88
- strokeDasharray: `${length * 0.2} ${length * 0.8}`,
89
- }}
90
- />
91
- <path
92
- d={d}
93
- fill="none"
94
- stroke="var(--ifm-color-primary)"
95
- strokeLinecap="round"
96
- strokeWidth={strokeWidth}
97
- className="stroke-[0.04] lg:stroke-[0.035]"
98
- style={{
99
- transformOrigin: 'center center',
100
- transform: `rotate(240deg)`,
101
- animation: `bganimation 20s linear infinite`,
102
- strokeDasharray: `${length * 0.2} ${length * 0.8}`,
103
- }}
104
- />
105
- </svg>
106
- </div>
107
- );
108
- };
@@ -1,57 +0,0 @@
1
- import {CreateVideoInternals} from 'create-video';
2
- import React from 'react';
3
-
4
- import {IconForTemplate} from './IconForTemplate';
5
- import {MoreTemplatesButton} from './MoreTemplatesButton';
6
- import {TemplateIcon} from './TemplateIcon';
7
-
8
- export const ChooseTemplate: React.FC = () => {
9
- return (
10
- <div
11
- style={{
12
- display: 'flex',
13
- flexDirection: 'column',
14
- }}
15
- >
16
- <div
17
- style={{
18
- position: 'relative',
19
- textAlign: 'center',
20
- }}
21
- >
22
- <div
23
- className="no-scroll-bar"
24
- style={{
25
- backgroundColor: 'var(--background)',
26
- display: 'inline-flex',
27
- flexDirection: 'row',
28
- justifyContent: 'space-around',
29
- boxShadow: '0 0 4px 0px var(--ifm-color-emphasis-200)',
30
- borderRadius: 50,
31
- alignItems: 'center',
32
- padding: 8,
33
- width: '100%',
34
- maxWidth: '550px',
35
- }}
36
- >
37
- {CreateVideoInternals.FEATURED_TEMPLATES.filter(
38
- (f) => f.featuredOnHomePage,
39
- ).map((template) => {
40
- return (
41
- <a
42
- key={template.cliId}
43
- className="text-inherit no-underline"
44
- href={`/templates/${template.cliId}`}
45
- >
46
- <TemplateIcon label={template.featuredOnHomePage!}>
47
- <IconForTemplate scale={0.7} template={template} />
48
- </TemplateIcon>
49
- </a>
50
- );
51
- })}
52
- <MoreTemplatesButton />
53
- </div>
54
- </div>
55
- </div>
56
- );
57
- };