Skip to content

Commit

Permalink
Merge pull request #9 from Polynomeer/feature/6/intro_homeUI
Browse files Browse the repository at this point in the history
Feature/6/intro home UI
  • Loading branch information
juddroid authored May 6, 2021
2 parents 2e2020a + c076eca commit db1afae
Show file tree
Hide file tree
Showing 24 changed files with 12,153 additions and 1 deletion.
5 changes: 5 additions & 0 deletions FE/baseball/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<title>Online Baseball Game</title>
</head>
<body>
Expand Down
7 changes: 6 additions & 1 deletion FE/baseball/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import Router from '@/Routes/Router';
import GlobalStyles from '@/Styles/GlobalStyles';

const App = () => {
return (
<div className="App">
<GlobalStyles />
<Router />
</div>
);
}
};

export default App;
14 changes: 14 additions & 0 deletions FE/baseball/src/Components/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import HomeTitle from '@/Components/Home/HomeTitle';
import MatchInfo from './MatchInfo/MatchInfo';
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const Home = () => {
return (
<S.Home>
<HomeTitle />
<MatchInfo />
</S.Home>
);
};

export default Home;
118 changes: 118 additions & 0 deletions FE/baseball/src/Components/Home/HomeStyles.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import styled from 'styled-components';
import * as CS from '@/Styles/CommonStyles';
import theme from '@/Styles/theme';

const HomeStyles = {
Home: styled(CS.BOX.FLEX_COLUMN_CENTER_BOX)`
background: #222;
width: 1440px;
height: 1080px;
color: ${theme.COLOR.DEFAULT};
padding-top: 40px;
`,

HomeTitle: styled.div`
font-size: 36px;
font-weight: 700;
padding: 20px;
margin-bottom: 10px;
`,

MatchInfo: styled(CS.BOX.FLEX_COLUMN_CENTER_BOX)`
width: 500px;
`,

MatchInfoTitle: styled.div`
padding: 40px 40px 20px 40px;
font-size: 24px;
letter-spacing: 3px;
`,
MatchInfoBody: styled.div`
width: 100%;
height: 340px;
padding: 0px 20px 0px 10px;
overflow-y: scroll;
::-webkit-scrollbar {
width: 10px;
height: 20px;
}
::-webkit-scrollbar-track {
background-color: #222;
border-radius: 8px;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
background: #ffd2e1;
}
mask-image: linear-gradient(to top, transparent, #222),
linear-gradient(to left, transparent 12px, #222 12px);
mask-size: 100% 2000000px;
mask-position: left bottom;
transition: mask-position 0.3s, -webkit-mask-position 0.3s;
:hover {
mask-position: left top;
}
`,

ScrollMask: styled.div`
width: 100%;
border: 1px solid #ffa7c4;
`,

MatchBox: styled(CS.BOX.FLEX_COLUMN_CENTER_BOX)`
border: 1px solid #fff;
border-radius: 10px;
margin: 10px;
width: 100%;
height: 100px;
justify-content: center;
`,

GameNumber: styled(CS.BOX.FLEX_CENTER_BOX)`
width: 100%;
height: 50%;
padding: 15px 10px 0px 10px;
font-size: 12px;
color: #ffa7c4;
`,

Match: styled.div`
display: flex;
align-items: center;
width: 100%;
height: 100%;
padding: 0px 5px 5px 5px;
justify-content: space-evenly;
`,

TeamName: styled(CS.BOX.FLEX_CENTER_BOX)`
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 23px;
font-weight: 900;
cursor: pointer;
transition: all ease-in-out 0.2s;
:hover {
color: #ffa7c4;
font-size: 24px;
}
`,

VS: styled.div`
display: flex;
align-items: center;
font-weight: 900;
font-size: 14px;
`,
};

export { HomeStyles };
7 changes: 7 additions & 0 deletions FE/baseball/src/Components/Home/HomeTitle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const HomeTitle = () => {
return <S.HomeTitle>Team illy'swing BASEBALL</S.HomeTitle>;
};

export default HomeTitle;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const GameNumber = () => {
return <S.GameNumber>GameNumber</S.GameNumber>;
};

export default GameNumber;
15 changes: 15 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchBox/Match.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';
import TeamName from './TeamName';
import VS from './VS';

const Match = () => {
return (
<S.Match>
<TeamName />
<VS />
<TeamName />
</S.Match>
);
};

