fix: layouts and scrolls
This commit is contained in:
@@ -188,7 +188,7 @@ const MenuIndex = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4 pt-4 items-center">
|
<div className="flex flex-col gap-4 items-center">
|
||||||
<SearchBox value={search} onChange={updateSearch} />
|
<SearchBox value={search} onChange={updateSearch} />
|
||||||
<HorizontalScrollView className="w-full noscrollbar py-4!">
|
<HorizontalScrollView className="w-full noscrollbar py-4!">
|
||||||
{categories.map((item, index) => (
|
{categories.map((item, index) => (
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
|
|||||||
const menuStateMemo = useMemo(() => menuState, [menuState]);
|
const menuStateMemo = useMemo(() => menuState, [menuState]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full h-dvh'>
|
<div className='w-full'>
|
||||||
<BlurredOverlayContainer bgOpacity={40} visible={menuStateMemo} onClick={toggleMenuState} outDelay={150}>
|
<BlurredOverlayContainer bgOpacity={40} visible={menuStateMemo} onClick={toggleMenuState} outDelay={150}>
|
||||||
<div
|
<div
|
||||||
data-isvisible={menuStateMemo}
|
data-isvisible={menuStateMemo}
|
||||||
onClick={(e) => { e.stopPropagation(); }}
|
onClick={(e) => { e.stopPropagation(); }}
|
||||||
className={`fixed top-0 bottom-0 -right-full data-[isvisible=true]:right-0 transition-all duration-100 ease-in-out not-xl:!rounded-s-none overflow-clip bg-white w-[200px] h-dvh flex flex-col z-40`}>
|
className={`fixed top-0 bottom-0 -right-full data-[isvisible=true]:right-0 transition-all duration-100 ease-in-out not-xl:!rounded-s-none overflow-clip bg-white w-[200px] h-dvh flex flex-col z-40`}>
|
||||||
<ul className="overflow-hidden noscrollbar pt-20 pb-10 flex flex-col justify-between h-full ">
|
<ul className="overflow-y-scroll noscrollbar pt-20 pb-10 flex flex-col justify-between h-full ">
|
||||||
<li>
|
<li>
|
||||||
<div className='flex flex-col gap-[60px]'>
|
<div className='flex flex-col gap-[60px]'>
|
||||||
<div className='flex flex-col gap-[23px]'>
|
<div className='flex flex-col gap-[23px]'>
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ const BlurredOverlayContainer = ({
|
|||||||
const variants: Variants = {
|
const variants: Variants = {
|
||||||
hidden: {
|
hidden: {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
|
visibility: 'hidden',
|
||||||
|
display: 'none',
|
||||||
transition: {
|
transition: {
|
||||||
delay: transitionDelay / 1000,
|
delay: transitionDelay / 1000,
|
||||||
duration: 0.3,
|
duration: 0.3,
|
||||||
@@ -49,6 +51,8 @@ const BlurredOverlayContainer = ({
|
|||||||
},
|
},
|
||||||
visible: {
|
visible: {
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
|
visibility: 'visible',
|
||||||
|
display: 'block',
|
||||||
transition: {
|
transition: {
|
||||||
delay: transitionDelay / 1000,
|
delay: transitionDelay / 1000,
|
||||||
duration: 0.3,
|
duration: 0.3,
|
||||||
@@ -64,7 +68,7 @@ const BlurredOverlayContainer = ({
|
|||||||
className={clsx(
|
className={clsx(
|
||||||
className,
|
className,
|
||||||
visible || loaded ? 'z-50' : !visible && !loaded ? '-z-50' : 'z-0',
|
visible || loaded ? 'z-50' : !visible && !loaded ? '-z-50' : 'z-0',
|
||||||
'fixed inset-0 flex items-center justify-center h-dvh w-full backdrop-blur-sm',
|
'absolute inset-0 flex items-center justify-center h-full w-full backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `rgba(0, 0, 0, ${bgOpacity / 100})`,
|
backgroundColor: `rgba(0, 0, 0, ${bgOpacity / 100})`,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type Props = {
|
|||||||
|
|
||||||
function TopBar({ profileDropState, toggleProfileDropState, menuState, toggleMenuState, searchModalState, toggleSearchModalState, nightModeState, toggleNightModeState }: Props) {
|
function TopBar({ profileDropState, toggleProfileDropState, menuState, toggleMenuState, searchModalState, toggleSearchModalState, nightModeState, toggleNightModeState }: Props) {
|
||||||
return (
|
return (
|
||||||
<div className="p-4 pb-0">
|
<div className="fixed top-0 left-0 w-full p-4 pb-0 z-40">
|
||||||
<div className='bg-white grid grid-cols-3 overflow-hidden rounded-2xl w-full h-12 lg:h-24 px-2 sm:p-6 xl:gap-8 items-center'>
|
<div className='bg-white grid grid-cols-3 overflow-hidden rounded-2xl w-full h-12 lg:h-24 px-2 sm:p-6 xl:gap-8 items-center'>
|
||||||
<div className='inline-flex justify-between items-center'>
|
<div className='inline-flex justify-between items-center'>
|
||||||
<button className='inline-block xl:hidden' onClick={toggleMenuState}>
|
<button className='inline-block xl:hidden' onClick={toggleMenuState}>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function ClientMenuRouteWrapper({ children }: Props) {
|
|||||||
// }, [location])
|
// }, [location])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='h-screen overflow-hidden'>
|
<div className='h-full overflow-hidden py-10 px-4'>
|
||||||
<header>
|
<header>
|
||||||
<TopBar
|
<TopBar
|
||||||
profileDropState={profileDrop} toggleProfileDropState={toggleProfileDrop}
|
profileDropState={profileDrop} toggleProfileDropState={toggleProfileDrop}
|
||||||
@@ -44,7 +44,7 @@ function ClientMenuRouteWrapper({ children }: Props) {
|
|||||||
searchModalState={searchModal} toggleSearchModalState={toggleSearchModal}
|
searchModalState={searchModal} toggleSearchModalState={toggleSearchModal}
|
||||||
nightModeState={nightMode} toggleNightModeState={toggleNightMode} />
|
nightModeState={nightMode} toggleNightModeState={toggleNightMode} />
|
||||||
</header>
|
</header>
|
||||||
<main className="h-full px-4 pb-44 overflow-y-auto noscrollbar">
|
<main className="h-full pt-14 pb-14 overflow-y-auto noscrollbar">
|
||||||
{children}
|
{children}
|
||||||
</main>
|
</main>
|
||||||
<aside>
|
<aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user