Remove duplicate homepage nav and iconify socials

This commit is contained in:
Meta Vens 2026-04-21 20:57:57 +01:00
commit 660798ef85
4 changed files with 161 additions and 48 deletions

View file

@ -2,6 +2,47 @@
title: GameCult
enableToc: false
showCompositeJump: false
sidebarGroups:
- title: Studio
links:
- label: Open Source Model
slug: Open-Source-Model
- label: Contributing
slug: Contributing
- label: Democratizing Gamedev
slug: democratizing-gamedev
- label: A Place for Everyone
slug: a-place-for-everyone
- label: Games as a Service
slug: games-as-a-service
- label: The New Hotness
slug: the-new-hotness
- label: Labor Platform
slug: Docs/labor-platform
- title: Projects
links:
- label: Aetheria
slug: Aetheria/
- label: CultPong
slug: Projects/CultPong
- title: Writing
links:
- label: Hello, World!
slug: Blog/hello-world
- label: Rain
slug: Blog/rain
- label: When We Get Home
slug: Blog/when-we-get-home
- label: Cat and the Chocolate Factory
slug: Blog/cat-and-the-chocolate-factory/
- title: Docs
links:
- label: Publishing Workflow
slug: Docs/Publishing-Workflow
- label: Site Architecture
slug: Docs/Site-Architecture
- label: Labor Platform
slug: Docs/labor-platform
cssclasses:
- gamecult-composite-overview
compositeSections:
@ -86,31 +127,3 @@ The homepage pitch and the studio pitch were always the same argument in two dif
</div>
Below is the studio argument in full: how GameCult works, who it is for, and what sort of institution it is trying to become without immediately getting ruined by its own ambitions.
## Studio
- [Open Source Model](/Open-Source-Model)
- [Contributing](/Contributing)
- [Democratizing Gamedev](/democratizing-gamedev)
- [A Place for Everyone](/a-place-for-everyone)
- [Games as a Service](/games-as-a-service)
- [The New Hotness](/the-new-hotness)
- [Labor Platform](/Docs/labor-platform)
## Projects
- [Aetheria](/Aetheria/)
- [CultPong](/Projects/CultPong)
## Writing
- [Hello, World!](/Blog/hello-world)
- [Rain](/Blog/rain)
- [When We Get Home](/Blog/when-we-get-home)
- [Cat and the Chocolate Factory](/Blog/cat-and-the-chocolate-factory/)
## Docs
- [Publishing Workflow](/Docs/Publishing-Workflow)
- [Site Architecture](/Docs/Site-Architecture)
- [Labor Platform](/Docs/labor-platform)

View file

