The page layout is stripped for Game-Design/Concept-Mill the way the GameCult site strips it for Thing: only the Aetheria masthead survives, floating and compact. The selected ship's render fills the viewport, feathered into a dark field; the ship index unfolds from the top left and the technical readout from the bottom right, both collapsible. AetheriaConceptMill embeds the generated manifest and its inline script owns the selection: arrows step ships, up/down or [ ] step render rounds, Escape collapses the panels, M and R toggle them, swipe steps on touch, and the URL hash deep-links #ship/variant. Variants show their hypothesis, the lab's verdict and any operator verdict; the lab's pick is marked LAB PICK. On a phone the panels are bottom sheets over a dock. Motion is event-driven and dissolves only under prefers-reduced-motion. A vote slot stays hidden until votes are configured in ships.yaml. The page note keeps its frontmatter and one paragraph; the card styles it used are removed from custom.scss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.9 KiB
TypeScript
38 lines
1.9 KiB
TypeScript
import { QuartzComponent, QuartzComponentConstructor } from "./types"
|
|
import manifest from "./data/conceptMill.json"
|
|
// @ts-ignore
|
|
import script from "./scripts/aetheriaConceptMill.inline"
|
|
import style from "./styles/aetheriaConceptMill.scss"
|
|
|
|
// The Concept Mill: a fullscreen viewer for ship concept renders. The page
|
|
// layout is stripped for this slug (see quartz.layout.ts) so only the floating
|
|
// masthead survives. The manifest is generated by scripts/concept-mill/build.mjs
|
|
// and embedded here; the inline script renders the stage, menu and readout.
|
|
export const conceptMillSlug = "Game-Design/Concept-Mill"
|
|
export const isConceptMillPage = (slug: string | undefined) => slug === conceptMillSlug
|
|
|
|
export default (() => {
|
|
const AetheriaConceptMill: QuartzComponent = () => {
|
|
// Server render shows the first ship so the stage is never empty before
|
|
// the script runs; the script then honours the URL hash.
|
|
const first = manifest.ships[0]
|
|
const firstVariant = first.variants.find((v) => v.id === first.defaultVariant) ?? first.variants[0]
|
|
return (
|
|
<div class="cm" data-concept-mill>
|
|
<script type="application/json" class="cm-data" dangerouslySetInnerHTML={{ __html: JSON.stringify(manifest).replace(/</g, String.fromCharCode(92) + "u003c") }} />
|
|
<div class="cm-field" aria-hidden="true" />
|
|
<figure class="cm-stage">
|
|
<img class="cm-render is-live" src={firstVariant.image} alt={`Concept render of the ${first.name}`} />
|
|
<div class="cm-sweep" aria-hidden="true" />
|
|
</figure>
|
|
<noscript>
|
|
<p class="cm-noscript">The Concept Mill needs JavaScript. The renders and their prompt records are in /media/concept-mill/.</p>
|
|
</noscript>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
AetheriaConceptMill.css = style
|
|
AetheriaConceptMill.afterDOMLoaded = script
|
|
return AetheriaConceptMill
|
|
}) satisfies QuartzComponentConstructor
|