From 44342b32157e62b1293c6ef1c7f91007cfa2a0d5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 4 Apr 2022 17:51:20 -0400 Subject: [PATCH] Update layout to include conf graphics Signed-off-by: Brian Warner --- src/components/ConfLayout/index.tsx | 48 +++++ src/content/foundation/GraphQLConf.md | 2 +- src/templates/doc.tsx | 2 + static/img/graphql_conf-details-white.svg | 223 ++++++++++++++++++++++ static/img/graphql_conf-details.svg | 210 ++++++++++++++++++++ 5 files changed, 484 insertions(+), 1 deletion(-) create mode 100644 src/components/ConfLayout/index.tsx create mode 100644 static/img/graphql_conf-details-white.svg create mode 100644 static/img/graphql_conf-details.svg diff --git a/src/components/ConfLayout/index.tsx b/src/components/ConfLayout/index.tsx new file mode 100644 index 0000000000..9864cf953e --- /dev/null +++ b/src/components/ConfLayout/index.tsx @@ -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 ( +
+
+
+
+ GraphQL Foundation logo +
{heroText}
+
+
+
+
+

{title}

+ {rawMarkdownBody} + {nextDoc?.frontmatter?.permalink && ( + + + Continue Reading → + + + {nextDoc.frontmatter.title} + + + )} +
+ +
+
+
+ ) +} + +export default Index diff --git a/src/content/foundation/GraphQLConf.md b/src/content/foundation/GraphQLConf.md index cba9f503e9..f0f3ac88b3 100644 --- a/src/content/foundation/GraphQLConf.md +++ b/src/content/foundation/GraphQLConf.md @@ -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/ diff --git a/src/templates/doc.tsx b/src/templates/doc.tsx index 1b327228df..c1cfa19da6 100644 --- a/src/templates/doc.tsx +++ b/src/templates/doc.tsx @@ -7,6 +7,7 @@ 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> = { docs: DocsLayout, @@ -14,6 +15,7 @@ const layoutMap: Record> = { blog: BlogLayout, code: CodeLayout, faq: FAQLayout, + conf: ConfLayout, } const Blog = ({ data, pageContext }: PageProps) => { diff --git a/static/img/graphql_conf-details-white.svg b/static/img/graphql_conf-details-white.svg new file mode 100644 index 0000000000..ba59ed770a --- /dev/null +++ b/static/img/graphql_conf-details-white.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/graphql_conf-details.svg b/static/img/graphql_conf-details.svg new file mode 100644 index 0000000000..5dc175f061 --- /dev/null +++ b/static/img/graphql_conf-details.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +