a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove two card special width case and change breakpoint

+4 -14
+4 -14
components/Cards.tsx
··· 42 42 </Media> 43 43 </div> 44 44 <div className="flex items-stretch" ref={cardRef}> 45 - <Card entityID={props.rootCard} openCards={openCards} first /> 45 + <Card entityID={props.rootCard} first /> 46 46 </div> 47 47 {openCards.map((card) => ( 48 48 <div className="flex items-stretch" key={card}> 49 - <Card entityID={card} openCards={openCards} /> 49 + <Card entityID={card} /> 50 50 </div> 51 51 ))} 52 52 <div ··· 68 68 ); 69 69 }; 70 70 71 - function Card(props: { 72 - entityID: string; 73 - first?: boolean; 74 - openCards: string[]; 75 - }) { 71 + function Card(props: { entityID: string; first?: boolean }) { 76 72 let { rep } = useReplicache(); 77 73 78 74 let focusedElement = useUIState((s) => s.focusedBlock); ··· 102 98 id={elementId.card(props.entityID).container} 103 99 style={{ 104 100 backgroundColor: "rgba(var(--bg-card), var(--bg-card-alpha))", 105 - width: 106 - window.innerWidth > 768 107 - ? props.openCards.length !== 0 108 - ? "calc(50vw - 32px)" 109 - : "65ch" 110 - : "calc(100vw - 12px)", 111 101 }} 112 102 className={` 113 - card max-w-prose 103 + card w-[calc(100vw-12px)] md:w-[calc(50vw-32px)] max-w-prose 114 104 sm:pt-0 pt-2 115 105 grow flex flex-col 116 106 overscroll-y-none