export default Match;
14 changes: 14 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchBox/MatchBox.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import GameNumber from './GameNumber';
import Match from './Match';
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const MatchBox = () => {
return (
<S.MatchBox>
<GameNumber />
<Match />
</S.MatchBox>
);
};

export default MatchBox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const TeamName = () => {
return <S.TeamName>TeamName</S.TeamName>;
};

export default TeamName;
7 changes: 7 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchBox/VS.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const VS = () => {
return <S.VS>VS</S.VS>;
};

export default VS;
14 changes: 14 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchInfo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import MatchInfoBody from './MatchInfoBody';
import MatchInfoTitle from './MatchInfoTitle';
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const MatchInfo = () => {
return (
<S.MatchInfo>
<MatchInfoTitle />
<MatchInfoBody />
</S.MatchInfo>
);
};

export default MatchInfo;
20 changes: 20 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchInfoBody.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';
import MatchBox from './MatchBox/MatchBox';

const MatchInfoBody = () => {
return (
<S.ScrollMask>
<S.MatchInfoBody>
<MatchBox />
<MatchBox />
<MatchBox />
<MatchBox />
<MatchBox />
<MatchBox />
<MatchBox />
</S.MatchInfoBody>
</S.ScrollMask>
);
};

export default MatchInfoBody;
7 changes: 7 additions & 0 deletions FE/baseball/src/Components/Home/MatchInfo/MatchInfoTitle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { HomeStyles as S } from '@/Components/Home/HomeStyles';

const MatchInfoTitle = () => {
return <S.MatchInfoTitle>⚾ Choose the Game ⚾︎</S.MatchInfoTitle>;
};

export default MatchInfoTitle;
14 changes: 14 additions & 0 deletions FE/baseball/src/Components/Intro/GameStartButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import GameTitle from '@/Components/Intro/GameTitle';
import { IntroStyles as S } from '@/Components/Intro/IntroStyles';
import { Link } from 'react-router-dom';

const GameStartButton = () => {
return (
<Link to="/home">
<S.GameStartButton>
<GameTitle />
</S.GameStartButton>
</Link>
);
};
export default GameStartButton;
12 changes: 12 additions & 0 deletions FE/baseball/src/Components/Intro/GameTitle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { IntroStyles as S } from '@/Components/Intro/IntroStyles';

const GameTitle = () => {
return (
<S.GameTitle>
Team illy'swing BASEBALL GAME!!! <br />
comming soon...
</S.GameTitle>
);
};

export default GameTitle;
12 changes: 12 additions & 0 deletions FE/baseball/src/Components/Intro/Intro.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { IntroStyles as S } from '@/Components/Intro/IntroStyles';
import GameStartButton from '@/Components/Intro/GameStartButton';

const Intro = () => {
return (
<S.Intro>
<GameStartButton />
</S.Intro>
);
};

export default Intro;
37 changes: 37 additions & 0 deletions FE/baseball/src/Components/Intro/IntroStyles.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import styled from 'styled-components';
import * as CS from '@/Styles/CommonStyles';
import theme from '@/Styles/theme';

const IntroStyles = {
Intro: styled(CS.BOX.FLEX_CENTER_BOX)`
background: #222;
width: 1440px;
height: 1080px;
color: ${theme.COLOR.DEFAULT};
`,

GameTitle: styled.div`
text-align: center;
`,

GameStartButton: styled(CS.BOX.FLEX_CENTER_BOX)`
width: 650px;
height: 100px;
padding: 20px;
border: 1px solid #fff;
border-radius: 10px;
cursor: pointer;
font-size: 30px;
transition: all ease-in-out 0.4s;
font-weight: 700;
:hover {
background: #333;
}
:active {
background: #111;
}
`,
};

export { IntroStyles };
1 change: 1 addition & 0 deletions FE/baseball/src/Routes/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Home } from '@/Components/Home/Home';
1 change: 1 addition & 0 deletions FE/baseball/src/Routes/Intro.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Inrto } from '@/Components/Intro/Intro';
18 changes: 18 additions & 0 deletions FE/baseball/src/Routes/Router.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';
import { Inrto } from '@/Routes/Intro';
import { Home } from '@/Routes/Home';

const Router = () => {
return (
<BrowserRouter>
<Route exact path="/" component={Inrto} />
<Switch>
<Route path="/home" component={Home} />
{/* <Route path="/game" component={Game} /> */}
<Redirect from="*" to="/" />
</Switch>
</BrowserRouter>
);
};

export default Router;
Loading

0 comments on commit db1afae

Please sign in to comment.