From 9c824f1d7b70321caeaee8cf33777cfc0161c9ef Mon Sep 17 00:00:00 2001 From: Mattias Date: Thu, 7 Mar 2024 11:31:03 +0100 Subject: [PATCH] Slight formatting --- frontend/src/Pages/LoginPage.tsx | 96 +++++++++++++++++--------- frontend/src/index.css | 114 ------------------------------- frontend/src/main.tsx | 2 - 3 files changed, 62 insertions(+), 150 deletions(-) diff --git a/frontend/src/Pages/LoginPage.tsx b/frontend/src/Pages/LoginPage.tsx index bbee6b8..1ad479b 100644 --- a/frontend/src/Pages/LoginPage.tsx +++ b/frontend/src/Pages/LoginPage.tsx @@ -1,45 +1,73 @@ import Button from "../Components/Button"; import Logo from "/src/assets/TTIMElogo.png"; -import './LoginPage.css'; +import "./LoginPage.css"; import { useEffect } from "react"; import { Link } from "react-router-dom"; -const PreloadBackgroundAnimation = () => { - useEffect(() => { - const images = ['src/assets/1.jpg', 'src/assets/2.jpg', 'src/assets/3.jpg', 'src/assets/4.jpg']; +const PreloadBackgroundAnimation = (): JSX.Element => { + useEffect(() => { + const images = [ + "src/assets/1.jpg", + "src/assets/2.jpg", + "src/assets/3.jpg", + "src/assets/4.jpg", + ]; - // Pre-load images - for (let i = 0; i < images.length; i++) { - const img = new Image(); - img.src = images[i]; - } - // Start animation - document.body.style.animation = "backgroundTransition 30s infinite"; - }, []); + // Pre-load images + for (let i = 0; i < images.length; i++) { + const img = new Image(); + img.src = images[i]; + } + // Start animation + document.body.style.animation = "backgroundTransition 30s infinite"; + }, []); - return null; - }; + return <>; +}; -function LoginPage() { - - return ( - <> - -
-
- TTIME Logo -

Welcome to TTIME!

-

Please log in to continue

- - - -
+function LoginPage(): JSX.Element { + return ( + <> + +
+
+ TTIME Logo +

+ {" "} + Welcome to TTIME!{" "} +

+

+ {" "} + Please log in to continue{" "} +

+ + + +
- - ); +
+ + ); } -export default LoginPage; \ No newline at end of file +export default LoginPage; diff --git a/frontend/src/index.css b/frontend/src/index.css index 0393fde..3fc98df 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -6,117 +6,3 @@ * We are using tailwind, so do not add any custom CSS here. * Most of this is going to get cleaned up eventually. */ -/* -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} - -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -a { - display: inline-block; -} - -.logo { - transition: filter 0.25s; -} - -.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/main.tsx b/frontend/src/main.tsx index 4dba0ae..d5616c7 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,7 +1,5 @@ import React from "react"; import ReactDOM from "react-dom/client"; -import SettingsPage from "./Pages/Settings.tsx"; -import HomePage from "./Pages/Home.tsx"; import "./index.css"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import LoginPage from "./Pages/LoginPage.tsx";