Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
81fd7046
Unverified
Commit
81fd7046
authored
Jan 30, 2020
by
Paco
Committed by
GitHub
Jan 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the default template of create-next-app (#10327)
* Update the default template for create-next-app * Fix link
parent
90015e35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
154 additions
and
91 deletions
+154
-91
nav.js
packages/create-next-app/templates/default/components/nav.js
+0
-56
index.js
packages/create-next-app/templates/default/pages/index.js
+144
-35
zeit.svg
packages/create-next-app/templates/default/public/zeit.svg
+10
-0
No files found.
packages/create-next-app/templates/default/components/nav.js
deleted
100644 → 0
View file @
90015e35
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
}
`
,
}))
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
packages/create-next-app/templates/default/pages/index.js
View file @
81fd7046
import
React
from
'react'
import
Head
from
'next/head'
import
Nav
from
'../components/nav'
const
Home
=
()
=>
(
<
div
>
<
div
className
=
"container"
>
<
Head
>
<
title
>
Home
<
/title
>
<
title
>
Create
Next
App
<
/title
>
<
link
rel
=
"icon"
href
=
"/favicon.ico"
/>
<
/Head
>
<
Nav
/>
<
main
>
<
h1
className
=
"title"
>
Welcome
to
<
a
href
=
"https://nextjs.org"
>
Next
.
js
!<
/a
>
<
/h1
>
<
div
className
=
"hero"
>
<
h1
className
=
"title"
>
Welcome
to
Next
.
js
!<
/h1
>
<
p
className
=
"description"
>
To
get
started
,
edit
<
code
>
pages
/
index
.
js
<
/code> and save to reload
.
Get
started
by
editing
<
code
>
pages
/
index
.
js
<
/code
>
<
/p
>
<
div
className
=
"
row
"
>
<
div
className
=
"
grid
"
>
<
a
href
=
"https://nextjs.org/docs"
className
=
"card"
>
<
h3
>
Documentation
&
rarr
;
<
/h3
>
<
p
>
Learn
more
about
Next
.
js
in
the
documentation
.
<
/p
>
<
p
>
Find
in
-
depth
information
about
Next
.
js
features
and
API
.
<
/p
>
<
/a
>
<
a
href
=
"https://nextjs.org/learn"
className
=
"card"
>
<
h3
>
Next
.
js
Learn
&
rarr
;
<
/h3
>
<
p
>
Learn
about
Next
.
js
by
following
an
interactive
tutorial
!<
/p
>
<
h3
>
Learn
&
rarr
;
<
/h3
>
<
p
>
Learn
about
Next
.
js
in
an
interactive
course
with
quizzes
!<
/p
>
<
/a
>
<
a
href
=
"https://github.com/zeit/next.js/tree/master/examples"
className
=
"card"
>
<
h3
>
Examples
&
rarr
;
<
/h3
>
<
p
>
Find
other
example
boilerplates
on
the
Next
.
js
GitHub
.
<
/p
>
<
p
>
Discover
and
deploy
boilerplate
example
Next
.
js
projects
.
<
/p
>
<
/a
>
<
a
href
=
"https://zeit.co/new/nextjs"
className
=
"card"
>
<
h3
>
Deploy
&
rarr
;
<
/h3
>
<
p
>
Instantly
deploy
your
Next
.
js
site
to
a
public
URL
with
ZEIT
Now
.
<
/p
>
<
/a
>
<
/div
>
<
/div
>
<
/main
>
<
footer
>
<
a
href
=
"https://zeit.co"
target
=
"_blank"
rel
=
"noopener noreferrer"
>
Powered
by
<
img
src
=
"/zeit.svg"
alt
=
"ZEIT Logo"
/>
<
/a
>
<
/footer
>
<
style
jsx
>
{
`
.hero {
.container {
min-height: 100vh;
padding: 0 0.5rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main {
padding: 5rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
footer {
width: 100%;
color: #333;
height: 100px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
}
footer img {
margin-left: 0.5rem;
}
footer a {
display: flex;
justify-content: center;
align-items: center;
}
a {
color: inherit;
text-decoration: none;
}
.title a {
color: #0070f3;
text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
text-decoration: underline;
}
.title {
margin: 0;
width: 100%;
padding-top: 80px;
line-height: 1.15;
font-size: 4
8px
;
font-size: 4
rem
;
}
.title,
.description {
text-align: center;
}
.row {
max-width: 880px;
margin: 80px auto 40px;
.description {
line-height: 1.5;
font-size: 1.5rem;
}
code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 3rem;
}
.card {
padding: 18px 18px 24px;
width: 220px;
margin: 1rem;
flex-basis: 45%;
padding: 1.5rem;
text-align: left;
color: inherit;
text-decoration: none;
color: #434343;
border: 1px solid #9b9b9b;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
}
.card:hover {
border-color: #067df7;
.card:hover,
.card:focus,
.card:active {
color: #0070f3;
border-color: #0070f3;
}
.card h3 {
margin: 0;
color: #067df7;
font-size: 18px;
margin: 0 0 1rem 0;
font-size: 1.5rem;
}
.card p {
margin: 0;
padding: 12px 0 0;
font-size: 13px;
color: #333;
font-size: 1.25rem;
line-height: 1.5;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}
`
}
<
/style
>
<
style
jsx
global
>
{
`
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
* {
box-sizing: border-box;
}
`
}
<
/style
>
<
/div
>
...
...
packages/create-next-app/templates/default/public/zeit.svg
0 → 100644
View file @
81fd7046
<svg
width=
"82"
height=
"16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill=
"url(#prefix__paint0_linear)"
d=
"M9.018 0l9.019 16H0L9.018 0z"
/>
<path
fill=
"#333"
fill-rule=
"evenodd"
d=
"M51.634 12.028h-6.492V2.052h6.492v1.256H46.61v3.007h4.37V7.57h-4.37v3.202h5.024v1.255zm-14.063 0h-7.235v-1.096l5.342-7.624h-5.253V2.052h7.058v1.097l-5.342 7.623h5.43v1.256zm21.88 0h6.333v-1.256h-2.423V3.308h2.423V2.052h-6.332v1.256h2.441v7.465h-2.441v1.255zm18.22 0h-1.468v-8.72h-3.36V2.052h8.225v1.256H77.67v8.72z"
clip-rule=
"evenodd"
/>
<defs>
<linearGradient
id=
"prefix__paint0_linear"
x1=
"28.022"
x2=
"16.189"
y1=
"22.991"
y2=
"8.569"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#fff"
/>
<stop
offset=
"1"
/>
</linearGradient>
</defs>
</svg>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment