Fix component top margins
This commit is contained in:
@@ -2,7 +2,7 @@ import { Link, routes } from '@redwoodjs/router'
|
|||||||
|
|
||||||
const BlogPost = ({ post }) => {
|
const BlogPost = ({ post }) => {
|
||||||
return (
|
return (
|
||||||
<article className="mt-10">
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2 className="text-xl text-blue-700 font-semibold">
|
<h2 className="text-xl text-blue-700 font-semibold">
|
||||||
<Link to={routes.blogPost({ id: post.id })}>{post.title}</Link>
|
<Link to={routes.blogPost({ id: post.id })}>{post.title}</Link>
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ export const generated = () => {
|
|||||||
post={{
|
post={{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: 'First Post',
|
title: 'First Post',
|
||||||
body: 'Neutra tacos hot chicken prism raw denim...',
|
body:
|
||||||
|
'Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.',
|
||||||
createdAt: '2020-01-01T12:34:56Z',
|
createdAt: '2020-01-01T12:34:56Z',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,9 +2,13 @@
|
|||||||
export const standard = (/* vars, { ctx, req } */) => ({
|
export const standard = (/* vars, { ctx, req } */) => ({
|
||||||
post: {
|
post: {
|
||||||
id: 1,
|
id: 1,
|
||||||
title: 'First post',
|
title: 'First Post',
|
||||||
body:
|
body: `Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin
|
||||||
'Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.',
|
post-ironic vape cred DIY. Street art next level umami squid. Hammock
|
||||||
|
hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four
|
||||||
|
loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing
|
||||||
|
hella shaman. Letterpress helvetica vaporware cronut, shaman butcher
|
||||||
|
YOLO poke fixie hoodie gentrify woke heirloom.`,
|
||||||
createdAt: '2020-01-01T12:34:56Z',
|
createdAt: '2020-01-01T12:34:56Z',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ export const Failure = ({ error }) => <div>Error: {error.message}</div>
|
|||||||
|
|
||||||
export const Success = ({ posts }) => {
|
export const Success = ({ posts }) => {
|
||||||
return (
|
return (
|
||||||
<div className="-mt-12">
|
<div className="-mt-10">
|
||||||
{posts.map((post) => (
|
{posts.map((post) => (
|
||||||
<BlogPost key={post.id} post={post} />
|
<div key={post.id} className="mt-10">
|
||||||
|
<BlogPost post={post} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,16 +3,22 @@ export const standard = (/* vars, { ctx, req } */) => ({
|
|||||||
posts: [
|
posts: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: 'First post',
|
title: 'First Post',
|
||||||
body:
|
body: `Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin
|
||||||
'Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.',
|
post-ironic vape cred DIY. Street art next level umami squid. Hammock
|
||||||
|
hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four
|
||||||
|
loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing
|
||||||
|
hella shaman. Letterpress helvetica vaporware cronut, shaman butcher
|
||||||
|
YOLO poke fixie hoodie gentrify woke heirloom.`,
|
||||||
createdAt: '2020-01-01T12:34:56Z',
|
createdAt: '2020-01-01T12:34:56Z',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
title: 'Second post',
|
title: 'Second Post',
|
||||||
body:
|
body: `Master cleanse gentrify irony put a bird on it hexagon enamel pin.
|
||||||
'Master cleanse gentrify irony put a bird on it hexagon enamel pin. Pop-up man braid artisan pug tilde synth lo-fi. Ethical tofu portland keytar waistcoat. Pabst authentic hammock chillwave twee trust fund. Lyft humblebrag ramps irony unicorn.',
|
Pop-up man braid artisan pug tilde synth lo-fi. Ethical tofu portland
|
||||||
|
keytar waistcoat. Pabst authentic hammock chillwave twee trust fund.
|
||||||
|
Lyft humblebrag ramps irony unicorn.`,
|
||||||
createdAt: '2020-01-01T12:34:56Z',
|
createdAt: '2020-01-01T12:34:56Z',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Link,routes } from '@redwoodjs/router'
|
import { Link, routes } from '@redwoodjs/router'
|
||||||
import BlogLayout from 'src/layouts/BlogLayout'
|
import BlogLayout from 'src/layouts/BlogLayout'
|
||||||
|
|
||||||
const AboutPage = () => {
|
const AboutPage = () => {
|
||||||
return (
|
return (
|
||||||
<BlogLayout>
|
<BlogLayout>
|
||||||
<p>
|
<p className="font-light">
|
||||||
This site was created to demonstrate my mastery of Redwood: Look on my
|
This site was created to demonstrate my mastery of Redwood: Look on my
|
||||||
works, ye mighty, and despair!
|
works, ye mighty, and despair!
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import BlogPostCell from 'src/components/BlogPostCell'
|
|||||||
const BlogPostPage = ({ id }) => {
|
const BlogPostPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<BlogLayout>
|
<BlogLayout>
|
||||||
<div className="-mt-12">
|
<BlogPostCell id={id} />
|
||||||
<BlogPostCell id={id} />
|
|
||||||
</div>
|
|
||||||
</BlogLayout>
|
</BlogLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user