mirror of https://github.com/usememos/memos
feat: add root layout (#1294)
parent
003161ea54
commit
595dbdb0ec
@ -0,0 +1,21 @@
|
|||||||
|
import { Outlet } from "react-router-dom";
|
||||||
|
import Header from "../components/Header";
|
||||||
|
import UpdateVersionBanner from "../components/UpdateVersionBanner";
|
||||||
|
|
||||||
|
function Root() {
|
||||||
|
return (
|
||||||
|
<section className="w-full h-full overflow-y-auto bg-zinc-100 dark:bg-zinc-800">
|
||||||
|
<div className="w-full flex flex-col justify-start items-center">
|
||||||
|
<UpdateVersionBanner />
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-[14rem_1fr] relative w-full max-w-6xl h-full mx-auto">
|
||||||
|
<Header />
|
||||||
|
<main className="relative w-full h-auto flex flex-col justify-start items-start">
|
||||||
|
<Outlet />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Root;
|
@ -1,23 +0,0 @@
|
|||||||
.page-wrapper.home {
|
|
||||||
@apply w-full h-full overflow-y-auto bg-zinc-100 dark:bg-zinc-800;
|
|
||||||
|
|
||||||
> .banner-wrapper {
|
|
||||||
@apply w-full flex flex-col justify-start items-center;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .page-container {
|
|
||||||
@apply relative w-full h-auto mx-auto flex flex-row justify-start sm:justify-center items-start;
|
|
||||||
|
|
||||||
> .header-wrapper {
|
|
||||||
@apply flex-shrink-0 h-full;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .memos-wrapper {
|
|
||||||
@apply relative flex-grow max-w-2xl w-full h-auto flex flex-col justify-start items-start px-4 sm:px-2 sm:pt-4;
|
|
||||||
|
|
||||||
> .memos-editor-wrapper {
|
|
||||||
@apply w-full h-auto flex flex-col justify-start items-start bg-zinc-100 dark:bg-zinc-800 rounded-lg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue