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 ────────────────────────────────────────────────────────────────────
|
||||
|
||||
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 /
|
||||
// Spells / Archons pages were purged during p2-09's scope-narrow pass.
|
||||
// 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
|
||||
// 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.
|
||||
const SECTIONS = [
|
||||
{ icon: '🗺', label: 'Terrain', to: '/map/terrain' },
|
||||
{ icon: '💎', label: 'Resources', to: '/map/resources' },
|
||||
{ icon: '🧝', label: 'Races', to: '/empire/races' },
|
||||
{ icon: '🏛', label: 'Government', to: '/empire/government' },
|
||||
{ icon: '🔬', label: 'Tech Tree', to: '/research/tech-tree' },
|
||||
{ icon: '⚔', label: 'Units', to: '/military/units' },
|
||||
{ icon: '🗡', label: 'Combat', to: '/military/combat' },
|
||||
{ icon: '🏗', label: 'Buildings', to: '/buildings/buildings' },
|
||||
{ icon: '🌍', label: 'Climate', to: '/climate' },
|
||||
const GUIDE_SECTIONS: readonly NavSection[] = [
|
||||
{
|
||||
category: 'The Map',
|
||||
links: [
|
||||
{ icon: '🗺', label: 'Terrain', to: '/map/terrain' },
|
||||
{ icon: '💎', label: 'Resources', to: '/map/resources' },
|
||||
],
|
||||
},
|
||||
{
|
||||
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 ───────────────────────────────────────────────────────────────
|
||||
|
|
@ -283,14 +318,19 @@ export default function HomePage(): ReactElement {
|
|||
</FeatureGrid>
|
||||
|
||||
<SectionLabel>Explore the Guide</SectionLabel>
|
||||
<CardGrid>
|
||||
{SECTIONS.map((s) => (
|
||||
<CardLink key={s.to} to={s.to}>
|
||||
<CardIcon>{s.icon}</CardIcon>
|
||||
{s.label}
|
||||
</CardLink>
|
||||
))}
|
||||
</CardGrid>
|
||||
{GUIDE_SECTIONS.map((section) => (
|
||||
<div key={section.category}>
|
||||
<SectionLabel>{section.category}</SectionLabel>
|
||||
<CardGrid>
|
||||
{section.links.map((link) => (
|
||||
<CardLink key={link.to} to={link.to}>
|
||||
<CardIcon>{link.icon}</CardIcon>
|
||||
{link.label}
|
||||
</CardLink>
|
||||
))}
|
||||
</CardGrid>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<SectionLabel>About</SectionLabel>
|
||||
<CardGrid>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
# apricot-run.sh — Isolated build + batch pipeline on apricot.
|
||||
#
|
||||
# apricot is a multi-tenant RUN host. We do NOT touch ~/Code/@projects/@magic-civilization
|
||||
# on apricot — that's another developer's workspace. Instead:
|
||||
# apricot is a multi-tenant RUN host. magic-civilization does NOT develop here —
|
||||
# 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.
|
||||
# 2. Build (cargo) in /tmp/mc-<stamp>/, target dir stays there (ephemeral).
|
||||
# 3. Run the batch with RESULTS_DIR under $HOME/.cache/mc-batches/<stamp>/
|
||||
# 1. Rsync this EDIT-host source tree to ~/.cache/mc-src-<stamp>/ on apricot.
|
||||
# 2. Build (cargo) in ~/.cache/mc-src-<stamp>/, target dir stays there (ephemeral).
|
||||
# 3. Run the batch with RESULTS_DIR under ~/.cache/mc-batches/<stamp>/
|
||||
# (persistent, XDG cache convention, flatpak-visible via --filesystem=home).
|
||||
# 4. Fetch verdict JSON back to EDIT host for review.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue