Merge pull request 'Hero editor: fullscreen landing, remove two-card row, quick links into hero' (#28) from feature/hero-fullscreen-landing into main
Reviewed-on: UOM/website#28 Reviewed-by: Colby Whitlock <whitlocktech@gmail.com>
This commit is contained in:
@@ -84,6 +84,25 @@ export function defaultLayout(teaser) {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'default-quick-links',
|
||||||
|
type: 'buttons',
|
||||||
|
x: 50,
|
||||||
|
y: 85,
|
||||||
|
z: 3,
|
||||||
|
anchor: 'center',
|
||||||
|
props: {
|
||||||
|
align: 'center',
|
||||||
|
gap: 10,
|
||||||
|
items: [
|
||||||
|
{ label: 'News', to: '/site/news', variant: 'ghost' },
|
||||||
|
{ label: 'Screenshots', to: '/site/screenshots', variant: 'ghost' },
|
||||||
|
{ label: 'Five on Friday', to: '/site/five-on-friday', variant: 'ghost' },
|
||||||
|
{ label: 'Monthly Newsletter', to: '/site/newsletter', variant: 'ghost' },
|
||||||
|
{ label: 'About', to: '/site/about', variant: 'ghost' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +1,10 @@
|
|||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
|
||||||
import PublicLayout from '../../components/PublicLayout.jsx'
|
import PublicLayout from '../../components/PublicLayout.jsx'
|
||||||
import HeroElement from '../../components/HeroElement.jsx'
|
import HeroElement from '../../components/HeroElement.jsx'
|
||||||
import { useSite } from '../../contexts/SiteContext.jsx'
|
import { useSite } from '../../contexts/SiteContext.jsx'
|
||||||
import { api } from '../../api/client.js'
|
import { api } from '../../api/client.js'
|
||||||
import { defaultLayout, parseLayout, heroBackground } from '../../lib/heroLayout.js'
|
import { defaultLayout, parseLayout, heroBackground } from '../../lib/heroLayout.js'
|
||||||
|
|
||||||
const QUICK = [
|
|
||||||
{ label: 'News', to: '/site/news' },
|
|
||||||
{ label: 'Screenshots', to: '/site/screenshots' },
|
|
||||||
{ label: 'Five on Friday', to: '/site/five-on-friday' },
|
|
||||||
{ label: 'Monthly Newsletter', to: '/site/newsletter' },
|
|
||||||
{ label: 'About', to: '/site/about' },
|
|
||||||
]
|
|
||||||
|
|
||||||
const DESTINATIONS = [
|
|
||||||
{
|
|
||||||
kicker: 'Public portal',
|
|
||||||
title: 'Mysticmoon Website',
|
|
||||||
body: 'Updates, screenshots, newsletters, and weekly community posts from the shard.',
|
|
||||||
to: '/site',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
kicker: 'Knowledge base',
|
|
||||||
title: 'Mysticmoon Wiki',
|
|
||||||
body: 'Guides, maps, systems, items, monsters, crafting, lore, and rules.',
|
|
||||||
to: '/wiki',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
// Admin "Preview" opens the portal with ?preview=1 to render the unpublished draft.
|
// Admin "Preview" opens the portal with ?preview=1 to render the unpublished draft.
|
||||||
const PREVIEW = typeof window !== 'undefined' && new URLSearchParams(window.location.search).get('preview') === '1'
|
const PREVIEW = typeof window !== 'undefined' && new URLSearchParams(window.location.search).get('preview') === '1'
|
||||||
|
|
||||||
@@ -77,8 +53,8 @@ export default function Portal() {
|
|||||||
<section
|
<section
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
minHeight: 'clamp(600px,72vh,860px)',
|
flex: 1,
|
||||||
overflow: 'hidden',
|
minHeight: '100vh',
|
||||||
...bgStyle,
|
...bgStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -88,35 +64,6 @@ export default function Portal() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div className="shell" style={{ padding: '56px 0 12px' }}>
|
|
||||||
<nav className="grid-2" aria-label="Main destinations">
|
|
||||||
{DESTINATIONS.map((d) => (
|
|
||||||
<Link key={d.to} to={d.to} className="card" style={{ padding: 30 }}>
|
|
||||||
<span className="card-kicker" style={{ letterSpacing: '0.16em', marginBottom: 14 }}>
|
|
||||||
{d.kicker}
|
|
||||||
</span>
|
|
||||||
<strong
|
|
||||||
className="display"
|
|
||||||
style={{ fontSize: '1.7rem', color: 'var(--head)', marginBottom: 10, fontWeight: 600 }}
|
|
||||||
>
|
|
||||||
{d.title}
|
|
||||||
</strong>
|
|
||||||
<span className="muted">{d.body}</span>
|
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="shell" style={{ padding: '24px 0 64px' }}>
|
|
||||||
<nav style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: 10 }} aria-label="Quick links">
|
|
||||||
{QUICK.map((q) => (
|
|
||||||
<Link key={q.to} to={q.to} className="pill">
|
|
||||||
{q.label}
|
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
</PublicLayout>
|
</PublicLayout>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user