fix: update responsive design calculations for chat layout (#168)

This commit is contained in:
Zhengbin Sun 2025-05-16 11:40:26 +08:00 committed by GitHub
parent 9cff113862
commit c046d9cc34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ export default function Main() {
return ( return (
<div <div
className={cn( className={cn(
"flex h-full w-full justify-center px-4 pt-12 pb-4", "flex h-full w-full justify-center-safe px-4 pt-12 pb-4",
doubleColumnMode && "gap-8", doubleColumnMode && "gap-8",
)} )}
> >
@ -28,13 +28,13 @@ export default function Main() {
className={cn( className={cn(
"shrink-0 transition-all duration-300 ease-out", "shrink-0 transition-all duration-300 ease-out",
!doubleColumnMode && !doubleColumnMode &&
`w-[768px] translate-x-[min(calc((100vw-538px)*0.75/2),960px/2)]`, `w-[768px] translate-x-[min(max(calc((100vw-538px)*0.75),575px)/2,960px/2)]`,
doubleColumnMode && `w-[538px]`, doubleColumnMode && `w-[538px]`,
)} )}
/> />
<ResearchBlock <ResearchBlock
className={cn( className={cn(
"w-[min(calc((100vw-538px)*0.75),960px)] pb-4 transition-all duration-300 ease-out", "w-[min(max(calc((100vw-538px)*0.75),575px),960px)] pb-4 transition-all duration-300 ease-out",
!doubleColumnMode && "scale-0", !doubleColumnMode && "scale-0",
doubleColumnMode && "", doubleColumnMode && "",
)} )}