@@ -334,26 +334,33 @@ function isTrue<T>(value: T | null | undefined | false | '' | 0): value is T {
334334}
335335
336336function MetadataTable ( { rows } : { rows : ( false | null | undefined | readonly [ string , ReactNode ] ) [ ] } ) {
337+ const filteredRows = rows . filter ( isTrue ) ;
337338 return (
338- < table className = "w-full border-collapse text-left text-sm text-gray-700 dark:text-gray-400 " >
339- < tbody >
340- { rows . filter ( isTrue ) . map ( ( row , i ) => {
341- const [ label , value ] = row ;
342- const extraPadding = i === 0 ? 'pt-3' : i === rows . length - 1 ? 'pb-3' : '' ;
343- return (
344- < tr key = { i } >
345- < th
346- className = { `${ extraPadding } whitespace-nowrap bg-fade-100 px-4 py-2 text-right align-top font-medium text-fade-900 dark:bg-fade-800 dark:text-white` }
347- scope = "row"
339+ < div className = "overflow-hidden rounded-lg border border-fade-200 bg-white dark:border-fade-700 dark:bg-fade-900" >
340+ < table className = "w-full border-collapse text-left text-sm text-gray-700 dark:text-gray-400" >
341+ < tbody >
342+ { filteredRows . map ( ( row , i ) => {
343+ const [ label , value ] = row ;
344+ const extraPadding = i === 0 ? 'pt-3' : i === filteredRows . length - 1 ? 'pb-3' : '' ;
345+ const isLastRow = i === filteredRows . length - 1 ;
346+ return (
347+ < tr
348+ className = { ! isLastRow ? 'border-b border-fade-200 dark:border-fade-700' : '' }
349+ key = { i }
348350 >
349- { label }
350- </ th >
351- < td className = { `${ extraPadding } px-4 py-2` } > { value } </ td >
352- </ tr >
353- ) ;
354- } ) }
355- </ tbody >
356- </ table >
351+ < th
352+ className = { `${ extraPadding } whitespace-nowrap bg-fade-100 px-4 py-2 text-right align-top font-medium text-fade-900 dark:bg-fade-800 dark:text-white` }
353+ scope = "row"
354+ >
355+ { label }
356+ </ th >
357+ < td className = { `${ extraPadding } px-4 py-2` } > { value } </ td >
358+ </ tr >
359+ ) ;
360+ } ) }
361+ </ tbody >
362+ </ table >
363+ </ div >
357364 ) ;
358365}
359366export default function Page ( {
@@ -437,16 +444,20 @@ export default function Page({
437444 </ Head >
438445 ) }
439446 < PageContainer searchBar >
440- { /* Two columns */ }
441- < div className = "grid h-full w-full gap-4 pb-4 sm:grid-cols-1 md:grid-cols-1 lg:grid-cols-3" >
442- { /* Left column */ }
447+ { /* Full-width preview at top (YouTube-style) */ }
448+ < div className = "mb-6 w-full" >
449+ < ImageCarousel
450+ images = { model . images }
451+ indexKey = { modelId }
452+ readonly = { ! editMode }
453+ onChange = { ( images ) => updateModelProperty ( 'images' , images ) }
454+ />
455+ </ div >
456+
457+ { /* Two columns: Description and Sidebar */ }
458+ < div className = "grid h-full w-full gap-6 pb-4 sm:grid-cols-1 lg:grid-cols-3" >
459+ { /* Left column: Description */ }
443460 < div className = "relative flex h-full flex-col gap-4 sm:col-span-1 lg:col-span-2" >
444- < ImageCarousel
445- images = { model . images }
446- indexKey = { modelId }
447- readonly = { ! editMode }
448- onChange = { ( images ) => updateModelProperty ( 'images' , images ) }
449- />
450461 < div className = "relative" >
451462 < div >
452463 { editMode && (
@@ -564,7 +575,7 @@ export default function Page({
564575 </ div >
565576 </ div >
566577 </ div >
567- { /* Right column */ }
578+ { /* Right column: Sidebar */ }
568579 < div className = "col-span-1 w-full" >
569580 { /* Download Button */ }
570581 < div className = "mb-2 flex w-full flex-col gap-2" >
0 commit comments