From d6dc0b3b7a0fe0f15aa425c778affca18926945d Mon Sep 17 00:00:00 2001 From: elisejakob Date: Wed, 30 Jan 2019 14:07:51 +0100 Subject: [PATCH] simplify markup --- src/templates/blog.js | 2 +- src/templates/page.js | 22 ++++-------- src/templates/post.js | 78 ++++++++++++++++++++----------------------- 3 files changed, 43 insertions(+), 59 deletions(-) diff --git a/src/templates/blog.js b/src/templates/blog.js index 049cc3b..9dd4e08 100644 --- a/src/templates/blog.js +++ b/src/templates/blog.js @@ -12,7 +12,7 @@ export default class IndexPage extends React.Component { return ( - + ) diff --git a/src/templates/page.js b/src/templates/page.js index 9b02915..f1e7ffe 100644 --- a/src/templates/page.js +++ b/src/templates/page.js @@ -5,22 +5,12 @@ import Layout from '../components/Layout' export const PageTemplate = ({ title, content }) => { return ( -
-
-
-
-
-

- {title} -

-
-
-
-
-
+
+

{title}

+
) } diff --git a/src/templates/post.js b/src/templates/post.js index 0f4004b..5ca06e9 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -13,49 +13,43 @@ export const BlogPostTemplate = ({ author, }) => { return ( -
-
-
-
-

- {title} -

-
-
-

- {date} - posted by{' '} - {author.name} -

- {categories && categories.length ? ( -
-

Categories

-
    - {categories.map(category => ( -
  • - - {category.name} - -
  • - ))} -
-
- ) : null} - {tags && tags.length ? ( -
-

Tags

-
    - {tags.map(tag => ( -
  • - {tag.name} -
  • - ))} -
-
- ) : null} -
-
-
+
+

+ {title} +

+
+

+ {date} - posted by{' '} + {author.name} +

+
+ {categories && categories.length ? ( +
+

Categories

+
    + {categories.map(category => ( +
  • + + {category.name} + +
  • + ))} +
+
+ ) : null} + {tags && tags.length ? ( +
+

Tags

+
    + {tags.map(tag => ( +
  • + {tag.name} +
  • + ))} +
+
+ ) : null}
) }