Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frameworks section to quick start #279

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 1
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import UppyCdnExample from '/src/components/UppyCdnExample';
import { QuickStartLinks } from '../src/components/QuickStartLinks/QuickStartLinks.tsx';
import { QuickStartLinks, Frameworks } from '../src/components/QuickStartLinks/QuickStartLinks.tsx';

# Quick start

Expand Down Expand Up @@ -56,3 +56,7 @@ experience or a
},
]}
/>

## Framework integrations

<Frameworks />
59 changes: 59 additions & 0 deletions src/components/QuickStartLinks/QuickStartLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import React from 'react';
import Heading from '@theme/Heading';
import Link from '@docusaurus/Link';

import IconNextjs from '../../../static/img/nextjs.svg';
import IconReact from '../../../static/img/react.svg';
import IconVue from '../../../static/img/vue.svg';
import IconSvelte from '../../../static/img/svelte.svg';
import IconAngular from '../../../static/img/angular.svg';

import styles from './styles.module.css';

type Props = {
Expand All @@ -27,3 +33,56 @@ export const QuickStartLinks = (props: Props) => {
</section>
);
};

export const Frameworks = () => {
return (
<section className={styles.section}>
<Link to="/docs/next.js">
<div data-framework="react" className={styles.item}>
<IconNextjs />
<div>
<Heading as="h2">Next.js</Heading>
<p>For App Router or Pages Router</p>
</div>
</div>
</Link>

<Link to="/docs/react">
<div data-framework="react" className={styles.item}>
<IconReact />
<div>
<Heading as="h2">React</Heading>
<p>For Single Page Apps</p>
</div>
</div>
</Link>

<Link to="/docs/vue">
<div data-framework="vue" className={styles.item}>
<IconVue />
<div>
<Heading as="h2">Vue</Heading>
</div>
</div>
</Link>

<Link to="/docs/svelte">
<div data-framework="svelte" className={styles.item}>
<IconSvelte />
<div>
<Heading as="h2">Svelte</Heading>
</div>
</div>
</Link>

<Link to="/docs/angular">
<div data-framework="angular" className={styles.item}>
<IconAngular />
<div>
<Heading as="h2">Angular</Heading>
</div>
</div>
</Link>
</section>
);
};
28 changes: 26 additions & 2 deletions src/components/QuickStartLinks/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ section a:hover {
}

.item {
color: black;
position: relative;
padding: 1em;
border: 1px solid var(--ifm-color-emphasis-300);
Expand All @@ -23,18 +24,41 @@ section a:hover {
var(--ifm-transition-timing-default);
}

.item svg {
width: 2.5em;
height: 2.5em;
}

.item[data-framework] {
display: flex;
align-items: center;
gap: 1em;
}

.item[data-framework='react'] svg {
color: #61dafb;
}
.item[data-framework='vue'] svg {
color: #4fc08d;
}
.item[data-framework='svelte'] svg {
color: #ff3e00;
}
.item[data-framework='angular'] svg {
color: #dd0031;
}

.item h2 {
font-size: 1rem;
font-family: var(--ifm-font-family-base);
margin-bottom: 0.5rem;
margin-bottom: 0;
}

.item:hover {
border-color: var(--ifm-color-primary);
}

.item p {
color: var(--ifm-font-color-base);
margin: 0;
color: gray;
}
1 change: 1 addition & 0 deletions static/img/nextjs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading