Skip to content

Commit 93a96d4

Browse files
committed
feat: add docs
introduces docs for spark !
1 parent 309d3e6 commit 93a96d4

38 files changed

+5598
-1346
lines changed

apps/discord-bot/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
/* Paths */
1313
"outDir": "./dist",
1414
"rootDir": "./src",
15-
"paths": {
16-
"lib/*": ["./lib/*", "./lib"],
17-
},
1815

1916
/* The "No" Corner */
2017
"noImplicitAny": false,

apps/docs/.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": [
3+
"plugin:@next/next/recommended",
4+
"custom"
5+
],
6+
"env": {
7+
"browser": true
8+
}
9+
}

apps/docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/public/*.st
2+
/public/*.toml
3+
/public/schema.json
4+
/public/feed.xml
5+

apps/docs/LICENSE

Lines changed: 373 additions & 0 deletions
Large diffs are not rendered by default.

apps/docs/components/Container.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { ReactNode } from 'react';
2+
3+
type Props = {
4+
children?: ReactNode;
5+
};
6+
7+
export const Container = ({ children }: Props) => <div className="mx-auto max-w-7xl sm:px-6 lg:px-8">{children}</div>;

apps/docs/components/Feature.tsx

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import Link from 'next/link';
2+
import type { Feature as Feat } from '../content/features';
3+
4+
type FeatureProps = {
5+
feature: Omit<Feat, 'page'>;
6+
detailed?: boolean;
7+
};
8+
9+
const DetailedFeatureInner = (props: { feature: FeatureProps['feature'] }) => {
10+
const { Icon, name, description } = props.feature;
11+
return (
12+
<>
13+
<div className="inline-flex items-center space-x-3">
14+
<div className="flex items-center justify-center bg-black rounded-full bg-opacity-5 w-9 h-9 icon-circle">
15+
<Icon
16+
className="h-8 w-8 dark:text-white flex-shrink-0 rounded-full p-1.5 text-black block dark:stroke-[url(#pink-gradient)]"
17+
aria-hidden="true"
18+
/>
19+
</div>
20+
<h3 className="m-0 text-lg font-semibold leading-6 tracking-tight text-gray-900 dark:text-white">
21+
{name}
22+
</h3>
23+
</div>
24+
<div>
25+
<p className="mt-2 text-base font-medium leading-7 text-gray-500 dark:text-gray-400">
26+
{description}
27+
</p>
28+
</div>
29+
<style jsx global>{`
30+
html.dark .icon-circle {
31+
background: linear-gradient(180deg, rgba(50, 134, 241, 0.2) 0%, rgba(195, 58, 195, 0.2) 100%);
32+
}
33+
`}</style>
34+
</>
35+
);
36+
};
37+
38+
const featureWrapperClasses = 'relative block overflow-hidden p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 no-underline text-black dark:text-white';
39+
40+
export const DetailedFeatureLink = (props: {
41+
href: string;
42+
feature: FeatureProps['feature'];
43+
}) => (
44+
<Link href={props.href}>
45+
<a className={featureWrapperClasses}>
46+
<DetailedFeatureInner feature={props.feature}></DetailedFeatureInner>
47+
</a>
48+
</Link>
49+
);
50+
51+
export default function Feature(props: FeatureProps) {
52+
const { feature, detailed = false } = props;
53+
const { Icon, name } = feature;
54+
55+
if (detailed) {
56+
return (
57+
<div className={featureWrapperClasses}>
58+
<DetailedFeatureInner feature={feature} />
59+
</div>
60+
);
61+
}
62+
63+
return (
64+
<div className="flex items-center space-x-4">
65+
<div>
66+
<Icon
67+
className="block w-8 h-8 text-black dark:text-white"
68+
style={{ height: 24, width: 24 }}
69+
aria-hidden="true"
70+
/>
71+
</div>
72+
<div>
73+
<div className="my-0 font-medium dark:text-white">{name}</div>
74+
</div>
75+
</div>
76+
);
77+
}

apps/docs/components/Features.tsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import React from 'react';
2+
import { DOCS_FEATURES, HOME_FEATURES } from '../content/features';
3+
import Feature from './Feature';
4+
5+
export function DetailedFeaturesGrid({
6+
children,
7+
}: {
8+
children?: React.ReactNode;
9+
}) {
10+
return (
11+
<div className="grid grid-cols-1 mt-12 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-16 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-12">
12+
{children}
13+
</div>
14+
);
15+
}
16+
17+
export function HomeFeatures() {
18+
return (
19+
<DetailedFeaturesGrid>
20+
{HOME_FEATURES.map((feature) => (
21+
<Feature
22+
key={feature.name.split(' ').join('-')}
23+
feature={feature}
24+
detailed
25+
/>
26+
))}
27+
</DetailedFeaturesGrid>
28+
);
29+
}
30+
31+
export function DocsFeatures({ detailed = true }: { detailed?: boolean; }) {
32+
return (
33+
<div className="grid grid-cols-2 gap-6 my-12 sm:grid-cols-3 ">
34+
{DOCS_FEATURES.map((feature) => (
35+
<Feature
36+
key={feature.name.split(' ').join('-')}
37+
feature={feature}
38+
detailed={detailed}
39+
/>
40+
))}
41+
</div>
42+
);
43+
}

apps/docs/components/Footer.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import SparkLogo from './logos/SparkLogo';
2+
3+
export function Footer() {
4+
return (
5+
<footer className="" aria-labelledby="footer-heading">
6+
<h2 id="footer-heading" className="sr-only">
7+
Footer
8+
</h2>
9+
<div className="md:flex md:items-center md:justify-between">
10+
<p className="text-xs text-gray-500 ">
11+
<SparkLogo height={48} />
12+
&copy; {new Date().getFullYear()} Spark. All rights reserved.
13+
</p>
14+
</div>
15+
</footer>
16+
);
17+
}

apps/docs/components/Icons.tsx

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import React, { ComponentProps } from 'react';
2+
3+
export type IconType = (props: ComponentProps<'svg'>) => JSX.Element;
4+
5+
export const TailwindIcon: IconType = (props) => (
6+
<svg
7+
width="30"
8+
height="18"
9+
viewBox="0 0 30 18"
10+
fill="currentColor"
11+
aria-hidden="true"
12+
{...props}
13+
>
14+
<path
15+
fillRule="evenodd"
16+
clipRule="evenodd"
17+
d="M15 0c-4 0-6.5 2-7.5 6 1.5-2 3.25-2.75 5.25-2.25 1.141.285 1.957 1.113 2.86 2.03C17.08 7.271 18.782 9 22.5 9c4 0 6.5-2 7.5-6-1.5 2-3.25 2.75-5.25 2.25-1.141-.285-1.957-1.113-2.86-2.03C20.42 1.728 18.718 0 15 0ZM7.5 9C3.5 9 1 11 0 15c1.5-2 3.25-2.75 5.25-2.25 1.141.285 1.957 1.113 2.86 2.03C9.58 16.271 11.282 18 15 18c4 0 6.5-2 7.5-6-1.5 2-3.25 2.75-5.25 2.25-1.141-.285-1.957-1.113-2.86-2.03C12.92 10.729 11.218 9 7.5 9Z"
18+
></path>
19+
</svg>
20+
);
21+
22+
export const GitHubIcon: IconType = ({ height = 28, ...props }) => (
23+
<svg
24+
height={height}
25+
viewBox="2 2 20 20"
26+
fill="currentColor"
27+
aria-hidden="true"
28+
>
29+
<path
30+
fillRule="evenodd"
31+
clipRule="evenodd"
32+
fill="currentColor"
33+
d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"
34+
/>
35+
</svg>
36+
);
37+
38+
export const DockerIcon: IconType = ({ height = 28, ...props }) => (
39+
<svg viewBox="0 0 122.88 88.17" {...props}>
40+
<g>
41+
<path
42+
fill="transparent"
43+
strokeWidth={6}
44+
d="M121.68,33.34c-0.34-0.28-3.42-2.62-10.03-2.62c-1.71,0-3.48,0.17-5.19,0.46c-1.25-8.72-8.49-12.94-8.78-13.16 l-1.77-1.03l-1.14,1.65c-1.42,2.22-2.51,4.73-3.13,7.29c-1.2,4.96-0.46,9.63,2.05,13.62c-3.02,1.71-7.92,2.11-8.95,2.17l-80.93,0 c-2.11,0-3.82,1.71-3.82,3.82c-0.11,7.07,1.08,14.13,3.53,20.8c2.79,7.29,6.95,12.71,12.31,16.01c6.04,3.7,15.9,5.81,27.01,5.81 c5.01,0,10.03-0.46,14.99-1.37c6.9-1.25,13.51-3.65,19.6-7.12c5.02-2.91,9.52-6.61,13.34-10.94c6.44-7.24,10.26-15.33,13.05-22.51 c0.4,0,0.74,0,1.14,0c7.01,0,11.34-2.79,13.73-5.19c1.6-1.48,2.79-3.31,3.65-5.36l0.51-1.48L121.68,33.34L121.68,33.34z M71.59,39.38h10.83c0.51,0,0.97-0.4,0.97-0.97v-9.69c0-0.51-0.4-0.97-0.97-0.97l0,0l-10.83,0c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69 C70.68,38.98,71.08,39.38,71.59,39.38L71.59,39.38z M56.49,11.63h10.83c0.51,0,0.97-0.4,0.97-0.97V0.97c0-0.51-0.46-0.97-0.97-0.97 L56.49,0c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69C55.52,11.17,55.97,11.63,56.49,11.63L56.49,11.63z M56.49,25.53h10.83 c0.51,0,0.97-0.46,0.97-0.97v-9.69c0-0.51-0.46-0.97-0.97-0.97H56.49c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69 C55.52,25.08,55.97,25.53,56.49,25.53L56.49,25.53z M41.5,25.53h10.83c0.51,0,0.97-0.46,0.97-0.97v-9.69c0-0.51-0.4-0.97-0.97-0.97 l0,0H41.5c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69C40.53,25.08,40.93,25.53,41.5,25.53L41.5,25.53z M26.28,25.53h10.83 c0.51,0,0.97-0.46,0.97-0.97v-9.69c0-0.51-0.4-0.97-0.97-0.97l0,0H26.28c-0.51,0-0.97,0.4-0.97,0.97v9.69 C25.37,25.08,25.77,25.53,26.28,25.53L26.28,25.53z M56.49,39.38h10.83c0.51,0,0.97-0.4,0.97-0.97v-9.69c0-0.51-0.4-0.97-0.97-0.97 l0,0l-10.83,0c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69C55.52,38.98,55.97,39.38,56.49,39.38L56.49,39.38L56.49,39.38z M41.5,39.38 h10.83c0.51,0,0.97-0.4,0.97-0.97l0,0v-9.69c0-0.51-0.4-0.97-0.97-0.97l0,0l-10.83,0c-0.51,0-0.97,0.4-0.97,0.97l0,0v9.69 C40.53,38.98,40.93,39.38,41.5,39.38L41.5,39.38L41.5,39.38z M26.28,39.38h10.83c0.51,0,0.97-0.4,0.97-0.97l0,0v-9.69 c0-0.51-0.4-0.97-0.97-0.97l0,0l-10.83,0c-0.51,0-0.97,0.4-0.97,0.97v9.69C25.37,38.98,25.77,39.38,26.28,39.38L26.28,39.38z M11.35,39.38h10.83c0.51,0,0.97-0.4,0.97-0.97l0,0v-9.69c0-0.51-0.4-0.97-0.97-0.97l0,0l-10.83,0c-0.51,0-0.97,0.4-0.97,0.97l0,0 v9.69C10.44,38.98,10.84,39.38,11.35,39.38L11.35,39.38L11.35,39.38z"
45+
/>
46+
</g>
47+
</svg>
48+
);
49+
50+
export const RectangleGroupIcon: IconType = (props) => (
51+
<svg
52+
xmlns="http://www.w3.org/2000/svg"
53+
fill="none"
54+
viewBox="0 0 24 24"
55+
strokeWidth={1.5}
56+
stroke="currentColor"
57+
{...props}
58+
>
59+
<path
60+
strokeLinecap="round"
61+
strokeLinejoin="round"
62+
d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z"
63+
/>
64+
</svg>
65+
);
66+
67+
export const FaceSmileIcon: IconType = (props) => (
68+
<svg
69+
xmlns="http://www.w3.org/2000/svg"
70+
fill="none"
71+
viewBox="0 0 24 24"
72+
strokeWidth={1.5}
73+
stroke="currentColor"
74+
{...props}
75+
>
76+
<path
77+
strokeLinecap="round"
78+
strokeLinejoin="round"
79+
d="M15.182 15.182a4.5 4.5 0 01-6.364 0M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z"
80+
/>
81+
</svg>
82+
);
83+
84+
export const RectangleStackIcon: IconType = (props) => (
85+
<svg
86+
xmlns="http://www.w3.org/2000/svg"
87+
fill="none"
88+
viewBox="0 0 24 24"
89+
strokeWidth={1.5}
90+
stroke="currentColor"
91+
{...props}
92+
>
93+
<path
94+
strokeLinecap="round"
95+
strokeLinejoin="round"
96+
d="M6 6.878V6a2.25 2.25 0 012.25-2.25h7.5A2.25 2.25 0 0118 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 004.5 9v.878m13.5-3A2.25 2.25 0 0119.5 9v.878m0 0a2.246 2.246 0 00-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0121 12v6a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 18v-6c0-.98.626-1.813 1.5-2.122"
97+
/>
98+
</svg>
99+
);

0 commit comments

Comments
 (0)