feat(@projects/@magic-civilization): ✨ reorganize guide navigation into categories
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
aa109f0fdb
commit
2e2846a2ef
2 changed files with 65 additions and 23 deletions
|
|
@ -189,22 +189,57 @@ const CardIcon = styled.span`
|
||||||
|
|
||||||
// ─── Data ────────────────────────────────────────────────────────────────────
|
// ─── Data ────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
interface NavSection {
|
||||||
|
category: string
|
||||||
|
links: Array<{ icon: string; label: string; to: string }>
|
||||||
|
}
|
||||||
|
|
||||||
// Game 1 scope: no /magic/* routes exist in App.tsx. The Magic Schools /
|
// Game 1 scope: no /magic/* routes exist in App.tsx. The Magic Schools /
|
||||||
// Spells / Archons pages were purged during p2-09's scope-narrow pass.
|
// Spells / Archons pages were purged during p2-09's scope-narrow pass.
|
||||||
// Those entries were previously here and redirected to `/` via the wildcard
|
// Those entries were previously here and redirected to `/` via the wildcard
|
||||||
// catch-all route — a broken UX reported by the user. When Game 2/3 routes
|
// catch-all route — a broken UX reported by the user. When Game 2/3 routes
|
||||||
// return, add them back wrapped in an episode-gate filter so they only
|
// return, add them back wrapped in an episode-gate filter so they only
|
||||||
// render in the dev bundle (VITE_DEV_GUIDE=1). Tracked by p1-14.
|
// render in the dev bundle (VITE_DEV_GUIDE=1). Tracked by p1-14.
|
||||||
const SECTIONS = [
|
const GUIDE_SECTIONS: readonly NavSection[] = [
|
||||||
{ icon: '🗺', label: 'Terrain', to: '/map/terrain' },
|
{
|
||||||
{ icon: '💎', label: 'Resources', to: '/map/resources' },
|
category: 'The Map',
|
||||||
{ icon: '🧝', label: 'Races', to: '/empire/races' },
|
links: [
|
||||||
{ icon: '🏛', label: 'Government', to: '/empire/government' },
|
{ icon: '🗺', label: 'Terrain', to: '/map/terrain' },
|
||||||
{ icon: '🔬', label: 'Tech Tree', to: '/research/tech-tree' },
|
{ icon: '💎', label: 'Resources', to: '/map/resources' },
|
||||||
{ icon: '⚔', label: 'Units', to: '/military/units' },
|
],
|
||||||
{ icon: '🗡', label: 'Combat', to: '/military/combat' },
|
},
|
||||||
{ icon: '🏗', label: 'Buildings', to: '/buildings/buildings' },
|
{
|
||||||
{ icon: '🌍', label: 'Climate', to: '/climate' },
|
category: 'Empire',
|
||||||
|
links: [
|
||||||
|
{ icon: '🧝', label: 'Races', to: '/empire/races' },
|
||||||
|
{ icon: '🏛', label: 'Government', to: '/empire/government' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
category: 'Research',
|
||||||
|
links: [
|
||||||
|
{ icon: '🔬', label: 'Tech Tree', to: '/research/tech-tree' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
category: 'Military',
|
||||||
|
links: [
|
||||||
|
{ icon: '⚔', label: 'Units', to: '/military/units' },
|
||||||
|
{ icon: '🗡', label: 'Combat', to: '/military/combat' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
category: 'Building Your Empire',
|
||||||
|
links: [
|
||||||
|
{ icon: '🏗', label: 'Buildings', to: '/buildings/buildings' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
category: 'Climate & Survival',
|
||||||
|
links: [
|
||||||
|
{ icon: '🌍', label: 'Climate', to: '/climate' },
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// ─── Component ───────────────────────────────────────────────────────────────
|
// ─── Component ───────────────────────────────────────────────────────────────
|
||||||
|
|
@ -283,14 +318,19 @@ export default function HomePage(): ReactElement {
|
||||||
</FeatureGrid>
|
</FeatureGrid>
|
||||||
|
|
||||||
<SectionLabel>Explore the Guide</SectionLabel>
|
<SectionLabel>Explore the Guide</SectionLabel>
|
||||||
<CardGrid>
|
{GUIDE_SECTIONS.map((section) => (
|
||||||
{SECTIONS.map((s) => (
|
<div key={section.category}>
|
||||||
<CardLink key={s.to} to={s.to}>
|
<SectionLabel>{section.category}</SectionLabel>
|
||||||
<CardIcon>{s.icon}</CardIcon>
|
<CardGrid>
|
||||||
{s.label}
|
{section.links.map((link) => (
|
||||||
</CardLink>
|
<CardLink key={link.to} to={link.to}>
|
||||||
))}
|
<CardIcon>{link.icon}</CardIcon>
|
||||||
</CardGrid>
|
{link.label}
|
||||||
|
</CardLink>
|
||||||
|
))}
|
||||||
|
</CardGrid>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
<SectionLabel>About</SectionLabel>
|
<SectionLabel>About</SectionLabel>
|
||||||
<CardGrid>
|
<CardGrid>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# apricot-run.sh — Isolated build + batch pipeline on apricot.
|
# apricot-run.sh — Isolated build + batch pipeline on apricot.
|
||||||
#
|
#
|
||||||
# apricot is a multi-tenant RUN host. We do NOT touch ~/Code/@projects/@magic-civilization
|
# apricot is a multi-tenant RUN host. magic-civilization does NOT develop here —
|
||||||
# on apricot — that's another developer's workspace. Instead:
|
# any persistent checkouts live under ~/Code/project-buildspace/ and are excluded
|
||||||
|
# from the autocommit daemon (commits.service). This script keeps even further
|
||||||
|
# clear and uses ~/.cache/ for the per-run scratch + results:
|
||||||
#
|
#
|
||||||
# 1. Rsync this EDIT-host source tree to /tmp/mc-<stamp>/ on apricot.
|
# 1. Rsync this EDIT-host source tree to ~/.cache/mc-src-<stamp>/ on apricot.
|
||||||
# 2. Build (cargo) in /tmp/mc-<stamp>/, target dir stays there (ephemeral).
|
# 2. Build (cargo) in ~/.cache/mc-src-<stamp>/, target dir stays there (ephemeral).
|
||||||
# 3. Run the batch with RESULTS_DIR under $HOME/.cache/mc-batches/<stamp>/
|
# 3. Run the batch with RESULTS_DIR under ~/.cache/mc-batches/<stamp>/
|
||||||
# (persistent, XDG cache convention, flatpak-visible via --filesystem=home).
|
# (persistent, XDG cache convention, flatpak-visible via --filesystem=home).
|
||||||
# 4. Fetch verdict JSON back to EDIT host for review.
|
# 4. Fetch verdict JSON back to EDIT host for review.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue