Update CI and add website
This commit is contained in:
72
apps/website/src/components/HomepageFeatures/index.tsx
Normal file
72
apps/website/src/components/HomepageFeatures/index.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import React from "react";
|
||||
import clsx from "clsx";
|
||||
import styles from "./styles.module.css";
|
||||
|
||||
type FeatureItem = {
|
||||
title: string;
|
||||
Svg: React.ComponentType<React.ComponentProps<"svg">>;
|
||||
description: JSX.Element;
|
||||
};
|
||||
|
||||
const FeatureList: FeatureItem[] = [
|
||||
{
|
||||
title: "Data Security",
|
||||
Svg: require("@site/static/img/safety-icon.svg").default,
|
||||
description: (
|
||||
<>
|
||||
ffmpeg.wasm runs only inside your browser, data security is gaurantee as
|
||||
no data is sent to remote server.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Powered by WebAssembly",
|
||||
Svg: require("@site/static/img/wasm-logo.svg").default,
|
||||
description: (
|
||||
<>
|
||||
ffmpeg.wasm transpiles <a href="https://ffmpeg.org/">ffmpeg</a> source
|
||||
code to WebAssembly code using
|
||||
<a href="https://emscripten.org/"> Emscripten</a> to achieve optimal
|
||||
performance.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Made with TypeScript",
|
||||
Svg: require("@site/static/img/ts-logo-round-512.svg").default,
|
||||
description: (
|
||||
<>
|
||||
ffmpeg.wasm is written in TypeScript to provide great developer
|
||||
experience (DX).
|
||||
</>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
function Feature({ title, Svg, description }: FeatureItem) {
|
||||
return (
|
||||
<div className={clsx("col col--4")}>
|
||||
<div className="text--center">
|
||||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures(): JSX.Element {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{FeatureList.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureSvg {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
30
apps/website/src/css/custom.css
Normal file
30
apps/website/src/css/custom.css
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #654ff0;
|
||||
--ifm-color-primary-dark: #4b32ed;
|
||||
--ifm-color-primary-darker: #3e23ec;
|
||||
--ifm-color-primary-darkest: #2b12ce;
|
||||
--ifm-color-primary-light: #7f6cf3;
|
||||
--ifm-color-primary-lighter: #8c7bf4;
|
||||
--ifm-color-primary-lightest: #b2a7f8;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #cac2ff;
|
||||
--ifm-color-primary-dark: #a395ff;
|
||||
--ifm-color-primary-darker: #8f7fff;
|
||||
--ifm-color-primary-darkest: #553bff;
|
||||
--ifm-color-primary-light: #f1efff;
|
||||
--ifm-color-primary-lighter: #ffffff;
|
||||
--ifm-color-primary-lightest: #ffffff;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
23
apps/website/src/pages/index.module.css
Normal file
23
apps/website/src/pages/index.module.css
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
43
apps/website/src/pages/index.tsx
Normal file
43
apps/website/src/pages/index.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import React from "react";
|
||||
import clsx from "clsx";
|
||||
import Link from "@docusaurus/Link";
|
||||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||
import Layout from "@theme/Layout";
|
||||
import HomepageFeatures from "@site/src/components/HomepageFeatures";
|
||||
|
||||
import styles from "./index.module.css";
|
||||
|
||||
function HomepageHeader() {
|
||||
const { siteConfig } = useDocusaurusContext();
|
||||
return (
|
||||
<header className={clsx("hero hero--primary", styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<h1 className="hero__title">{siteConfig.title}</h1>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="/docs/intro"
|
||||
>
|
||||
Try it Now!
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home(): JSX.Element {
|
||||
const { siteConfig } = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={`Hello from ${siteConfig.title}`}
|
||||
description="Description will go into a meta tag in <head />"
|
||||
>
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
7
apps/website/src/pages/markdown-page.md
Normal file
7
apps/website/src/pages/markdown-page.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Markdown page example
|
||||
---
|
||||
|
||||
# Markdown page example
|
||||
|
||||
You don't need React to write simple standalone pages.
|
||||
Reference in New Issue
Block a user