@@ -125,7 +125,6 @@ const getSanForMove = (move: string | number | undefined) => {
125125 return move ?. toString ( ) ?? ''
126126}
127127
128- // Simplified MovesByRating component
129128export const SimplifiedMovesByRating = ( ) => {
130129 return (
131130 < div className = "flex h-64 w-full flex-col rounded bg-background-1/60 md:h-full" >
@@ -415,8 +414,8 @@ export const SimplifiedMoveMap = () => {
415414
416415export const SimplifiedBlunderMeter = ( ) => {
417416 return (
418- < div className = "flex w-full flex-col gap-2 overflow-hidden rounded bg-background-1/60 p-3" >
419- < div className = "flex h-8 w-full flex-col overflow-hidden" >
417+ < div className = "flex w-full flex-col gap-1 overflow-hidden rounded bg-background-1/60 p-3" >
418+ < div className = "flex h-6 w-full flex-col overflow-hidden" >
420419 < div className = "flex h-full w-full select-none flex-row overflow-hidden rounded" >
421420 < motion . div
422421 className = "flex h-full flex-col items-start justify-start overflow-hidden"
@@ -432,7 +431,6 @@ export const SimplifiedBlunderMeter = () => {
432431 </ motion . p >
433432 </ motion . div >
434433 </ motion . div >
435-
436434 < motion . div
437435 className = "flex h-full flex-col items-start justify-start overflow-hidden"
438436 animate = { {
@@ -536,6 +534,15 @@ export const SimplifiedChessboard = ({ forceKey }: { forceKey?: number }) => {
536534}
537535
538536export const SimplifiedHighlight = ( ) => {
537+ const moveData = [
538+ { move : 'Rb7+' , maiaPct : '67.3%' , sfEval : '+2.1' , color : '#238b45' } ,
539+ { move : 'Rb6+' , maiaPct : '24.8%' , sfEval : '+1.8' , color : '#41ab5d' } ,
540+ { move : 'Re7' , maiaPct : '5.2%' , sfEval : '+1.4' , color : '#74c476' } ,
541+ { move : 'Rc5' , maiaPct : '2.1%' , sfEval : '+0.9' , color : '#a1d99b' } ,
542+ { move : 'Ra5' , maiaPct : '0.4%' , sfEval : '+0.3' , color : '#c7e9c0' } ,
543+ { move : 'Rd5' , maiaPct : '0.2%' , sfEval : '-0.1' , color : '#feb24c' } ,
544+ ]
545+
539546 return (
540547 < div className = "flex w-full flex-col gap-2 overflow-hidden rounded bg-background-1/60 p-3" >
541548 < p className = "text-lg text-primary" > Position Analysis</ p >
@@ -563,32 +570,62 @@ export const SimplifiedHighlight = () => {
563570 </ div >
564571 < div className = "col-span-2 grid grid-cols-2 gap-2 border-t border-white/10 pt-2" >
565572 < div className = "grid grid-rows-2 items-center justify-center" >
566- < div className = "grid cursor-pointer grid-cols-2 gap-3" >
567- < p className = "text-right font-mono text-xs text-[#238b45]" >
568- 67.3%
569- </ p >
570- < p className = "text-left font-mono text-xs text-[#238b45]" > Rb7+</ p >
571- </ div >
572- < div className = "grid cursor-pointer grid-cols-2 gap-3" >
573- < p className = "text-right font-mono text-xs text-[#41ab5d]" >
574- 24.8%
575- </ p >
576- < p className = "text-left font-mono text-xs text-[#41ab5d]" > Rb6+</ p >
577- </ div >
573+ { moveData . map ( ( data , index ) => {
574+ let visibilityClass = ''
575+ if ( index === 2 ) visibilityClass = 'hidden xl:grid'
576+ else if ( index === 3 ) visibilityClass = 'hidden 2xl:grid'
577+ else if ( index === 4 ) visibilityClass = 'hidden 3xl:grid'
578+ else if ( index === 5 ) visibilityClass = 'hidden 4xl:grid'
579+
580+ return (
581+ < div
582+ key = { `maia-${ index } ` }
583+ className = { `grid cursor-pointer grid-cols-2 gap-3 ${ visibilityClass } ` }
584+ >
585+ < p
586+ className = "text-right font-mono text-xs"
587+ style = { { color : data . color } }
588+ >
589+ { data . maiaPct }
590+ </ p >
591+ < p
592+ className = "text-left font-mono text-xs"
593+ style = { { color : data . color } }
594+ >
595+ { data . move }
596+ </ p >
597+ </ div >
598+ )
599+ } ) }
578600 </ div >
579601 < div className = "grid grid-rows-2 items-center justify-center" >
580- < div className = "grid cursor-pointer grid-cols-2 gap-3" >
581- < p className = "text-right font-mono text-xs text-[#238b45]" >
582- +2.1
583- </ p >
584- < p className = "text-left font-mono text-xs text-[#238b45]" > Rb7+</ p >
585- </ div >
586- < div className = "grid cursor-pointer grid-cols-2 gap-3" >
587- < p className = "text-right font-mono text-xs text-[#41ab5d]" >
588- +1.8
589- </ p >
590- < p className = "text-left font-mono text-xs text-[#41ab5d]" > Rb6+</ p >
591- </ div >
602+ { moveData . map ( ( data , index ) => {
603+ let visibilityClass = ''
604+ if ( index === 2 ) visibilityClass = 'hidden xl:grid'
605+ else if ( index === 3 ) visibilityClass = 'hidden 2xl:grid'
606+ else if ( index === 4 ) visibilityClass = 'hidden 3xl:grid'
607+ else if ( index === 5 ) visibilityClass = 'hidden 4xl:grid'
608+
609+ return (
610+ < div
611+ key = { `sf-${ index } ` }
612+ className = { `grid cursor-pointer grid-cols-2 gap-3 ${ visibilityClass } ` }
613+ >
614+ < p
615+ className = "text-right font-mono text-xs"
616+ style = { { color : data . color } }
617+ >
618+ { data . sfEval }
619+ </ p >
620+ < p
621+ className = "text-left font-mono text-xs"
622+ style = { { color : data . color } }
623+ >
624+ { data . move }
625+ </ p >
626+ </ div >
627+ )
628+ } ) }
592629 </ div >
593630 </ div >
594631 </ div >
0 commit comments