Skip to content

Commit 8c18a85

Browse files
committed
awesome
1 parent 522ad19 commit 8c18a85

File tree

6 files changed

+35
-226
lines changed

6 files changed

+35
-226
lines changed

packages/promo-pages/src/components/homepage/CommunityStats.module.css

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/promo-pages/src/components/homepage/CommunityStats.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import styles from './CommunityStats.module.css';
32
import {
43
Contributors,
54
DiscordMembers,
@@ -14,18 +13,22 @@ const SectionLink: React.FC<{
1413
readonly href: string;
1514
readonly children: React.ReactNode;
1615
}> = ({href, children}) => (
17-
<a target="_blank" href={href} className={styles.statItemLink}>
16+
<a
17+
target="_blank"
18+
href={href}
19+
className={'no-underline text-inherit contents'}
20+
>
1821
{children}
1922
</a>
2023
);
2124

2225
const CommunityStats: React.FC = () => (
23-
<div className={styles.container}>
26+
<div className={'m-auto max-w-[700px] text-center'}>
2427
<SectionTitle>Never build alone</SectionTitle>
2528
<div className={'font-brand text-center mb-10'}>
2629
Join a thriving community of developers.
2730
</div>
28-
<div className={styles.statsGrid}>
31+
<div className={'flex flex-wrap justify-between gap-4 w-full items-center'}>
2932
<SectionLink href="https://www.npmjs.com/package/remotion">
3033
<InstallsPerMonth />
3134
</SectionLink>

packages/promo-pages/src/components/homepage/CommunityStatsItems.tsx

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import styles from './CommunityStats.module.css';
2+
import {cn} from '../../cn';
33

44
// StatItemContent component
55
const StatItemContent: React.FC<{
@@ -39,12 +39,25 @@ const StatItemContent: React.FC<{
3939
</div>
4040
);
4141

42-
export const InstallsPerMonth: React.FC = () => {
42+
const Pill: React.FC<{
43+
readonly children: React.ReactNode;
44+
readonly className?: string;
45+
}> = ({children, className}) => {
4346
return (
4447
<div
45-
className={styles.statItem}
46-
style={{width: '30%', flexDirection: 'column'}}
48+
className={cn(
49+
className,
50+
'card leading-none flex flex-wrap justify-center items-center min-w-[200px] min-h-[80px] max-h-[110px] flex-1 p-0',
51+
)}
4752
>
53+
{children}
54+
</div>
55+
);
56+
};
57+
58+
export const InstallsPerMonth: React.FC = () => {
59+
return (
60+
<Pill className={'w-[30%] flex-col'}>
4861
<div
4962
style={{
5063
display: 'flex',
@@ -82,16 +95,13 @@ export const InstallsPerMonth: React.FC = () => {
8295
fontSize="1.0rem"
8396
fontWeight="bold"
8497
/>
85-
</div>
98+
</Pill>
8699
);
87100
};
88101

89102
export const PagesOfDocs: React.FC = () => {
90103
return (
91-
<div
92-
className={styles.statItem}
93-
style={{width: '30%', flexDirection: 'column'}}
94-
>
104+
<Pill className="flex-col">
95105
<div style={{display: 'flex', alignItems: 'center'}}>
96106
<StatItemContent
97107
content={
@@ -124,19 +134,12 @@ export const PagesOfDocs: React.FC = () => {
124134
fontSize="1.0rem"
125135
fontWeight="bold"
126136
/>
127-
</div>
137+
</Pill>
128138
);
129139
};
130140

131141
export const TemplatesAndExamples: React.FC = () => (
132-
<div
133-
className={styles.statItem}
134-
style={{
135-
width: '30%',
136-
display: 'flex',
137-
alignItems: 'center',
138-
}}
139-
>
142+
<Pill className="w-[30%] flex items-center">
140143
<StatItemContent
141144
content="35"
142145
width="60px"
@@ -149,15 +152,12 @@ export const TemplatesAndExamples: React.FC = () => (
149152
fontSize="1.35rem"
150153
fontWeight="bold"
151154
/>
152-
</div>
155+
</Pill>
153156
);
154157

155158
export const GitHubStars: React.FC = () => {
156159
return (
157-
<div
158-
className={styles.statItem}
159-
style={{width: '30%', flexDirection: 'column'}}
160-
>
160+
<Pill className="w-[30%] flex-col">
161161
<div style={{display: 'flex', alignItems: 'center'}}>
162162
<StatItemContent
163163
content={
@@ -189,13 +189,13 @@ export const GitHubStars: React.FC = () => {
189189
fontSize="1.0rem"
190190
fontWeight="bold"
191191
/>
192-
</div>
192+
</Pill>
193193
);
194194
};
195195

196196
export const DiscordMembers: React.FC = () => {
197197
return (
198-
<div className={styles.statItem} style={{width: '30%'}}>
198+
<Pill className={'w-[30%]'}>
199199
<div
200200
style={{
201201
width: '80%',
@@ -250,21 +250,13 @@ export const DiscordMembers: React.FC = () => {
250250
/>
251251
</div>
252252
</div>
253-
</div>
253+
</Pill>
254254
);
255255
};
256256

257257
export const Contributors: React.FC = () => {
258258
return (
259-
<div
260-
className={styles.statItem}
261-
style={{
262-
width: '30%',
263-
display: 'flex',
264-
alignItems: 'center',
265-
justifyContent: 'center',
266-
}}
267-
>
259+
<Pill className="w-[30%]">
268260
<div style={{display: 'flex', justifyContent: 'center'}}>
269261
<div style={{display: 'flex', justifyContent: 'center'}}>
270262
<StatItemContent
@@ -307,6 +299,6 @@ export const Contributors: React.FC = () => {
307299
/>
308300
</div>
309301
</div>
310-
</div>
302+
</Pill>
311303
);
312304
};

packages/promo-pages/src/components/homepage/Demo/done.module.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/promo-pages/src/components/homepage/EvaluateRemotionSection.module.css

Lines changed: 0 additions & 113 deletions
This file was deleted.

packages/promo-pages/src/components/homepage/writeinreact.module.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)