mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 04:22:07 +00:00
* Add API for frameworks and examples * Adjust headers * Update frameworks list * Always use latest * Add types * Use now repo for downloading and listing * Use .existsSync * Remove unused packages * Use 307 for redirect * Add examples * Update tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Make examples unique * Remove detectors from frameworks API * Use /api instead of Next.js * Install dependencies * Rename project * Change name * Empty * Change name * Update api/tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Update examples Co-authored-by: Steven <steven@ceriously.com>
57 lines
1.1 KiB
JavaScript
57 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import Link from 'next/link';
|
|
|
|
const links = [
|
|
{ href: 'https://zeit.co/now', label: 'ZEIT' },
|
|
{ href: 'https://github.com/zeit/next.js', label: 'GitHub' },
|
|
].map(link => {
|
|
link.key = `nav-link-${link.href}-${link.label}`;
|
|
return link;
|
|
});
|
|
|
|
const Nav = () => (
|
|
<nav>
|
|
<ul>
|
|
<li>
|
|
<Link href="/">
|
|
<a>Home</a>
|
|
</Link>
|
|
</li>
|
|
{links.map(({ key, href, label }) => (
|
|
<li key={key}>
|
|
<a href={href}>{label}</a>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
|
|
<style jsx>{`
|
|
:global(body) {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, Avenir Next, Avenir,
|
|
Helvetica, sans-serif;
|
|
}
|
|
nav {
|
|
text-align: center;
|
|
}
|
|
ul {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
nav > ul {
|
|
padding: 4px 16px;
|
|
}
|
|
li {
|
|
display: flex;
|
|
padding: 6px 8px;
|
|
}
|
|
a {
|
|
color: #067df7;
|
|
text-decoration: none;
|
|
font-size: 13px;
|
|
}
|
|
`}</style>
|
|
</nav>
|
|
);
|
|
|
|
export default Nav;
|