feat: implement text/image-with-text/icon-with-text content block

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-05-23 14:17:55 +07:00
parent 4684d54ac3
commit a1d65a54c1
15 changed files with 431 additions and 24 deletions

View File

@@ -1,15 +1,26 @@
import Footer from 'components/layout/footer';
import { Suspense } from 'react';
const Placeholder = () => {
return (
<div className="mx-auto mb-2 w-full max-w-7xl animate-pulse py-6">
<div className="h-10 w-1/2 rounded bg-gray-200" />
<div className="mt-6 h-96 w-full rounded bg-gray-200" />
</div>
);
};
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<Suspense>
<div className="w-full">
<div className="mx-8 max-w-2xl py-20 sm:mx-auto">
<Suspense>{children}</Suspense>
</div>
<>
<div className="min-h-[600px] w-full">
<Suspense fallback={<Placeholder />}>
<div className="py-6">{children}</div>
</Suspense>
</div>
<Footer />
</Suspense>
<Suspense>
<Footer />
</Suspense>
</>
);
}