@ -11,6 +11,10 @@ type Route = {
type ExternalLink = {
label: string
href: string
icon: {
path: string
viewBox: string
}
}
const routes: Route[] = [
@ -53,10 +57,18 @@ const externalLinks: ExternalLink[] = [
{
label: "GitHub",
href: "https://github.com/GameCult",
icon: {
viewBox: "0 0 16 16",
path: "M8 0C3.58 0 0 3.58 0 8a8 8 0 0 0 5.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52 0-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8 8 0 0 0 16 8c0-4.42-3.58-8-8-8Z",
},
},
{
label: "Discord",
href: "https://discord.gg/SwaNeVJRSq",
icon: {
viewBox: "0 0 24 24",
path: "M20.317 4.369A19.79 19.79 0 0 0 15.885 3c-.191.336-.403.79-.551 1.146a18.27 18.27 0 0 0-5.667 0A11.64 11.64 0 0 0 9.115 3a19.736 19.736 0 0 0-4.432 1.369C1.882 8.553 1.123 12.636 1.503 16.662A19.91 19.91 0 0 0 6.327 19c.39-.53.739-1.09 1.04-1.675a12.62 12.62 0 0 1-1.636-.788c.138-.102.272-.208.402-.317 3.158 1.48 6.584 1.48 9.705 0 .131.109.265.215.402.317-.521.307-1.07.571-1.637.788.301.585.649 1.145 1.04 1.675a19.867 19.867 0 0 0 4.825-2.338c.446-4.667-.762-8.713-3.151-12.293ZM8.52 14.573c-.955 0-1.736-.87-1.736-1.939 0-1.069.762-1.939 1.736-1.939.983 0 1.755.879 1.736 1.939 0 1.069-.772 1.939-1.736 1.939Zm6.96 0c-.955 0-1.736-.87-1.736-1.939 0-1.069.762-1.939 1.736-1.939.983 0 1.755.879 1.736 1.939 0 1.069-.772 1.939-1.736 1.939Z",
},
},
]
@ -93,18 +105,6 @@ export default (() => {
<a href={resolveRelative(currentSlug, "index" as FullSlug)}>GameCult</a>
</p>
{tagline && <p class="gamecult-titlebar-tagline">{tagline}</p>}
<nav class="gamecult-titlebar-social" aria-label="GameCult community links">
{externalLinks.map((link) => (
<a
href={link.href}
class="gamecult-nav-chip"
target="_blank"
rel="noreferrer noopener"
>
{link.label}
</a>
))}
</nav>
</div>
<nav class="gamecult-titlebar-nav" aria-label="GameCult navigation">
{routes.map((route) => {
@ -118,6 +118,22 @@ export default (() => {
</a>
)
})}
<div class="gamecult-titlebar-community" aria-label="GameCult community links">
{externalLinks.map((link) => (
<a
href={link.href}
class="gamecult-nav-icon"
target="_blank"
rel="noreferrer noopener"
aria-label={link.label}
title={link.label}
>
<svg viewBox={link.icon.viewBox} aria-hidden="true">
<path d={link.icon.path} />
</svg>
</a>
))}
</div>
</nav>
</section>
)

View file

@ -27,6 +27,16 @@ export type GameCultPageContext = {
sidebar?: GameCultSidebarData
}
type FrontmatterSidebarLink = {
label?: unknown
slug?: unknown
}
type FrontmatterSidebarGroup = {
title?: unknown
links?: unknown
}
type ExtractedTagline = {
text: string
nodeIndex: number
@ -308,6 +318,59 @@ function extractOverviewGroups(root: Root, sourceSlug: FullSlug): GameCultSideba
return groups
}
function extractFrontmatterOverviewGroups(file: QuartzPluginData): GameCultSidebarGroup[] | undefined {
if (!file.slug || !Array.isArray(file.frontmatter?.sidebarGroups)) {
return undefined
}
const groups = (file.frontmatter.sidebarGroups as FrontmatterSidebarGroup[])
.map((rawGroup) => {
if (
typeof rawGroup !== "object" ||
rawGroup === null ||
typeof rawGroup.title !== "string" ||
!Array.isArray(rawGroup.links)
) {
return undefined
}
const links = (rawGroup.links as FrontmatterSidebarLink[])
.map((rawLink) => {
if (
typeof rawLink !== "object" ||
rawLink === null ||
typeof rawLink.label !== "string" ||
typeof rawLink.slug !== "string"
) {
return undefined
}
const slug = resolveGameCultReferenceSlug(file.slug as FullSlug, rawLink.slug)
if (!slug) {
return undefined
}
return {
label: rawLink.label,
slug,
}
})
.filter((link): link is GameCultSidebarLink => link !== undefined)
if (links.length === 0) {
return undefined
}
return {
title: rawGroup.title,
links,
}
})
.filter((group): group is GameCultSidebarGroup => group !== undefined)
return groups.length > 0 ? groups : undefined
}
function overviewCandidates(currentSlug: FullSlug, includeCurrent = true) {
if (currentSlug === "index") {
return includeCurrent ? (["index"] as FullSlug[]) : []
@ -354,13 +417,14 @@ function extractOverviewData(file: QuartzPluginData): GameCultSidebarData | unde
}
const tagline = extractTopTagline(file.htmlAst)
const frontmatterGroups = extractFrontmatterOverviewGroups(file)
return {
title: file.frontmatter?.title ?? "GameCult",
slug: file.slug,
tagline: tagline?.text,
summary: extractOverviewSummary(file.htmlAst, tagline),
groups: extractOverviewGroups(file.htmlAst, file.slug),
groups: frontmatterGroups ?? extractOverviewGroups(file.htmlAst, file.slug),
}
}

View file

@ -128,13 +128,6 @@ body {
gap: 0.18rem;
}
.gamecult-titlebar-social {
display: flex;
flex-wrap: wrap;
gap: 0.55rem;
margin-top: 0.35rem;
}
.gamecult-titlebar-title,
.gamecult-titlebar-title a {
margin: 0;
@ -163,6 +156,7 @@ body {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
align-items: center;
}
.gamecult-nav-chip {
@ -187,6 +181,32 @@ body {
color: #fff3e8;
}
.gamecult-titlebar-community {
display: flex;
align-items: center;
gap: 0.35rem;
margin-left: auto;
}
.gamecult-nav-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
color: rgba(220, 231, 246, 0.88);
}
.gamecult-nav-icon svg {
width: 1.08rem;
height: 1.08rem;
fill: currentColor;
}
.gamecult-nav-icon:hover {
color: #fff3e8;
}
.page > #quartz-body .center > .popover-hint {
margin-bottom: 1rem;
}