From 6e03bbb614a6c5bfb1007ee4115d0a04fa56bb49 Mon Sep 17 00:00:00 2001 From: Jacob Sapoznikow Date: Tue, 21 Mar 2023 15:45:45 +0000 Subject: [PATCH] Add dedicated home page --- app/src/App.tsx | 9 ++++ app/src/components/Header.tsx | 16 ++++--- app/src/routes/Home.scss | 67 ---------------------------- app/src/routes/Home.tsx | 16 ------- app/src/routes/SpaceWarp.scss | 82 +++++++++++++++++++++++++++++++++++ app/src/routes/SpaceWarp.tsx | 21 +++++++++ 6 files changed, 121 insertions(+), 90 deletions(-) create mode 100644 app/src/routes/SpaceWarp.scss create mode 100644 app/src/routes/SpaceWarp.tsx diff --git a/app/src/App.tsx b/app/src/App.tsx index c8be54c..ca99e07 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -17,6 +17,15 @@ export const App = () => { } /> + + import("./routes/SpaceWarp").then( + (m) => m.SpaceWarp + ) + } + /> + diff --git a/app/src/components/Header.tsx b/app/src/components/Header.tsx index f8032af..64c48cb 100644 --- a/app/src/components/Header.tsx +++ b/app/src/components/Header.tsx @@ -17,18 +17,20 @@ export const Header = () => { setMods(/\/mods?(\/\d+)?/i.test(router.path!)); setManage(router.path == "/manage"); - setSpacewarp(router.path == "/" || router.path == "/install"); + setSpacewarp(router.path == "/spacewarp" || router.path == "/install"); }, [router.path]); return (
- insert space warp logo here + + insert space warp logo here + - + SpaceWarp diff --git a/app/src/routes/Home.scss b/app/src/routes/Home.scss index b136388..12d6bfd 100644 --- a/app/src/routes/Home.scss +++ b/app/src/routes/Home.scss @@ -5,78 +5,11 @@ padding: 0; user-select: none; - background-color: #1f2120; - .container { - display: flex; - justify-content: center; - align-items: center; - height: 55vh; - } - - .logo { - width: 65%; - border-radius: 8px; - user-select: none; - } - .title { width: 100%; user-select: none; text-align: center; } - - .actions { - width: 80%; - padding: 2% 10%; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-evenly; - } - - .action { - border: 2px solid #3c3c3e; - border-radius: 4px; - background-color: transparent; - user-select: none; - color: #dddfdc; - font-family: "manteka", serif; - - width: 30%; - padding: 1.5% 0; - - margin-top: 2%; - margin-left: 35%; - - cursor: pointer; - outline: none; - transition: color 0.5s ease, background-color 0.5s ease; - - &:hover { - background-color: #3c3c3e; - } - - &#uninstall { - background-color: #c04040; - color: #dddfdc; - - &:hover { - background-color: #803030; - } - } - - &#launch { - background-color: #409040; - color: #dddfdc; - - width: 15%; - margin-left: 42.5%; - - &:hover { - background-color: #107010; - } - } - } } diff --git a/app/src/routes/Home.tsx b/app/src/routes/Home.tsx index ecc5970..a32bc0f 100644 --- a/app/src/routes/Home.tsx +++ b/app/src/routes/Home.tsx @@ -1,25 +1,9 @@ import "./Home.scss"; -import banner from "../assets/background_banner.png"; -import { route } from "preact-router"; export const Home = () => { - const doInstall = () => { - route("/install", true); - }; - return (
-
- Space Warp Logo -
- -
-

Welcome to Wormhole

- -
); }; diff --git a/app/src/routes/SpaceWarp.scss b/app/src/routes/SpaceWarp.scss new file mode 100644 index 0000000..ae3fe45 --- /dev/null +++ b/app/src/routes/SpaceWarp.scss @@ -0,0 +1,82 @@ +.spacewarp-container { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + + user-select: none; + + background-color: #1f2120; + + .container { + display: flex; + justify-content: center; + align-items: center; + height: 55vh; + } + + .logo { + width: 65%; + border-radius: 8px; + user-select: none; + } + + .title { + width: 100%; + user-select: none; + text-align: center; + } + + .actions { + width: 80%; + padding: 2% 10%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-evenly; + } + + .action { + border: 2px solid #3c3c3e; + border-radius: 4px; + background-color: transparent; + user-select: none; + color: #dddfdc; + font-family: "manteka", serif; + + width: 30%; + padding: 1.5% 0; + + margin-top: 2%; + margin-left: 35%; + + cursor: pointer; + outline: none; + transition: color 0.5s ease, background-color 0.5s ease; + + &:hover { + background-color: #3c3c3e; + } + + &#uninstall { + background-color: #c04040; + color: #dddfdc; + + &:hover { + background-color: #803030; + } + } + + &#launch { + background-color: #409040; + color: #dddfdc; + + width: 15%; + margin-left: 42.5%; + + &:hover { + background-color: #107010; + } + } + } +} diff --git a/app/src/routes/SpaceWarp.tsx b/app/src/routes/SpaceWarp.tsx new file mode 100644 index 0000000..34fe622 --- /dev/null +++ b/app/src/routes/SpaceWarp.tsx @@ -0,0 +1,21 @@ +import "./SpaceWarp.scss"; +import banner from "../assets/background_banner.png"; +import { route } from "preact-router"; + +export const SpaceWarp = () => { + const doInstall = () => { + route("/install", true); + }; + + return ( +
+
+ Space Warp Logo +
+ + +
+ ); +};