From 31e29de4cdf55756040ef8ab09587caeae32e6a8 Mon Sep 17 00:00:00 2001 From: julius Date: Sun, 26 Jan 2025 17:30:37 +0100 Subject: [PATCH] feat: choose user once at the beginning --- src/App.css | 18 ++++- src/App.tsx | 54 +------------ src/Rankings.tsx | 199 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 169 insertions(+), 102 deletions(-) diff --git a/src/App.css b/src/App.css index 1b74a88..d1dc86a 100644 --- a/src/App.css +++ b/src/App.css @@ -48,15 +48,26 @@ h2 { height: 92%; } +.reservoir { + flex-direction: unset; + flex-wrap: wrap; + justify-content: space-around; + width: 100%; +} + .box { position: relative; + &.one { + max-width: min(80vw, 500px); + } &.two { min-width: 43%; + max-width: 20vw; } &.three { min-width: 27%; + max-width: 10vw; } - max-width: 10vw; padding: 4px; margin: 4px auto; border-style: solid; @@ -82,6 +93,10 @@ h2 { padding: 4px 8px; } +.extra-margin { + padding: 0px 8px; +} + button { font-weight: bold; color: ghostwhite; @@ -120,7 +135,6 @@ button { width: 50%; } - /* Style the tab content (and add height:100% for full page content) */ .tabcontent { display: none; diff --git a/src/App.tsx b/src/App.tsx index a27f792..8b9f393 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,63 +1,13 @@ import "./App.css"; -import { Chemistry, MVP } from "./Rankings"; +import Rankings from "./Rankings"; function App() { - function openPage(pageName: string, color: string) { - // Hide all elements with class="tabcontent" by default */ - var i, tabcontent, tablinks; - tabcontent = document.getElementsByClassName("tabcontent"); - for (i = 0; i < tabcontent.length; i++) { - (tabcontent[i] as HTMLElement).style.display = "none"; - } - // Remove the background color of all tablinks/buttons - tablinks = document.getElementsByClassName("tablink"); - for (i = 0; i < tablinks.length; i++) { - let button = tablinks[i] as HTMLElement; - button.style.backgroundColor = "unset"; - button.style.textDecoration = "unset"; - button.style.fontWeight = "unset"; - button.style.color = "unset"; - } - // Show the specific tab content - (document.getElementById(pageName) as HTMLElement).style.display = "block"; - // Add the specific color to the button used to open the tab content - let activeButton = document.getElementById( - pageName + "Button" - ) as HTMLElement; - activeButton.style.textDecoration = "underline"; - activeButton.style.fontWeight = "bold"; - activeButton.style.backgroundColor = "#3366cc"; - activeButton.style.color = "white"; - document.body.style.backgroundColor = color; - } return ( <> logo

cutt

cool ultimate team tool -
- - -
- -
- -
-
- -
+