Page features: directory and blog post tabs, image converter, version names
- Featured event badge: above the event's card from lg up, left out on phones - Version names from the tag (The Region Cards Update) in the site and admin footers - Tools -> Image converter (JPG, PNG, WebP in the browser) and Download as in Media - People directory sections take several tags, a tab each (migration 078) - Tab blocks split a blog post into tabs; contents follow the open tab (migration 079) - The side nav sun fades out as the page scrolls into the footer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a6c66d4607
commit
31afa889d6
28 changed files with 878 additions and 70 deletions
|
|
@ -63,10 +63,13 @@ export default function ContentBlocks({
|
|||
accent = BRAND,
|
||||
className = '',
|
||||
presentAt,
|
||||
anchorPrefix = '',
|
||||
}: {
|
||||
blocks?: ContentBlock[] | null
|
||||
accent?: string
|
||||
className?: string
|
||||
/** Put before each heading's id: a blog post's tab (contents.ts, splitTabs). */
|
||||
anchorPrefix?: string
|
||||
/** An event page's presentation route: each schedule gets a Present
|
||||
* button to it, `?block=<n>` naming which schedule (from 0). */
|
||||
presentAt?: string
|
||||
|
|
@ -74,7 +77,7 @@ export default function ContentBlocks({
|
|||
if (!blocks?.length) return null
|
||||
// Headings get ids so a post's contents (PostContents) and a shared
|
||||
// link (#getting-there) can point at them.
|
||||
const { idAt } = headingAnchors(blocks)
|
||||
const { idAt } = headingAnchors(blocks, anchorPrefix)
|
||||
// The heading level a block's own headings take: under the last
|
||||
// heading (h3) or subheading (h4) before it, else the section's h2.
|
||||
let under = 2
|
||||
|
|
@ -182,6 +185,9 @@ function Block({
|
|||
const reading = useReadingMode()
|
||||
|
||||
switch (block.type) {
|
||||
// A blog post's tab marker (BlogPost.tsx splits the post at
|
||||
// them); anywhere else, it reads as a heading.
|
||||
case 'tab':
|
||||
case 'heading':
|
||||
return (
|
||||
<h3 id={anchor} className="text-2xl font-bold" style={{ color: accentText(accent) }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue