Skip to content

Commit d0624c0

Browse files
ayan4m1colinurbs
authored andcommitted
feat: merge homepage down to a single file
1 parent 856f0ba commit d0624c0

File tree

4 files changed

+108
-121
lines changed

4 files changed

+108
-121
lines changed

src/components/HomepageFeatures/index.tsx

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

src/components/HomepageFeatures/styles.module.css

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

src/pages/index.module.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,15 @@
2121
align-items: center;
2222
justify-content: center;
2323
}
24+
25+
.features {
26+
display: flex;
27+
align-items: center;
28+
padding: 2rem 0;
29+
width: 100%;
30+
}
31+
32+
.featureSvg {
33+
height: 200px;
34+
width: 200px;
35+
}

src/pages/index.tsx

Lines changed: 96 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,119 @@ import Link from '@docusaurus/Link';
44
import useBaseUrl from '@docusaurus/useBaseUrl';
55
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
66
import Layout from '@theme/Layout';
7-
import HomepageFeatures from '@site/src/components/HomepageFeatures';
87
import Heading from '@theme/Heading';
8+
import {
9+
faCubes,
10+
faExcavator,
11+
faRabbitRunning
12+
} from '@fortawesome/pro-solid-svg-icons';
13+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
14+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
915

1016
import styles from './index.module.css';
1117

12-
function HomepageHeader() {
13-
const { siteConfig } = useDocusaurusContext();
18+
type FeatureItem = {
19+
title: string;
20+
icon: IconProp;
21+
description: ReactNode;
22+
};
23+
24+
const FeatureList: FeatureItem[] = [
25+
{
26+
title: 'Comprehensive',
27+
icon: faCubes,
28+
description: (
29+
<>
30+
FP-Studio works with both FramePack HY and F1 models, allowing for
31+
forwards and backwards video generation. It also provides a bevy of
32+
video post-processing tools, including an upscaler.
33+
</>
34+
)
35+
},
36+
{
37+
title: 'Accelerated',
38+
icon: faRabbitRunning,
39+
description: (
40+
<>
41+
We support Sage Attention and MagCache for the fastest possible
42+
inference while preserving output quality.
43+
</>
44+
)
45+
},
46+
{
47+
title: 'Rapidly Evolving',
48+
icon: faExcavator,
49+
description: (
50+
<>
51+
With a passionate community that is contributing code every day, expect
52+
to see us evolve into a fully featured AI video generation suite over
53+
time.
54+
</>
55+
)
56+
}
57+
];
58+
59+
function Feature({ title, icon, description }: FeatureItem) {
1460
return (
15-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
16-
<div className="container">
17-
<Heading as="h1" className="hero__title">
18-
{siteConfig.title}
19-
</Heading>
20-
<p className="hero__subtitle">Your AI Video Editor</p>
21-
<img
22-
height={300}
23-
src={useBaseUrl('/img/astronaut.png')}
24-
style={{ marginBottom: 10 }}
25-
/>
26-
<div className={styles.buttons}>
27-
<Link
28-
className="button button--secondary button--lg"
29-
style={{ marginRight: 8 }}
30-
to="/docs/get_started"
31-
>
32-
Get Started
33-
</Link>
34-
<Link
35-
className="button button--secondary button--lg"
36-
to="/docs/user_guide"
37-
>
38-
User Guide
39-
</Link>
40-
</div>
61+
<div className={clsx('col col--4')}>
62+
<div className="text--center">
63+
{/* <Svg className={styles.featureSvg} role="img" /> */}
64+
<FontAwesomeIcon icon={icon} size="4x" style={{ margin: 12 }} />
4165
</div>
42-
</header>
66+
<div className="text--center padding-horiz--md">
67+
<Heading as="h3">{title}</Heading>
68+
<p>{description}</p>
69+
</div>
70+
</div>
4371
);
4472
}
4573

4674
export default function Home(): ReactNode {
4775
const { siteConfig } = useDocusaurusContext();
76+
4877
return (
4978
<Layout
5079
description="Welcome to FP-Studio's Documentation!"
5180
title={`${siteConfig.title} Documentation`}
5281
>
53-
<HomepageHeader />
82+
<header className={clsx('hero hero--primary', styles.heroBanner)}>
83+
<div className="container">
84+
<Heading as="h1" className="hero__title">
85+
{siteConfig.title}
86+
</Heading>
87+
<p className="hero__subtitle">Your AI Video Editor</p>
88+
<img
89+
height={300}
90+
src={useBaseUrl('/img/astronaut.png')}
91+
style={{ marginBottom: 10 }}
92+
/>
93+
<div className={styles.buttons}>
94+
<Link
95+
className="button button--secondary button--lg"
96+
style={{ marginRight: 8 }}
97+
to="/docs/get_started"
98+
>
99+
Get Started
100+
</Link>
101+
<Link
102+
className="button button--secondary button--lg"
103+
to="/docs/user_guide"
104+
>
105+
User Guide
106+
</Link>
107+
</div>
108+
</div>
109+
</header>
54110
<main>
55-
<HomepageFeatures />
111+
<section className={styles.features}>
112+
<div className="container">
113+
<div className="row">
114+
{FeatureList.map((props, idx) => (
115+
<Feature key={idx} {...props} />
116+
))}
117+
</div>
118+
</div>
119+
</section>
56120
</main>
57121
</Layout>
58122
);

0 commit comments

Comments
 (0)