Skip to content

remove hero from Community pages #1648

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
Mar 28, 2024
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
Binary file removed public/img/community/contribute.png
Binary file not shown.
Binary file removed public/img/community/events.png
Binary file not shown.
Binary file removed public/img/community/resources.png
Binary file not shown.
3 changes: 0 additions & 3 deletions src/pages/_meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ export default {
href: "/community/contribute/essential-links",
},
},
theme: {
breadcrumb: false,
},
},
faq: {
type: "page",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/_meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
resources: "Community Resources",
resources: "Resources",
events: "",
contribute: "Contribute to GraphQL",
}
54 changes: 1 addition & 53 deletions theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
DocsThemeConfig,
ThemeSwitch,
useConfig,
Navbar,
} from "nextra-theme-docs"
import { DocsThemeConfig, ThemeSwitch, useConfig } from "nextra-theme-docs"
import NextLink from "next/link"
import {
GraphQLWordmarkLogo,
Expand Down Expand Up @@ -201,53 +196,6 @@ export default {
content: Footer,
},
navbar: {
component(props) {
const { frontMatter } = useConfig()
let { asPath } = useRouter()

if (asPath.startsWith("/community/resources/")) asPath = "/community/"
if (asPath.startsWith("/community/contribute/"))
asPath = "/community/contribute/"
if (asPath === "/community/") {
frontMatter.title = "Community Resources"
frontMatter.description =
"The GraphQL community is worldwide, and includes developers, users, supporters, and fans from around the globe. You are welcome to join us! If you're new to the community, here are a few things to get you started."
}
if (asPath === "/community/contribute/") {
frontMatter.title = "Contribute to GraphQL"
frontMatter.description =
"The following resources describe how GraphQL development processes work, how to get involved, and where to get help."
}

return (
<>
<Navbar {...props} />
{asPath.startsWith("/community/") && (
<div className="code-page lg:min-h-96 lg:max-h-96 relative overflow-hidden">
<div className="container conf-block relative z-10">
<h1 className="text-7xl font-extrabold mb-10">
{frontMatter.title}
</h1>
<p className="text-2xl/[2.375rem] text-balance lg:w-2/3">
{frontMatter.description}
</p>
</div>
<img
src={
{
"/community/": "/img/community/resources.png",
"/community/events/": "/img/community/events.png",
"/community/contribute/": "/img/community/contribute.png",
}[asPath]
}
alt="Figure"
className="max-xl:hidden select-none absolute right-0 top-0 h-full -translate-x-1/4 scale-125"
/>
</div>
)}
</>
)
},
extraContent: <ThemeSwitch lite className="[&_span]:hidden" />,
},
toc: {
Expand Down