Skip to content

Commit 44342b3

Browse files
committed
Update layout to include conf graphics
Signed-off-by: Brian Warner <[email protected]>
1 parent 9fafe63 commit 44342b3

File tree

5 files changed

+484
-1
lines changed

5 files changed

+484
-1
lines changed

src/components/ConfLayout/index.tsx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import React from "react"
2+
import { Link } from "gatsby"
3+
import DocsSidebar from "../DocsSidebar"
4+
import Marked from '../Marked'
5+
6+
interface Props {
7+
title: string
8+
heroText: string
9+
nextDoc: any
10+
permalink: string
11+
sideBarData: any
12+
rawMarkdownBody: string
13+
pageContext: any
14+
}
15+
16+
const Index = ({ title, heroText, nextDoc, sideBarData, rawMarkdownBody, pageContext }: Props) => {
17+
return (
18+
<section>
19+
<div className="foundation conf">
20+
<div className="foundation-hero">
21+
<div className="foundation-hero-inner-content">
22+
<img src="/img/graphql_conf-details-white.svg" alt="GraphQL Foundation logo" />
23+
<div>{heroText}</div>
24+
</div>
25+
</div>
26+
<div className="documentationContent">
27+
<div className="inner-content">
28+
<h1>{title}</h1>
29+
<Marked pageContext={pageContext}>{rawMarkdownBody}</Marked>
30+
{nextDoc?.frontmatter?.permalink && (
31+
<Link className="read-next" to={nextDoc.frontmatter.permalink}>
32+
<span className="read-next-continue">
33+
Continue Reading &rarr;
34+
</span>
35+
<span className="read-next-title">
36+
{nextDoc.frontmatter.title}
37+
</span>
38+
</Link>
39+
)}
40+
</div>
41+
<DocsSidebar sideBarData={sideBarData} />
42+
</div>
43+
</div>
44+
</section>
45+
)
46+
}
47+
48+
export default Index

src/content/foundation/GraphQLConf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: GraphQL Conf 2022
33
sidebarTitle: GraphQL Conf
44
heroText: The GraphQL Foundation-hosted event for spec and implementation contributors!
5-
layout: foundation
5+
layout: conf
66
category: GraphQL Foundation
77
permalink: /foundation/graphql-conf/
88
next: /foundation/community-grant/

src/templates/doc.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import FoundationLayout from "../components/FoundationLayout"
77
import BlogLayout from "../components/BlogLayout"
88
import CodeLayout from "../components/CodeLayout"
99
import FAQLayout from "../components/FAQLayout"
10+
import ConfLayout from "../components/ConfLayout"
1011

1112
const layoutMap: Record<string, React.ComponentType<any>> = {
1213
docs: DocsLayout,
1314
foundation: FoundationLayout,
1415
blog: BlogLayout,
1516
code: CodeLayout,
1617
faq: FAQLayout,
18+
conf: ConfLayout,
1719
}
1820

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

0 commit comments

Comments
 (0)