This commit is contained in:
Luke committed 2023-06-04 15:15:21 +02:00
1 parent 3cebaf7fa5
commit b5eba8423f
229 files changed
+6238 -10690

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { IconCoffee } from '@tabler/icons-react';
const DonateLink: React.FC<{ image: string; name: string; kofiName: string }> = ({ image, name, kofiName }) => {
return (
<div className="flex w-32 flex-col items-center justify-center gap-2">
<p>{name}</p>
<img src={image} alt={`${name}-image`} className="rounded-md bg-neutral-100 shadow-md dark:bg-neutral-900" />
<a href={`https://ko-fi.com/${kofiName}`} target="_blank" className="w-full">
<button className="flex w-full items-center justify-center gap-2 rounded-md bg-sky-500/20 p-2 text-sky-500 hover:bg-sky-500/30">
<IconCoffee />
Support
</button>
</a>
</div>
);
};
export default DonateLink;
+9
View File
@@ -0,0 +1,9 @@
import { DocSearch } from '@docsearch/react';
import '@docsearch/css';
const Search: React.FC = () => {
return <DocSearch appId="8XXXVNJ7UW" apiKey="3680aeb79049744c6629dd0abd2f5dfe" indexName="overextended" />;
};
export default Search;
+65
View File
@@ -0,0 +1,65 @@
import React from 'react';
import { IconBrandGithub, IconTag, IconFileText, IconDownload, IconBrandNpm } from '@tabler/icons-react';
interface Props {
icon?: React.ReactNode;
children?: React.ReactNode;
side?: 'left' | 'right';
link?: string;
}
const Button: React.FC = ({ side = 'left', children, icon, link }: Props) => {
return (
<div className="h-fit w-fit">
<a href={link}>
<div className="flex w-26 items-center justify-center gap-1.5 rounded-sm border border-black p-1.5 text-black hover:bg-black hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black mt-2">
{side === 'left' && <div>{icon}</div>}
{children}
{side === 'right' && <div>{icon}</div>}
</div>
</a>
</div>
);
};
export default Button;
export function GhButton(props: Props) {
return (
<Button icon={<IconBrandGithub />} side={props.side} link={props.link}>
GitHub
</Button>
);
}
export function DocButton(props: Props) {
return (
<Button icon={<IconFileText />} side={props.side} link={props.link}>
Documentation
</Button>
);
}
export function DownloadButton(props: Props) {
return (
<Button icon={<IconDownload />} side={props.side} link={props.link}>
Download
</Button>
);
}
export function ReleaseButton(props: Props) {
return (
<Button icon={<IconTag />} side={props.side} link={props.link}>
Releases
</Button>
);
}
export function NpmButton(props: Props) {
return (
<Button icon={<IconBrandNpm />} side={props.side} link={props.link}>
Package
</Button>
);
}
+20
View File
@@ -0,0 +1,20 @@
import React from 'react';
import { GhButton, DocButton, ReleaseButton } from './button';
interface Props {
children?: React.ReactNode;
repo: string;
docs?: string;
}
const ResourceLinks = ({ repo, docs }: Props) => {
return (
<div className="flex flex-wrap gap-1">
<GhButton link={repo} />
<ReleaseButton link={`${repo}/releases`} />
{docs && <DocButton link={docs} />}
</div>
);
};
export default ResourceLinks;