From 97773db59ead5405615237db2095b8b25ae14621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Wed, 25 Dec 2024 09:31:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E7=A1=80=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=BB=93=E6=9E=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 42 --------------------------------- src/App.tsx | 41 ++++++++------------------------ src/pages/MainLayout.module.css | 14 +++++++++++ src/pages/MainLayout.tsx | 14 +++++++++++ 4 files changed, 38 insertions(+), 73 deletions(-) delete mode 100644 src/App.css create mode 100644 src/pages/MainLayout.module.css create mode 100644 src/pages/MainLayout.tsx diff --git a/src/App.css b/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..c09df27 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,35 +1,14 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import { createBrowserRouter, RouterProvider } from 'react-router-dom'; +import { Notifications } from './components/Notifications'; +import { MainLayout } from './pages/MainLayout'; -function App() { - const [count, setCount] = useState(0) +const routes = createBrowserRouter([{ path: '/', element: }]); +export function App() { return ( - <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- - ) + + Color Lab + + + ); } - -export default App diff --git a/src/pages/MainLayout.module.css b/src/pages/MainLayout.module.css new file mode 100644 index 0000000..8596900 --- /dev/null +++ b/src/pages/MainLayout.module.css @@ -0,0 +1,14 @@ +@layer pages { + .main_layout { + height: 100%; + width: 100%; + overflow: hidden; + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: stretch; + } + .content { + flex: 1 0; + } +} diff --git a/src/pages/MainLayout.tsx b/src/pages/MainLayout.tsx new file mode 100644 index 0000000..63726a4 --- /dev/null +++ b/src/pages/MainLayout.tsx @@ -0,0 +1,14 @@ +import { Outlet } from 'react-router-dom'; +import { NavigationMenu } from '../page-components/navigation/NavigationMenu'; +import styles from './MainLayout.module.css'; + +export function MainLayout() { + return ( +
+ +
+ +
+
+ ); +}