Skip to content

Commit 71d732b

Browse files
committed
Initial commit from Create Next App
0 parents  commit 71d732b

File tree

6 files changed

+5938
-0
lines changed

6 files changed

+5938
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
.env*
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*

components/nav.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React from 'react'
2+
import Link from 'next/link'
3+
4+
const links = [
5+
{ href: 'https://zeit.co/now', label: 'ZEIT' },
6+
{ href: 'https://github.com/zeit/next.js', label: 'GitHub' },
7+
].map(link => {
8+
link.key = `nav-link-${link.href}-${link.label}`
9+
return link
10+
})
11+
12+
const Nav = () => (
13+
<nav>
14+
<ul>
15+
<li>
16+
<Link href="/">
17+
<a>Home</a>
18+
</Link>
19+
</li>
20+
{links.map(({ key, href, label }) => (
21+
<li key={key}>
22+
<a href={href}>{label}</a>
23+
</li>
24+
))}
25+
</ul>
26+
27+
<style jsx>{`
28+
:global(body) {
29+
margin: 0;
30+
font-family: -apple-system, BlinkMacSystemFont, Avenir Next, Avenir,
31+
Helvetica, sans-serif;
32+
}
33+
nav {
34+
text-align: center;
35+
}
36+
ul {
37+
display: flex;
38+
justify-content: space-between;
39+
}
40+
nav > ul {
41+
padding: 4px 16px;
42+
}
43+
li {
44+
display: flex;
45+
padding: 6px 8px;
46+
}
47+
a {
48+
color: #067df7;
49+
text-decoration: none;
50+
font-size: 13px;
51+
}
52+
`}</style>
53+
</nav>
54+
)
55+
56+
export default Nav

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "simple-nextjs-firebase-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start"
9+
},
10+
"dependencies": {
11+
"next": "9.1.7",
12+
"react": "16.12.0",
13+
"react-dom": "16.12.0"
14+
}
15+
}

pages/index.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import React from 'react'
2+
import Head from 'next/head'
3+
import Nav from '../components/nav'
4+
5+
const Home = () => (
6+
<div>
7+
<Head>
8+
<title>Home</title>
9+
<link rel="icon" href="/favicon.ico" />
10+
</Head>
11+
12+
<Nav />
13+
14+
<div className="hero">
15+
<h1 className="title">Welcome to Next.js!</h1>
16+
<p className="description">
17+
To get started, edit <code>pages/index.js</code> and save to reload.
18+
</p>
19+
20+
<div className="row">
21+
<a href="https://nextjs.org/docs" className="card">
22+
<h3>Documentation &rarr;</h3>
23+
<p>Learn more about Next.js in the documentation.</p>
24+
</a>
25+
<a href="https://nextjs.org/learn" className="card">
26+
<h3>Next.js Learn &rarr;</h3>
27+
<p>Learn about Next.js by following an interactive tutorial!</p>
28+
</a>
29+
<a
30+
href="https://github.com/zeit/next.js/tree/master/examples"
31+
className="card"
32+
>
33+
<h3>Examples &rarr;</h3>
34+
<p>Find other example boilerplates on the Next.js GitHub.</p>
35+
</a>
36+
</div>
37+
</div>
38+
39+
<style jsx>{`
40+
.hero {
41+
width: 100%;
42+
color: #333;
43+
}
44+
.title {
45+
margin: 0;
46+
width: 100%;
47+
padding-top: 80px;
48+
line-height: 1.15;
49+
font-size: 48px;
50+
}
51+
.title,
52+
.description {
53+
text-align: center;
54+
}
55+
.row {
56+
max-width: 880px;
57+
margin: 80px auto 40px;
58+
display: flex;
59+
flex-direction: row;
60+
justify-content: space-around;
61+
}
62+
.card {
63+
padding: 18px 18px 24px;
64+
width: 220px;
65+
text-align: left;
66+
text-decoration: none;
67+
color: #434343;
68+
border: 1px solid #9b9b9b;
69+
}
70+
.card:hover {
71+
border-color: #067df7;
72+
}
73+
.card h3 {
74+
margin: 0;
75+
color: #067df7;
76+
font-size: 18px;
77+
}
78+
.card p {
79+
margin: 0;
80+
padding: 12px 0 0;
81+
font-size: 13px;
82+
color: #333;
83+
}
84+
`}</style>
85+
</div>
86+
)
87+
88+
export default Home

public/favicon.ico

14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)