Skip to content

Update layout to include conf graphics #1223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/components/ConfLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from "react"
import { Link } from "gatsby"
import DocsSidebar from "../DocsSidebar"
import Marked from '../Marked'

interface Props {
title: string
heroText: string
nextDoc: any
permalink: string
sideBarData: any
rawMarkdownBody: string
pageContext: any
}

const Index = ({ title, heroText, nextDoc, sideBarData, rawMarkdownBody, pageContext }: Props) => {
return (
<section>
<div className="foundation conf">
<div className="foundation-hero">
<div className="foundation-hero-inner-content">
<img src="/img/graphql_conf-details-white.svg" alt="GraphQL Foundation logo" />
<div>{heroText}</div>
</div>
</div>
<div className="documentationContent">
<div className="inner-content">
<h1>{title}</h1>
<Marked pageContext={pageContext}>{rawMarkdownBody}</Marked>
{nextDoc?.frontmatter?.permalink && (
<Link className="read-next" to={nextDoc.frontmatter.permalink}>
<span className="read-next-continue">
Continue Reading &rarr;
</span>
<span className="read-next-title">
{nextDoc.frontmatter.title}
</span>
</Link>
)}
</div>
<DocsSidebar sideBarData={sideBarData} />
</div>
</div>
</section>
)
}

export default Index
2 changes: 1 addition & 1 deletion src/content/foundation/GraphQLConf.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: GraphQL Conf 2022
sidebarTitle: GraphQL Conf
heroText: The GraphQL Foundation-hosted event for spec and implementation contributors!
layout: foundation
layout: conf
category: GraphQL Foundation
permalink: /foundation/graphql-conf/
next: /foundation/community-grant/
Expand Down
2 changes: 2 additions & 0 deletions src/templates/doc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import FoundationLayout from "../components/FoundationLayout"
import BlogLayout from "../components/BlogLayout"
import CodeLayout from "../components/CodeLayout"
import FAQLayout from "../components/FAQLayout"
import ConfLayout from "../components/ConfLayout"

const layoutMap: Record<string, React.ComponentType<any>> = {
docs: DocsLayout,
foundation: FoundationLayout,
blog: BlogLayout,
code: CodeLayout,
faq: FAQLayout,
conf: ConfLayout,
}

const Blog = ({ data, pageContext }: PageProps<GatsbyTypes.DocTemplateQuery, GatsbyTypes.SitePageContext>) => {
Expand Down
Loading