From 43afae5d77a708e074c913a71e324877fd316b44 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 6 Mar 2024 11:14:08 +0100 Subject: [PATCH] Cleaning up CSS, minor refactor into pages Home & Settings, better docs --- frontend/src/App.css | 46 ------------------------------ frontend/src/App.tsx | 31 -------------------- frontend/src/Pages/Home.tsx | 36 ++++++++++++++++++++++++ frontend/src/Pages/Settings.tsx | 17 +++++++++++ frontend/src/index.css | 50 +++++++++++++++++++++++++++++++++ frontend/src/main.tsx | 12 ++++++-- 6 files changed, 113 insertions(+), 79 deletions(-) delete mode 100644 frontend/src/App.css delete mode 100644 frontend/src/App.tsx create mode 100644 frontend/src/Pages/Home.tsx create mode 100644 frontend/src/Pages/Settings.tsx diff --git a/frontend/src/App.css b/frontend/src/App.css deleted file mode 100644 index bb6c55a..0000000 --- a/frontend/src/App.css +++ /dev/null @@ -1,46 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -a { - display:inline-block; -} - -.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/frontend/src/App.tsx b/frontend/src/App.tsx deleted file mode 100644 index 2722ed9..0000000 --- a/frontend/src/App.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import reactLogo from "./assets/react.svg"; -import viteLogo from "/vite.svg"; -import "./App.css"; -import { CountButton } from "./Components/CountButton"; - -function App(): JSX.Element { - return ( - <> -
-
- Edit src/App.tsx
and save to test HMR
-
- Click on the Vite and React logos to learn more -
- > - ); -} - -export default App; diff --git a/frontend/src/Pages/Home.tsx b/frontend/src/Pages/Home.tsx new file mode 100644 index 0000000..7ce73a6 --- /dev/null +++ b/frontend/src/Pages/Home.tsx @@ -0,0 +1,36 @@ +import reactLogo from "../assets/react.svg"; +import viteLogo from "/vite.svg"; +import "../index.css"; +import { CountButton } from "../Components/CountButton"; +import { Link } from "react-router-dom"; + +/** + * The home page of the application + * @returns {JSX.Element} The home page + */ +export default function HomePage(): JSX.Element { + return ( + <> + ++ Click on the Vite and React logos to learn more +
+ > + ); +} diff --git a/frontend/src/Pages/Settings.tsx b/frontend/src/Pages/Settings.tsx new file mode 100644 index 0000000..b5bf81c --- /dev/null +++ b/frontend/src/Pages/Settings.tsx @@ -0,0 +1,17 @@ +import "../index.css"; +import { Link } from "react-router-dom"; + +/** + * The settings page of the application + * @returns {JSX.Element} The settings page + */ +export default function SettingsPage(): JSX.Element { + return ( + <> +