From 67071ff3f5d181d33d5b34f54d0a01d1e04aa19f Mon Sep 17 00:00:00 2001 From: Songyi Huang Date: Thu, 11 Jun 2020 23:52:13 -0700 Subject: [PATCH] adding global layout... --- leaderboard/db.sqlite3 | Bin 172032 -> 172032 bytes src/App.js | 33 ++++++++++++++++++++++++++++++++- src/assets/gameview.scss | 4 ++-- src/components/Navbar.js | 2 +- src/view/LeaderBoard.js | 6 +----- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/leaderboard/db.sqlite3 b/leaderboard/db.sqlite3 index ee8d71ae1b58b2ed58abba465a58f998e1a9e5ee..1a9fb87ef80396647aa808fd7e92362f75ad6f77 100644 GIT binary patch delta 353 zcmZoTz}0YoYl5`kO$G)AEhuIN((5Pc7_;7F(6hg}F=YWivm8glWOe~-CXR%SjWQh0 zj&iIF%GQoKsfj76MM?RIMJWabhDPy;r6u|CMg~R(24+B>fvJ%Rh@)#@rfX=VU|?!x zWMXA(qGw@bVrF5sd9g%1yUZ*GE`DJq{+Ij?{JZ(f_}B1v^M~DtrxWOt(&BlY*$ET3}s|3U=t73pRSX^C^6kSjge>iyc9+W7PY42{OP+=81)!cr~4)| zN^NIOWt3)QEZYv$|8VDWCI=>gNe5WAvluY_;a{e}B(N-jNnkl6Nc00xw1A0SfmI#o L5asPau@C$JEYVKS diff --git a/src/App.js b/src/App.js index 1edfdf6..4eb7236 100644 --- a/src/App.js +++ b/src/App.js @@ -1,13 +1,44 @@ import React from 'react'; import { BrowserRouter as Router, Route, Redirect } from "react-router-dom"; +import Drawer from '@material-ui/core/Drawer'; +import Toolbar from '@material-ui/core/Toolbar'; import LeaderBoard from './view/LeaderBoard'; import { DoudizhuGameView, LeducHoldemGameView } from './view/GameView'; +import Navbar from "./components/Navbar"; +import {makeStyles} from "@material-ui/core/styles"; + +const drawerWidth = 250; + +const useStyles = makeStyles(() => ({ + navBar: { + zIndex: 1002 + }, + drawer: { + zIndex: 1001, + width: drawerWidth, + flexShrink: 0 + }, + drawerPaper: { + width: drawerWidth + } +})); function App() { + const classes = useStyles(); return ( + + + + - + diff --git a/src/assets/gameview.scss b/src/assets/gameview.scss index eb5afa1..c62fef6 100644 --- a/src/assets/gameview.scss +++ b/src/assets/gameview.scss @@ -7,7 +7,7 @@ } .header-bar { - width: 1000px; + width: calc(100% - 60px); margin-left: auto; margin-right: auto; height: 65px; @@ -296,4 +296,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/components/Navbar.js b/src/components/Navbar.js index d683e55..22f3e31 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -24,7 +24,7 @@ class Navbar extends React.Component {
{"Logo"} -
Showdown/ {this.props.gameName}
+
Showdown{this.props.gameName === '' ? '' : '/ ' + this.props.gameName}
{window.location.href = 'https://github.com/datamllab/rlcard'}}>
diff --git a/src/view/LeaderBoard.js b/src/view/LeaderBoard.js index 1edf0ca..f7f8c72 100644 --- a/src/view/LeaderBoard.js +++ b/src/view/LeaderBoard.js @@ -1,5 +1,4 @@ import React from 'react'; -import {Link} from 'react-router-dom'; // import axios from 'axios'; class LeaderBoard extends React.Component { @@ -9,10 +8,7 @@ class LeaderBoard extends React.Component { render() { return ( -
    -
  • Leduc Holdem
  • -
  • Dou Dizhu
  • -
+
wdnmd
) } }