Remove Moris and Wordpress
This commit is contained in:
@@ -10,7 +10,7 @@ module.exports = {
|
||||
{
|
||||
resolve: 'gatsby-source-wordpress',
|
||||
options: {
|
||||
baseUrl: 'swp.sarajevo.net',
|
||||
baseUrl: 'saburly.wordpress.com',
|
||||
protocol: 'https',
|
||||
hostingWPCOM: false,
|
||||
useACF: true,
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
const path = require('path')
|
||||
|
||||
exports.createPages = ({ graphql, boundActionCreators }) => {
|
||||
const { createPage } = boundActionCreators
|
||||
return new Promise((resolve, reject) => {
|
||||
graphql(
|
||||
`
|
||||
{
|
||||
allWordpressPost {
|
||||
edges {
|
||||
node {
|
||||
slug
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
).then(result => {
|
||||
if (result.errors) {
|
||||
console.log(result.errors)
|
||||
reject(result.errors)
|
||||
}
|
||||
//exports.createPages = ({ graphql, boundActionCreators }) => {
|
||||
//const { createPage } = boundActionCreators
|
||||
//return new Promise((resolve, reject) => {
|
||||
//graphql(
|
||||
//`
|
||||
//{
|
||||
//allWordpressPost {
|
||||
//edges {
|
||||
//node {
|
||||
//slug
|
||||
//status
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//`
|
||||
//).then(result => {
|
||||
//if (result.errors) {
|
||||
//console.log(result.errors)
|
||||
//reject(result.errors)
|
||||
//}
|
||||
|
||||
createPage({
|
||||
path: `/blog/`,
|
||||
component: path.resolve('./src/templates/blog.js'),
|
||||
})
|
||||
//createPage({
|
||||
//path: `/blog/`,
|
||||
//component: path.resolve('./src/templates/blog.js'),
|
||||
//})
|
||||
|
||||
result.data.allWordpressPost.edges.forEach(({ node }) => {
|
||||
createPage({
|
||||
path: `blog/${node.slug}`,
|
||||
component: path.resolve('./src/templates/post-default.js'),
|
||||
context: {
|
||||
slug: node.slug,
|
||||
},
|
||||
})
|
||||
})
|
||||
//result.data.allWordpressPost.edges.forEach(({ node }) => {
|
||||
//createPage({
|
||||
//path: `blog/${node.slug}`,
|
||||
//component: path.resolve('./src/templates/post-default.js'),
|
||||
//context: {
|
||||
//slug: node.slug,
|
||||
//},
|
||||
//})
|
||||
//})
|
||||
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
//resolve()
|
||||
//})
|
||||
//})
|
||||
//}
|
||||
|
||||
@@ -69,7 +69,6 @@ class SEO extends Component {
|
||||
|
||||
return (
|
||||
<Helmet>
|
||||
<script type="text/javascript">{`window.$crisp=[];window.CRISP_WEBSITE_ID="346bb060-d289-437d-bafa-3a02d470f7b6";(function(){ d=document;s=d.createElement("script"); s.src="https://client.crisp.chat/l.js"; s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})(); `}</script>
|
||||
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={desc} />
|
||||
|
||||
@@ -63,9 +63,6 @@ const AboutPage = () => (
|
||||
textClasses="text-center"
|
||||
/>
|
||||
<div className="container mx-auto w-full md:flex md:flex-wrap items-stretch w-full">
|
||||
<div className="md:w-1/3 p-2">
|
||||
<Card team unshadowed teamMember={Moris} title="Moris" />
|
||||
</div>
|
||||
<div className="md:w-1/3 p-2">
|
||||
<Card team unshadowed teamMember={Senad} title="Senad" />
|
||||
</div>
|
||||
|
||||
@@ -102,7 +102,7 @@ const IndexPage = ({ ...props }) => (
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section className="bg-saburly-lighter text-center p-4 my-12">
|
||||
<section className="bg-saburly-lighter text-center p-4">
|
||||
<div className="my-8 py-8 container mx-auto max-w-lg">
|
||||
<SectionIntro
|
||||
h2Classes="text-3xl font-black xsm:text-4xl sm:text-5xl"
|
||||
@@ -170,78 +170,40 @@ const IndexPage = ({ ...props }) => (
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="text-center p-4 relative">
|
||||
<SectionIntro
|
||||
h2Classes="py-8 text-3xl font-black xsm:text-4xl sm:text-5xl"
|
||||
headline="Sometimes we have fun & publish"
|
||||
/>
|
||||
<div className="container mx-auto w-full md:flex md:flex-wrap items-stretch w-full">
|
||||
{props.data.allWordpressPost.edges.map(({ node }) => (
|
||||
<div key={node.id} className="md:w-1/2 p-2">
|
||||
<Link
|
||||
to={`blog/${node.slug}`}
|
||||
className="pointer no-underline saburly-transition hover:opacity-50"
|
||||
>
|
||||
<Card
|
||||
url={`blog/${node.slug}`}
|
||||
title={node.title}
|
||||
date={node.date}
|
||||
authorName={node.author.name}
|
||||
imgAlt={node.title}
|
||||
excerpt={node.excerpt}
|
||||
image={
|
||||
node.featured_media
|
||||
? node.featured_media.localFile.childImageSharp
|
||||
.resolutions
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<Button
|
||||
standard
|
||||
text="More Posts"
|
||||
url="/blog"
|
||||
classes="mt-2 mb-8 hover:shadow-md rounded-full text-grey-darker"
|
||||
/>
|
||||
</section>
|
||||
</main>
|
||||
</PageTransition>
|
||||
)
|
||||
|
||||
export const query = graphql`
|
||||
query indexPostsQuery {
|
||||
allWordpressPost(limit: 2) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
title
|
||||
author {
|
||||
id
|
||||
name
|
||||
}
|
||||
excerpt
|
||||
status
|
||||
slug
|
||||
date(formatString: "MMMM DD, YYYY")
|
||||
featured_media {
|
||||
localFile {
|
||||
childImageSharp {
|
||||
resolutions(width: 700, height: 300) {
|
||||
src
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
//export const query = graphql`
|
||||
//query indexPostsQuery {
|
||||
//allWordpressPost(limit: 2) {
|
||||
//edges {
|
||||
//node {
|
||||
//id
|
||||
//title
|
||||
//author {
|
||||
//id
|
||||
//name
|
||||
//}
|
||||
//excerpt
|
||||
//status
|
||||
//slug
|
||||
//date(formatString: "MMMM DD, YYYY")
|
||||
//featured_media {
|
||||
//localFile {
|
||||
//childImageSharp {
|
||||
//resolutions(width: 700, height: 300) {
|
||||
//src
|
||||
//width
|
||||
//height
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//`
|
||||
|
||||
export default IndexPage
|
||||
|
||||
@@ -20,7 +20,6 @@ class Blog extends Component {
|
||||
siteUrl="https://saburly.com/blog"
|
||||
/>
|
||||
<Helmet>
|
||||
<script type="text/javascript">{`window.$crisp=[];window.CRISP_WEBSITE_ID="346bb060-d289-437d-bafa-3a02d470f7b6";(function(){ d=document;s=d.createElement("script"); s.src="https://client.crisp.chat/l.js"; s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})(); `}</script>
|
||||
</Helmet>
|
||||
|
||||
<SectionIntro
|
||||
@@ -67,35 +66,35 @@ class Blog extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query blogQuery {
|
||||
allWordpressPost {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
title
|
||||
excerpt
|
||||
status
|
||||
slug
|
||||
author {
|
||||
name
|
||||
}
|
||||
date(formatString: "MMMM DD, YYYY")
|
||||
featured_media {
|
||||
localFile {
|
||||
childImageSharp {
|
||||
resolutions(width: 600, height: 300) {
|
||||
src
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
//export const query = graphql`
|
||||
//query blogQuery {
|
||||
//allWordpressPost {
|
||||
//edges {
|
||||
//node {
|
||||
//id
|
||||
//title
|
||||
//excerpt
|
||||
//status
|
||||
//slug
|
||||
//author {
|
||||
//name
|
||||
//}
|
||||
//date(formatString: "MMMM DD, YYYY")
|
||||
//featured_media {
|
||||
//localFile {
|
||||
//childImageSharp {
|
||||
//resolutions(width: 600, height: 300) {
|
||||
//src
|
||||
//width
|
||||
//height
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//`
|
||||
|
||||
export default Blog
|
||||
|
||||
@@ -62,21 +62,21 @@ class PostDefault extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query PostDefaultQuery($slug: String!) {
|
||||
wordpressPost(slug: { eq: $slug }) {
|
||||
title
|
||||
slug
|
||||
content
|
||||
author {
|
||||
name
|
||||
}
|
||||
date(formatString: "MMMM DD, YYYY")
|
||||
featured_media {
|
||||
source_url
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
//export const query = graphql`
|
||||
//query PostDefaultQuery($slug: String!) {
|
||||
//wordpressPost(slug: { eq: $slug }) {
|
||||
//title
|
||||
//slug
|
||||
//content
|
||||
//author {
|
||||
//name
|
||||
//}
|
||||
//date(formatString: "MMMM DD, YYYY")
|
||||
//featured_media {
|
||||
//source_url
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//`
|
||||
|
||||
export default PostDefault
|
||||
|
||||
Reference in New Issue
Block a user