mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add docs
This commit is contained in:
67
docs/src/components/HomepageFeatures/index.tsx
Normal file
67
docs/src/components/HomepageFeatures/index.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
type FeatureItem = {
|
||||
title: string;
|
||||
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||
description: JSX.Element;
|
||||
};
|
||||
|
||||
const FeatureList: FeatureItem[] = [
|
||||
{
|
||||
title: 'One-Line code Configuration',
|
||||
Svg: require('@site/static/img/one.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Quickly integrate LitLyx using just a single line of code, and start gathering critical insights instantly.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Easy Documentation',
|
||||
Svg: require('@site/static/img/doc.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Access simple, easy-to-follow documentation helping you get started and make the most out of the tool, quickly.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Plug Anywhere',
|
||||
Svg: require('@site/static/img/plug.svg').default,
|
||||
description: (
|
||||
<>
|
||||
More than 15+ JS/TS Framework supported. The vanilla JS Script can plug in any solution even WordPress or PHP.
|
||||
</>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
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">
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<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>
|
||||
);
|
||||
}
|
||||
11
docs/src/components/HomepageFeatures/styles.module.css
Normal file
11
docs/src/components/HomepageFeatures/styles.module.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureSvg {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
30
docs/src/css/custom.css
Normal file
30
docs/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: #2a66c8;
|
||||
--ifm-color-primary-dark: #2458a7;
|
||||
--ifm-color-primary-darker: #204a93;
|
||||
--ifm-color-primary-darkest: #1a3c70;
|
||||
--ifm-color-primary-light: #4a7cd0;
|
||||
--ifm-color-primary-lighter: #6290d4;
|
||||
--ifm-color-primary-lightest: #7ca3db;
|
||||
--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: #409cff;
|
||||
--ifm-color-primary-dark: #368bdf;
|
||||
--ifm-color-primary-darker: #3179c8;
|
||||
--ifm-color-primary-darkest: #2862a2;
|
||||
--ifm-color-primary-light: #53a9ff;
|
||||
--ifm-color-primary-lighter: #6cb4ff;
|
||||
--ifm-color-primary-lightest: #84c0ff;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
18
docs/src/pages/index.module.css
Normal file
18
docs/src/pages/index.module.css
Normal file
@@ -0,0 +1,18 @@
|
||||
.hero {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 20rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero img {
|
||||
max-width: 100px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
35
docs/src/pages/index.tsx
Normal file
35
docs/src/pages/index.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
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 Heading from '@theme/Heading';
|
||||
|
||||
import styles from './index.module.css';
|
||||
|
||||
|
||||
function MainHeader() {
|
||||
return (
|
||||
<header className={clsx('hero', styles.hero)}>
|
||||
<img src="/img/logo.png" alt="Logo" />
|
||||
<h1 className="hero-title">Welcome to LitLyx Docs</h1>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="/intro">
|
||||
Read Docs 🔥 | 3 min read ⏱️
|
||||
</Link>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home(): JSX.Element {
|
||||
return (
|
||||
<Layout
|
||||
title={`LitLyx`}
|
||||
description="LitLyx offers ultra-fast, real-time analytics and custom events with just one line of code. It seamlessly integrates with over 15 JavaScript/TypeScript frameworks. Designed for developers, it's also accessible to everyone from designers to investors, enhancing your projects with valuable insights.
|
||||
">
|
||||
<MainHeader />
|
||||
<HomepageFeatures />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user