Skip to content

Commit

Permalink
initial website, update keywords for npm
Browse files Browse the repository at this point in the history
  • Loading branch information
brownrout committed Jan 9, 2024
1 parent 4fdc9c9 commit 58cd1ec
Show file tree
Hide file tree
Showing 29 changed files with 3,261 additions and 7 deletions.
3 changes: 3 additions & 0 deletions apps/www/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
35 changes: 35 additions & 0 deletions apps/www/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
32 changes: 32 additions & 0 deletions apps/www/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
pnpm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
67 changes: 67 additions & 0 deletions apps/www/components/code/code.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.root {
border-radius: 12px;
padding: 16px;
backdrop-filter: blur(10px);
border: 1px solid var(--gray6);
position: relative;
line-height: 16px;
background: var(--lowContrast);
white-space: pre-wrap;
box-shadow: rgb(0 0 0 / 10%) 0px 5px 30px -5px;

@media (prefers-color-scheme: dark) {
background: var(--grayA2);
}

button {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: var(--grayA3);
border-radius: 8px;
position: absolute;
top: 12px;
right: 12px;
color: var(--gray11);
cursor: copy;
transition: color 150ms ease, background 150ms ease, transform 150ms ease;

&:hover {
color: var(--gray12);
background: var(--grayA4);
}

&:active {
color: var(--gray12);
background: var(--grayA5);
transform: scale(0.96);
}
}
}

.shine {
@media (prefers-color-scheme: dark) {
background: linear-gradient(
90deg,
rgba(56, 189, 248, 0),
var(--gray5) 20%,
var(--gray9) 67.19%,
rgba(236, 72, 153, 0)
);
height: 1px;
position: absolute;
top: -1px;
width: 97%;
z-index: -1;
}
}

@media (max-width: 640px) {
.root {
:global(.token-line) {
font-size: 11px !important;
}
}
}
66 changes: 66 additions & 0 deletions apps/www/components/code/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from 'react'
import copy from 'copy-to-clipboard'
import Highlight, { defaultProps } from 'prism-react-renderer'
import styles from './code.module.scss'
import { CopyIcon } from 'components/icons'

const theme = {
plain: {
color: 'var(--gray12)',
fontSize: 12,
fontFamily: 'Menlo, monospace',
},
styles: [
{
types: ['comment'],
style: {
color: 'var(--gray9)',
},
},
{
types: ['atrule', 'keyword', 'attr-name', 'selector'],
style: {
color: 'var(--gray10)',
},
},
{
types: ['punctuation', 'operator'],
style: {
color: 'var(--gray9)',
},
},
{
types: ['class-name', 'function', 'tag'],
style: {
color: 'var(--gray12)',
},
},
],
}

export function Code({ children }: { children: string }) {
return (
<Highlight {...defaultProps} theme={theme} code={children} language="jsx">
{({ className, style, tokens, getLineProps, getTokenProps }) => (
<pre className={`${className} ${styles.root}`} style={style}>
<button
aria-label="Copy Code"
onClick={() => {
copy(children)
}}
>
<CopyIcon />
</button>
<div className={styles.shine} />
{tokens.map((line, i) => (
<div key={i} {...getLineProps({ line, key: i })}>
{line.map((token, key) => (
<span key={i} {...getTokenProps({ token, key })} />
))}
</div>
))}
</pre>
)}
</Highlight>
)
}
46 changes: 46 additions & 0 deletions apps/www/components/icons/icons.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.blurLogo {
display: flex;
align-items: center;
justify-content: center;
position: relative;
border-radius: 4px;
overflow: hidden;
box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, 0.015);

.bg {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
z-index: 1;
pointer-events: none;
user-select: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: scale(1.5) translateZ(0);
filter: blur(12px) opacity(0.4) saturate(100%);
transition: filter 150ms ease;
}

.inner {
display: flex;
align-items: center;
justify-content: center;
object-fit: cover;
width: 100%;
height: 100%;
user-select: none;
pointer-events: none;
border-radius: inherit;
z-index: 2;

svg {
width: 14px;
height: 14px;
filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.16));
transition: filter 150ms ease;
}
}
}
Loading

0 comments on commit 58cd1ec

Please sign in to comment.