Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions app/consciousness/components/Figure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,19 @@ function SetArt({
className={cn('object-cover', phone && 'hidden tablet:block')}
/>
)}
{/* The phone still was drawn at 390 × 844, its art sized from the
width (`phoneArt`), so it keeps that shape at the top rather than
stretching to the hero's height, and lines up with the live figure. */}
{phone && (
<Image
src={`${base}-phone.webp`}
alt=""
fill
sizes="100vw"
className="object-cover object-top tablet:hidden"
/>
<div className="absolute inset-x-0 top-0 aspect-[390/844] tablet:hidden">
<Image
src={`${base}-phone.webp`}
alt=""
fill
sizes="100vw"
className="object-cover object-top"
/>
</div>
)}
<LiveLayer set={set} fig={fig} hero={hero} />
</>
Expand Down
27 changes: 15 additions & 12 deletions app/consciousness/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,29 @@ import { SET_INFO } from '../sets/registry';
import { DEFAULT_HERO, HERO_INFO, type HeroId } from '../sets/heroes';
import { HeroFigure } from './Figure';
import { AddToPoolButton, SubmitProposalButton } from './OrchActions';
import { RfpMenu } from './RfpMenu';
import { BackButton } from './BackButton';
import { HeroPhase } from './HeroPhase';
import { daysLeft } from './PoolPanel';
import type { RfpView } from '../data/rfp';
import type { Work } from '@/types/work';
import type { WorkMetadata } from '@/services/metadata.service';

/**
* A quiet "Talk to us" link beside the hero's buttons, pointing to the Talk
* to us section. On trial (Kobe, 2026-11-17): set to false to remove it.
*/
const SHOW_TALK_LINK = false;

/** The hero's two buttons on phones: sharing one row, back to `lg` from tablet up. */
const PHONE_CTA =
'flex-auto px-3 text-[13.5px] !gap-1.5 min-[380px]:text-[14px] tablet:flex-none tablet:px-6 tablet:text-[15px] tablet:!gap-2';

export function Hero({
set = 'ink',
hero = DEFAULT_HERO,
rfp,
work = null,
metadata = null,
}: {
set?: SetId;
hero?: HeroId;
rfp: RfpView;
work?: Work | null;
metadata?: WorkMetadata | null;
}) {
const words = SET_INFO[set].words;

Expand Down Expand Up @@ -65,7 +62,11 @@ export function Hero({
</a>
</header>

<div className="relative z-10 mt-auto px-5 pb-12 pt-[40svh] tablet:my-auto tablet:w-[min(760px,62%)] tablet:px-10 tablet:py-24 content-lg:px-16">
{/* On phones the figure takes the top 40% of min(hero height, 2.16 ×
width) (`phoneArt` in sets/poster/heroKit.ts), so the text starts at
least that far down: 40svh alone puts the headline on the figure
wherever the browser's bars make the viewport short. */}
<div className="relative z-10 mt-auto px-5 pb-12 pt-[max(40svh,min(86.4vw,380px))] tablet:my-auto tablet:w-[min(760px,62%)] tablet:px-10 tablet:py-24 content-lg:px-16">
<h1
id="orch-title"
className="o-rise o-serif max-w-[11em] text-balance text-[clamp(34px,4.4vw,64px)] leading-[1.02]"
Expand All @@ -79,10 +80,12 @@ export function Hero({
</p>

<div data-orch-hero-cta className="o-rise mt-7 flex flex-wrap gap-3">
<AddToPoolButton size="lg" />
<SubmitProposalButton size="lg" />
<div className="flex gap-2 tablet:ml-1">
<RfpMenu work={work} metadata={metadata} />
{/* Side by side on phones too: tighter type and padding so both
fit in one row at 360px. No Share, Save or More here (Kobe,
2026-11-17): the RFP page keeps them. */}
<div className="flex w-full gap-2 tablet:w-auto tablet:gap-3">
<AddToPoolButton size="lg" className={PHONE_CTA} />
<SubmitProposalButton size="lg" className={PHONE_CTA} />
</div>
{SHOW_TALK_LINK && (
<a
Expand Down
155 changes: 0 additions & 155 deletions app/consciousness/components/RfpMenu.tsx

This file was deleted.

24 changes: 6 additions & 18 deletions app/consciousness/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ import { parseHero } from './sets/heroes';
import { rfpPostId, rfpView } from './data/rfp';
import { LiveRfpActions } from './components/LiveRfpActions';
import { PostService } from '@/services/post.service';
import { MetadataService, type WorkMetadata } from '@/services/metadata.service';
import type { Work } from '@/types/work';

/**
* The RFP's post and metadata, the same two requests the RFP page's layout
* makes (`app/rfp/[id]/[slug]/layout.tsx`), for the post `rfpPostId` picks
* in this environment. Null when there is none or the post fails to load
* (a pending RFP is not public yet); the page then shows an empty pool that
* opens soon. Metadata only feeds the More menu, so failing it alone keeps
* the post.
* The RFP's post, as the RFP page's layout loads it
* (`app/rfp/[id]/[slug]/layout.tsx`), for the post `rfpPostId` picks in this
* environment. Null when there is none or the post fails to load (a pending
* RFP is not public yet); the page then shows an empty pool that opens soon.
*/
async function loadRfp(preview: string | string[] | undefined) {
const postId = rfpPostId(preview);
Expand All @@ -36,10 +33,7 @@ async function loadRfp(preview: string | string[] | undefined) {
const work: Work = await PostService.get(String(postId));
const grant = work.note?.post?.grant;
if (!grant?.id) return null;
const metadata: WorkMetadata | null = await MetadataService.get(
work.unifiedDocumentId?.toString() || ''
).catch(() => null);
return { work, grant, metadata };
return { work, grant };
} catch {
return null;
}
Expand Down Expand Up @@ -70,13 +64,7 @@ export default async function OrchOrPage({
const rfp = rfpView(live?.work ?? null);
const page = (
<>
<Hero
set={set}
hero={hero}
rfp={rfp}
work={live?.work ?? null}
metadata={live?.metadata ?? null}
/>
<Hero set={set} hero={hero} rfp={rfp} />
<Claim />
<Timeline />
<Questions set={set} />
Expand Down