add tier breaks, style changes

main
Gabe Farrell 3 years ago
parent 112f9b0163
commit 20f1379fbb

@ -1,7 +1,7 @@
#root { #root {
max-width: 1280px; max-width: 1280px;
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 0.5rem;
text-align: center; text-align: center;
} }

@ -13,6 +13,7 @@ import SplitRegion from './Pages/Build/SplitRegion'
import Combined from './Pages/Build/Combined' import Combined from './Pages/Build/Combined'
import NARegion from './Pages/Build/NARegion' import NARegion from './Pages/Build/NARegion'
import APACRegion from './Pages/Build/APACRegion' import APACRegion from './Pages/Build/APACRegion'
import CommunityRankings from './Pages/CommunityRankings'
const router = createBrowserRouter( const router = createBrowserRouter(
@ -28,6 +29,7 @@ const router = createBrowserRouter(
<Route path='login' element={<Login />} /> <Route path='login' element={<Login />} />
<Route path='register' element={<Register />} /> <Route path='register' element={<Register />} />
</Route> </Route>
<Route path="community-rankings" element={<CommunityRankings />} />
</Route> </Route>
) )
) )

@ -11,6 +11,8 @@
border-radius: 10px; border-radius: 10px;
border: none; border: none;
margin-bottom: 10px; margin-bottom: 10px;
width: 300px;
font-size: 18px;
} }
.basic-form .switch { .basic-form .switch {
font-size: 14px; font-size: 14px;

@ -1,10 +1,13 @@
.team-card { .team-card {
background-color: darkgray; background-color: darkgray;
border-radius: 15px; border-radius: 15px;
width: 320px; /* width: 320px;
height: 48px; height: 48px; */
margin: 10px auto; width: 240px;
height: 36px;
margin: -2px auto -2px auto;
cursor: grab; cursor: grab;
background-size: contain;
} }
.team-card:active { .team-card:active {

@ -24,7 +24,7 @@
background-image: url('../../assets/cards/was.png'); background-image: url('../../assets/cards/was.png');
} }
.vegaseternal { .vegaseternal {
background-color: rgb(15, 15, 15); background-color: #000;
background-image: url('../../assets/cards/vegas.png'); background-image: url('../../assets/cards/vegas.png');
} }
.torontodefiant { .torontodefiant {

@ -0,0 +1,32 @@
.triangle-right {
width: 0;
height: 0;
border-top: 8px solid transparent;
border-left: 16px solid grey;
border-bottom: 8px solid transparent;
margin: 0px 0px 0px -8px;
opacity: 0;
}
.triangle-right:hover {
cursor: pointer;
opacity: 1;
}
.triangle-right.active {
cursor: pointer;
border-left-color: yellow;
opacity: 1;
}
.break-line {
display: none;
width: 175px;
float: left;
margin-top: -9px;
border: 1px solid yellow;
}
.break-line.active {
display:inline;
width: 175px;
float: left;
margin-top: -9px;
border: 1px solid yellow;
}

@ -2,6 +2,7 @@ import './Css/TeamCard.css'
import './Css/TeamStyles.css' import './Css/TeamStyles.css'
import { useSortable } from '@dnd-kit/sortable' import { useSortable } from '@dnd-kit/sortable'
import {CSS} from '@dnd-kit/utilities' import {CSS} from '@dnd-kit/utilities'
import TierBreak from './TierBreak'
// TODO figure out how to make transitions work smoothly // TODO figure out how to make transitions work smoothly
@ -23,8 +24,11 @@ export default function TeamCard(props: {id: string}) {
opacity: isDragging ? 0.5 : 1 opacity: isDragging ? 0.5 : 1
}; };
return ( return (
<>
<div className={`team-card ${teamCss}`} style={style} ref={setNodeRef} {...attributes} {...listeners}> <div className={`team-card ${teamCss}`} style={style} ref={setNodeRef} {...attributes} {...listeners}>
<h3>{props.id}</h3> <h3>{props.id}</h3>
</div> </div>
<TierBreak />
</>
) )
} }

@ -0,0 +1,16 @@
import { useState } from 'react';
import './Css/TierBreak.css'
export default function TierBreak() {
const [isActive, setActive] = useState(false);
return (
<div className='tier-break'>
<div
className={'triangle-right' + (isActive ? ' active' : '')}
onClick={() => setActive(!isActive)}
>
</div>
<hr className={'break-line' + (isActive ? ' active' : '')}/>
</div>
)
}

@ -49,14 +49,15 @@ export default function Combined() {
}) })
) )
return ( return (
<div style={{ <div
display: 'flex', // style={{
width: '600px', // display: 'flex',
height: '700px', // flexDirection: 'column',
flexDirection: 'column', // flexWrap: 'wrap',
flexWrap: 'wrap', // height: '600px',
alignContent: 'space-between', // width: '700px',
}}> // }}
>
<DndContext <DndContext
sensors={sensors} sensors={sensors}
collisionDetection={closestCenter} collisionDetection={closestCenter}

@ -53,8 +53,9 @@ export default function SplitRegion() {
return ( return (
<div style={{ <div style={{
display: 'flex', display: 'flex',
width: '800px', width: '500px',
justifyContent: 'space-between', gap: '30px',
margin: 'auto',
}}> }}>
<DndContext <DndContext
sensors={sensors} sensors={sensors}

@ -0,0 +1,12 @@
import Nav from "../Components/Nav";
export default function CommunityRanking() {
return (
<div className="page-content">
<div className="left-menus">
</div>
<h2>Community Rankings</h2>
<Nav current='community'/>
</div>
)
}

@ -4,9 +4,9 @@
justify-content: space-between; justify-content: space-between;
} }
.no-w { /* .no-w {
width: auto; width: auto;
} } */
.full-container { .full-container {
height: 900px; height: 900px;

@ -4,6 +4,8 @@ import Nav from '../Components/Nav'
export default function Login() { export default function Login() {
return ( return (
<div className="page-content no-w"> <div className="page-content no-w">
<div className="left-menus">
</div>
<LoginForm /> <LoginForm />
<Nav current='login'/> <Nav current='login'/>
</div> </div>

@ -4,6 +4,8 @@ import Nav from '../Components/Nav'
export default function Login() { export default function Login() {
return ( return (
<div className="page-content no-w"> <div className="page-content no-w">
<div className="left-menus">
</div>
<RegisterForm /> <RegisterForm />
<Nav current='login'/> <Nav current='login'/>
</div> </div>

Loading…
Cancel
Save