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-09-05 23:01:06 +02:00
|
|
|
import MessengerCustomerChat from 'react-messenger-customer-chat'
|
2018-09-05 13:13:04 +02:00
|
|
|
import favicon32 from '../images/favicon32.png'
|
|
|
|
|
|
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-09-05 13:13:04 +02:00
|
|
|
link={[
|
|
|
|
|
{ rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` },
|
|
|
|
|
]}
|
2018-06-27 13:22:17 +02:00
|
|
|
/>
|
2018-09-05 12:15:12 +02:00
|
|
|
<main className="container mx-auto p-4 max-w-lg sm:p-10">
|
2018-09-12 12:06:57 +02:00
|
|
|
<img
|
|
|
|
|
className="w-full rounded"
|
|
|
|
|
src={
|
|
|
|
|
data.wordpressPost.featured_media
|
|
|
|
|
? data.wordpressPost.featured_media.source_url
|
|
|
|
|
: ''
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<h1 className="mt-4">{data.wordpressPost.title}</h1>
|
2018-08-27 15:24:23 +02:00
|
|
|
<div
|
2018-09-12 12:06:57 +02:00
|
|
|
className="leading-normal blog-post font-serif"
|
2018-08-27 15:24:23 +02:00
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
|
__html: data.wordpressPost.content,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2018-09-05 23:01:06 +02:00
|
|
|
<MessengerCustomerChat
|
|
|
|
|
pageId="715686642152482"
|
|
|
|
|
appId="1896398823783343"
|
|
|
|
|
htmlRef="blogpost"
|
|
|
|
|
/>
|
2018-08-27 15:24:23 +02:00
|
|
|
</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-09-12 12:06:57 +02:00
|
|
|
date(formatString: "MMMM DD, YYYY")
|
|
|
|
|
featured_media {
|
|
|
|
|
source_url
|
|
|
|
|
}
|
2018-06-25 15:28:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
|
2018-08-27 15:24:23 +02:00
|
|
|
export default PostDefault
|