diff --git a/app/api/upload/route.ts b/app/api/upload/route.ts new file mode 100644 index 0000000..e57dd97 --- /dev/null +++ b/app/api/upload/route.ts @@ -0,0 +1,21 @@ +import { put } from '@vercel/blob' +import { NextResponse } from 'next/server' +import { customAlphabet } from 'nanoid' + +export const runtime = 'edge' + +const nanoid = customAlphabet( + '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', + 7 +) // 7-character random string +export async function POST(req: Request) { + const file = req.body || '' + const contentType = req.headers.get('content-type') || 'text/plain' + const filename = `${nanoid()}.${contentType.split('/')[1]}` + const blob = await put(filename, file, { + contentType, + access: 'public', + }) + + return NextResponse.json(blob) +} diff --git a/src/app/globals.css b/app/globals.css similarity index 69% rename from src/app/globals.css rename to app/globals.css index fd81e88..1b4ca7b 100644 --- a/src/app/globals.css +++ b/app/globals.css @@ -8,14 +8,6 @@ --background-end-rgb: 255, 255, 255; } -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - body { color: rgb(var(--foreground-rgb)); background: linear-gradient( diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..247f883 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,34 @@ +import './globals.css' +import { Inter } from 'next/font/google' + +export const metadata = { + title: 'owkor', + description: 'owkor', + manifest: 'site.webmanifest', + icons: { + icon: ['/favicon-32x32.png', '/favicon-16x16.png'], + apple: '/apple-touch-icon.png', + other: { + rel: 'mask-icon', + url: '/safari-pinned-tab.svg', + }, + }, +} + +const inter = Inter({ + variable: '--font-inter', + subsets: ['latin'], + display: 'swap', +}) + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/app/page.module.css b/app/page.module.css new file mode 100644 index 0000000..0c920b2 --- /dev/null +++ b/app/page.module.css @@ -0,0 +1,7 @@ +.steps { + list-style: number; +} + +.connect { + margin-top: 20px; +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..4547c28 --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,47 @@ +import Image from 'next/image' +import Link from 'next/link' +import Script from 'next/script' +import * as React from 'react' +import styles from './page.module.css' + + +export default function Home() { + return ( +
+
+
    +
  1. Plug in your devices to a USB port. We will install firmware to it.
  2. +
  3. Hit ‘Connect’ and select the correct COM port.
  4. +
  5. Get firmware installed and connected in less than 3 minutes!
  6. +
+
+ +
+
+
+ + Owkor Logo + + + GitHub Logo + +
+