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
23178db5
Commit
23178db5
authored
Feb 27, 2019
by
JJ Kasper
Committed by
Tim Neutkens
Feb 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add styles to experimental-amp example (#6461)
After discussion added global styles to experimental-amp example
parent
70d611f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
Layout.js
examples/experimental-amp/components/Layout.js
+10
-0
index.js
examples/experimental-amp/pages/index.js
+8
-2
No files found.
examples/experimental-amp/components/Layout.js
0 → 100644
View file @
23178db5
export
default
function
Layout
({
children
})
{
return
(
<>
{
children
}
<
style
jsx
global
>
{
`
body {font-family: Roboto, sans-serif; padding: 30px; color: #444;}
`
}
<
/style
>
<
/
>
)
}
examples/experimental-amp/pages/index.js
View file @
23178db5
import
Head
from
'next/head'
import
Head
from
'next/head'
import
{
useAmp
}
from
'next/amp'
import
{
useAmp
}
from
'next/amp'
import
Layout
from
'../components/Layout'
import
Byline
from
'../components/Byline'
import
Byline
from
'../components/Byline'
export
default
()
=>
{
export
default
()
=>
{
const
isAmp
=
useAmp
()
const
isAmp
=
useAmp
()
return
(
return
(
<>
<
Layout
>
<
Head
>
<
Head
>
<
title
>
The
Cat
<
/title
>
<
title
>
The
Cat
<
/title
>
<
/Head
>
<
/Head
>
...
@@ -200,6 +201,11 @@ export default () => {
...
@@ -200,6 +201,11 @@ export default () => {
belly and purr when you are asleep. Lounge in doorway poop on grasses
belly and purr when you are asleep. Lounge in doorway poop on grasses
for lounge in doorway for chew iPad power cord.
for lounge in doorway for chew iPad power cord.
</p>
</p>
</>
<style jsx>{`
h1 {margin-bottom: 5px;}
p {font-size: 18px; line-height: 30px; margin-top: 30px;}
.caption {color: #ccc; margin-top: 0; font-size: 14px; text-align: center;}
`}</style>
</Layout>
)
)
}
}
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