2018-08-27 15:24:23 +02:00
|
|
|
import React, { Component } from 'react'
|
2018-06-27 13:22:17 +02:00
|
|
|
import Helmet from 'react-helmet'
|
2018-08-29 14:05:56 +02:00
|
|
|
import Prism from 'prismjs'
|
|
|
|
|
|
|
|
|
|
require('prismjs/themes/prism-solarizedlight.css')
|
|
|
|
|
|
2018-08-30 11:07:16 +02:00
|
|
|
import PageTransition from 'gatsby-plugin-page-transitions'
|
|
|
|
|
|
2018-06-27 10:35:17 +02:00
|
|
|
class PostDefault extends Component {
|
2018-08-29 14:05:56 +02:00
|
|
|
componentDidMount() {
|
|
|
|
|
Prism.highlightAll()
|
|
|
|
|
}
|
2018-06-25 15:28:50 +02:00
|
|
|
render() {
|
|
|
|
|
const { data } = this.props
|
|
|
|
|
return (
|
2018-08-30 11:07:16 +02:00
|
|
|
<PageTransition>
|
2018-06-27 13:22:17 +02:00
|
|
|
<Helmet
|
|
|
|
|
title={`${data.wordpressPost.title} - Saburly.com`}
|
|
|
|
|
meta={[
|
|
|
|
|
{ name: 'description', content: 'We code & design great software' },
|
2018-08-27 15:24:23 +02:00
|
|
|
{
|
|
|
|
|
name: 'keywords',
|
|
|
|
|
content:
|
|
|
|
|
'software, design, coding, programming, code, consulting',
|
|
|
|
|
},
|
2018-06-27 13:22:17 +02:00
|
|
|
]}
|
|
|
|
|
/>
|
2018-08-27 15:24:23 +02:00
|
|
|
<main className="container mx-auto p-4 sm:p-10">
|
|
|
|
|
<h1>Specific Post - {data.wordpressPost.title}</h1>
|
|
|
|
|
<div
|
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
|
__html: data.wordpressPost.content,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</main>
|
2018-08-30 11:07:16 +02:00
|
|
|
</PageTransition>
|
2018-08-27 15:24:23 +02:00
|
|
|
)
|
2018-06-25 15:28:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const query = graphql`
|
2018-06-27 10:35:17 +02:00
|
|
|
query PostDefaultQuery($slug: String!) {
|
2018-08-27 15:24:23 +02:00
|
|
|
wordpressPost(slug: { eq: $slug }) {
|
2018-06-25 15:28:50 +02:00
|
|
|
title
|
|
|
|
|
slug
|
|
|
|
|
content
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
|
2018-08-27 15:24:23 +02:00
|
|
|
export default PostDefault
|