Commit 85ed3f36 authored by Afzaal Ahmad Zeeshan's avatar Afzaal Ahmad Zeeshan 😴

Added a couple of extra pages.

parent 64c13ae3
Pipeline #107392028 passed with stages
in 3 minutes and 5 seconds
import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm } from "../utils/typography"
class AwardsPage extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
const posts = data.allMarkdownRemark.edges
return (
<Layout location={this.props.location} title={siteTitle}>
<SEO title="Homepage" description="This website contains blogs, articles, tip/tricks and other content that I have worked on." />
<Bio />
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.fields.slug
return (
<article key={node.fields.slug}>
<header>
<h3 style={{marginBottom: rhythm(1 / 4),}}>
<Link style={{ boxShadow: `none` }} to={node.fields.slug}>
{title}
</Link>
</h3>
<small>{node.frontmatter.date}</small>
</header>
<section>
<p dangerouslySetInnerHTML={{__html: node.frontmatter.description || node.excerpt,}}/>
</section>
</article>
)
})}
</Layout>
)
}
}
export default AwardsPage
export const pageQuery = graphql`
query {
site {
siteMetadata {
title
}
}
allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC },
) {
edges {
node {
excerpt
fields {
slug
}
frontmatter {
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
}
}
`
import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm } from "../utils/typography"
class BlogIndex extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
const posts = data.allMarkdownRemark.edges
return (
<Layout location={this.props.location} title={siteTitle}>
<SEO title="Homepage" description="This website contains blogs, articles, tip/tricks and other content that I have worked on." />
<Bio />
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.fields.slug
return (
<article key={node.fields.slug}>
<header>
<h3 style={{marginBottom: rhythm(1 / 4),}}>
<Link style={{ boxShadow: `none` }} to={node.fields.slug}>
{title}
</Link>
</h3>
<small>{node.frontmatter.date}</small>
</header>
<section>
<p dangerouslySetInnerHTML={{__html: node.frontmatter.description || node.excerpt,}}/>
</section>
</article>
)
})}
</Layout>
)
}
}
export default BlogIndex
export const pageQuery = graphql`
query {
site {
siteMetadata {
title
}
}
allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC },
) {
edges {
node {
excerpt
fields {
slug
}
frontmatter {
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
}
}
`
import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm } from "../utils/typography"
class BlogsList extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
const posts = data.blogs.edges
return (
<Layout location={this.props.location} title={siteTitle}>
<SEO title="Homepage" description="This website contains blogs, articles, tip/tricks and other content that I have worked on." />
<Bio />
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.fields.slug
return (
<article key={node.fields.slug}>
<header>
<h3 style={{marginBottom: rhythm(1 / 4),}}>
<Link style={{ boxShadow: `none` }} to={node.fields.slug}>
{title}
</Link>
</h3>
<small>{node.frontmatter.date}</small>
</header>
<section>
<p dangerouslySetInnerHTML={{__html: node.frontmatter.description || node.excerpt,}}/>
</section>
</article>
)
})}
</Layout>
)
}
}
export default BlogsList
export const pageQuery = graphql`
query {
site {
siteMetadata {
title
}
}
blogs: allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC },
) {
edges {
node {
excerpt
fields {
slug
}
frontmatter {
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
}
}
`
......@@ -50,7 +50,7 @@ export const pageQuery = graphql`
}
allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC }
sort: { fields: [frontmatter___date], order: DESC },
) {
edges {
node {
......
import React from "react"
import { Link, graphql } from "gatsby"
import Bio from "../components/bio"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { rhythm } from "../utils/typography"
class PublicationsPage extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
const posts = data.allMarkdownRemark.edges
return (
<Layout location={this.props.location} title={siteTitle}>
<SEO title="Homepage" description="This website contains blogs, articles, tip/tricks and other content that I have worked on." />
<Bio />
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.fields.slug
return (
<article key={node.fields.slug}>
<header>
<h3 style={{marginBottom: rhythm(1 / 4),}}>
<Link style={{ boxShadow: `none` }} to={node.fields.slug}>
{title}
</Link>
</h3>
<small>{node.frontmatter.date}</small>
</header>
<section>
<p dangerouslySetInnerHTML={{__html: node.frontmatter.description || node.excerpt,}}/>
</section>
</article>
)
})}
</Layout>
)
}
}
export default PublicationsPage
export const pageQuery = graphql`
query {
site {
siteMetadata {
title
}
}
allMarkdownRemark(
filter: { frontmatter: { published: { eq: true } } },
sort: { fields: [frontmatter___date], order: DESC },
) {
edges {
node {
excerpt
fields {
slug
}
frontmatter {
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
}
}
`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment