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
44 changes: 44 additions & 0 deletions src/constants/candidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,50 @@ export const CANDIDATES_EXTRA_IDEAS: CandidateIdea[] = [

// Drop live tournament moments here as PGN or FEN during the event.
export const CANDIDATES_FEATURED_POSITIONS: CandidatePosition[] = [
{
id: 'rd3-convert-fabi-win',
title: "Rd3 Challenge 1: Convert Fabi's Win",
subtitle:
"Black resigned here, but could you convert White's win if you had to?",
summary:
"Caruana's position is winning, but Black is still to move. Play White and convert it.",
tag: 'Featured',
accent: 'red',
fen: '3q1rk1/p3ppb1/6pp/4r3/6P1/1Q5b/PP1PPP1P/R1BNK1R1 b Q - 1 19',
playerColor: 'white',
maiaVersion: 'maia_kdd_1900',
targetMoveNumber: 8,
},
{
id: 'rd3-take-down-pragg',
title: 'Rd3 Challenge 2: Take Down Pragg',
subtitle: 'Can you crash through like Sindarov did against Pragg?',
summary:
'Sindarov broke through against Praggnanandhaa. Black to move and press the attack.',
tag: 'Featured',
accent: 'amber',
fen: 'r1br2k1/pp2q1pp/8/2b2p2/2P1p3/2Q1P1N1/2BNR1PP/R1K5 b - - 7 24',
playerColor: 'black',
maiaVersion: 'maia_kdd_1900',
targetMoveNumber: 8,
},
{
id: 'rd3-bibisara-attack',
title: "Rd3 Challenge 3: Bibisara's Attack",
subtitle:
'Bibisara navigated the complications to take the full point. Try to win with Black!',
summary:
'A sharp attacking position for Black. Navigate the complications and win.',
tag: 'Featured',
accent: 'blue',
fen: '2rqkb2/1p2pp2/p6p/n2PB3/2P3r1/Pp2R3/2bN1PP1/R1Q2BK1 b - - 4 22',
playerColor: 'black',
maiaVersion: 'maia_kdd_1900',
targetMoveNumber: 8,
},
]

export const CANDIDATES_ROUND_TWO_POSITIONS: CandidatePosition[] = [
{
id: 'rd2-defend-like-hikaru',
title: 'Rd2 Challenge 1: Defend like Hikaru',
Expand Down
35 changes: 30 additions & 5 deletions src/pages/candidates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useEffect, useMemo, useState } from 'react'

import {
CANDIDATES_FEATURED_POSITIONS,
CANDIDATES_ROUND_TWO_POSITIONS,
CANDIDATES_WARMUP_POSITIONS,
CandidatePosition,
} from 'src/constants/candidates'
Expand Down Expand Up @@ -115,7 +116,8 @@ const PositionBoard: React.FC<{
const PositionPill: React.FC<{
position: CandidatePosition
completed?: boolean
}> = ({ position, completed = false }) => {
compactTitle?: boolean
}> = ({ position, completed = false, compactTitle = false }) => {
const playHref = buildPositionPlayLink({
...position,
challengeId: position.id,
Expand All @@ -131,8 +133,18 @@ const PositionPill: React.FC<{
}`}
>
<div className="flex h-full flex-col gap-4">
<div className="min-w-0 xl:min-h-[150px]">
<h2 className="h-[3rem] overflow-hidden text-lg font-semibold leading-[1.5rem] text-primary md:h-[3.5rem] md:text-xl md:leading-[1.75rem]">
<div
className={`min-w-0 ${
compactTitle ? 'xl:min-h-[132px]' : 'xl:min-h-[150px]'
}`}
>
<h2
className={`overflow-hidden text-lg font-semibold text-primary md:text-xl ${
compactTitle
? 'h-[1.5rem] leading-[1.5rem] md:h-[1.75rem] md:leading-[1.75rem]'
: 'h-[3rem] leading-[1.5rem] md:h-[3.5rem] md:leading-[1.75rem]'
}`}
>
{position.title}
</h2>
<p className="mt-2 text-sm leading-6 text-white/65">
Expand Down Expand Up @@ -244,7 +256,7 @@ export default function CandidatesPage() {
FIDE Candidates Tournament 2026
</h1>
<p className="mt-2 text-sm uppercase tracking-[0.2em] text-white/45">
Round 2
Round 3
</p>
<div className="mt-4 flex flex-wrap gap-3">
<Link
Expand All @@ -269,8 +281,21 @@ export default function CandidatesPage() {
</header>
{CANDIDATES_FEATURED_POSITIONS.length > 0 ? (
<>
<ChallengeSectionTitle title="Round 2 Challenges" />
<ChallengeSectionTitle title="Round 3 Challenges" />
{CANDIDATES_FEATURED_POSITIONS.map((position) => (
<PositionPill
key={position.id}
position={position}
completed={completedChallengeIds.includes(position.id)}
compactTitle
/>
))}
</>
) : null}
{CANDIDATES_ROUND_TWO_POSITIONS.length > 0 ? (
<>
<ChallengeSectionTitle title="Round 2 Challenges" />
{CANDIDATES_ROUND_TWO_POSITIONS.map((position) => (
<PositionPill
key={position.id}
position={position}
Expand Down
Loading