Created and linked pages for creating tournaments and overview

This commit is contained in:
Kristoffer Longva Eriksen 2022-03-17 14:26:42 +01:00
parent b1d1189f12
commit da13804bf4
7 changed files with 60 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,11 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
import logo from "./../Asura2222.png";
export default function Home_Image() {
return (
<Link to="/">
<img src={logo} alt="Tournament logo"></img>
</Link>
);
}

View File

@ -0,0 +1,20 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
import Home_Image from "./components/home_image";
function Save_Button(props) {
return (
<Link to="/">
<button>Create Tournament!</button>
</Link>
);
}
export default function Create_Tournament(props) {
return (
<React.Fragment>
<Home_Image />
<Save_Button />
</React.Fragment>
);
}

View File

@ -1,7 +1,18 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
import Manage_Button from "./components/manage_button";
import Create_Tournament from "./create_tournament.js";
import Tournament_Overview from "./tournament_overview.js";
import Tournament_Manager from "./manage_tournament.js";
import Home_Image from "./components/home_image";
function Create_Button(props) {
return (
<button className="Create_Button">
<Link to="/create">Create Tournament</Link>
</button>
);
}
function Overview_Button(props) {
return (
@ -28,6 +39,8 @@ function ListElement(props) {
function Home() {
return (
<React.StrictMode>
<Home_Image />
<Create_Button />
<div id="tournamentList">
<ListElement name="Weekend Warmup" competitors="16" date="29.04.2022" />
<ListElement
@ -46,6 +59,8 @@ export default function App() {
<Router>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/create" element={<Create_Tournament />} />
<Route path="/tournament" element={<Tournament_Overview />} />
<Route path="/tournament/manage" element={<Tournament_Manager />} />
</Routes>
</Router>

View File

@ -29,26 +29,25 @@ code {
}
.ListElement {
background-color: #073b4c;
width: 100%;
width: 40vw;
height: 7vh;
display: grid;
flex-flow: row;
column-gap: 5vw;
grid-template-columns: 4fr 1fr 1fr;
margin-bottom: 5vh;
}
.Manage_Button {
background-color: #ef476f;
display: inline;
width: 100%;
width: 10vw;
height: 100%;
color: #eeeeee;
padding-left: 5vh;
}
.Overview_Button {
background-color: #118ab2;
display: inline;
width: 100%;
width: 10vw;
height: 100%;
color: #eeeeee;
}

View File

@ -1,9 +1,11 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
import Home_Image from "./components/home_image";
export default function Tournament_Manager() {
return (
<React.Fragment>
<Home_Image />
<h1 className="pageHeader">Tournament</h1>
<br></br>
<input

View File

@ -0,0 +1,7 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
import Home_Image from "./components/home_image";
export default function Tournament_Overview(props) {
return <Home_Image />;
}