-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from sadnessOjisan/develop
サーバーとの疎通機能を完成
- Loading branch information
Showing
26 changed files
with
1,759 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# MarqueeBreakout | ||
マーキータグでブロック崩し | ||
|
||
## 環境 | ||
|
||
``` | ||
$ node -v | ||
v10.13.0 | ||
$ yarn -v | ||
v1.12.3 | ||
``` | ||
|
||
## 開発環境の実行 | ||
|
||
``` | ||
$ yarn install | ||
$ yarn run start:local | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,25 @@ | |
"author": "sadness_ojisan <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@atlaskit/button": "^10.1.0", | ||
"@atlaskit/field-text": "^7.0.17", | ||
"@atlaskit/select": "^6.1.12", | ||
"@types/lodash": "^4.14.118", | ||
"@types/lodash.throttle": "^4.1.4", | ||
"@types/react": "^16.7.6", | ||
"@types/react-dom": "^16.0.9", | ||
"@types/styled-components": "^4.1.0", | ||
"auth0-js": "^9.8.2", | ||
"axios": "^0.18.0", | ||
"bluebird": "^3.5.3", | ||
"jwt-decode": "^2.2.0", | ||
"lodash.throttle": "^4.1.1", | ||
"react": "^16.6.3", | ||
"react-confetti": "^2.3.0", | ||
"react-dom": "^16.6.3", | ||
"styled-components": "^4.1.1" | ||
"react-dom-confetti": "^0.0.10", | ||
"styled-components": "^4.1.1", | ||
"styled-spinkit": "^0.4.0" | ||
}, | ||
"devDependencies": { | ||
"awesome-typescript-loader": "^5.2.1", | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import * as React from "react"; | ||
import styled from "styled-components"; | ||
import color from "../constants/color"; | ||
import Mode from "../constants/mode"; | ||
interface Props {} | ||
|
||
const Home = (props: Props) => { | ||
const { | ||
handleLogin, | ||
handleLogout, | ||
handleOpenRanking, | ||
handleOpenHow2Use, | ||
isLogin | ||
} = props; | ||
return ( | ||
<Wrapper> | ||
<Container> | ||
<Title> | ||
<marquee width="100%" scrollamount={30} behavior="alternate"> | ||
marqueeタグでブロック崩し | ||
</marquee> | ||
</Title> | ||
<Description> | ||
こちらはクソアプリアドベンドカレンダー13日目の成果物です。サインアップしなくても最下部のコンソールからゲームを始められますが、サインアップすると全国のライバルと競えます。 | ||
</Description> | ||
</Container> | ||
<StyledButton onClick={handleOpenHow2Use}>遊び方をみる</StyledButton> | ||
{!isLogin && ( | ||
<StyledButton onClick={handleLogin}>ログインする</StyledButton> | ||
)} | ||
{isLogin && ( | ||
<StyledButton onClick={handleLogout}>ログアウトする</StyledButton> | ||
)} | ||
<StyledButton onClick={() => handleOpenRanking()} align="center"> | ||
ランキングを確認する | ||
</StyledButton> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
const Title = styled.p` | ||
text-align: center; | ||
font-size: 48px; | ||
padding-top: 24px; | ||
color: ${color.black}; | ||
width: 100%; | ||
padding: 0px 24px; | ||
`; | ||
|
||
const Description = styled.p` | ||
text-align: center; | ||
font-size: 20px; | ||
color: ${color.black}; | ||
width: 100%; | ||
margin-bottom: 24px; | ||
`; | ||
|
||
const Container = styled.div` | ||
position: absolute; | ||
top: 0; | ||
`; | ||
|
||
const StyledButton = styled.div` | ||
height: 36px; | ||
cursor: pointer; | ||
font-size: 28px; | ||
color: ${color.black}; | ||
margin-bottom: 24px; | ||
border: solid 1px ${color.black}; | ||
background-color: ${color.black}; | ||
padding: 12px; | ||
border-radius: 36px; | ||
color: white; | ||
:hover { | ||
border: solid 1px ${color.gray}; | ||
background-color: ${color.gray}; | ||
color: ${color.black}; | ||
} | ||
`; | ||
|
||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import * as React from "react"; | ||
import styled from "styled-components"; | ||
import zIndex from "../constants/zIndex"; | ||
import { Score } from "../typedef/Score"; | ||
import color from "../constants/color"; | ||
|
||
interface Props { | ||
onClose(): void; | ||
} | ||
|
||
const How2Use = props => { | ||
const { onClose } = props; | ||
return ( | ||
<ModalWrapper> | ||
<InnterContainer> | ||
<ModalHeader> | ||
<ModalTitle>遊び方</ModalTitle> | ||
<CloseLink onClick={onClose}>閉じる</CloseLink> | ||
</ModalHeader> | ||
<ContentsWrapper> | ||
<p>marqueeタグのプロパティを制御することで、ブロック崩しをしよう</p> | ||
<p>プロパティは最下部のコンソールから触れるよ</p> | ||
<p>数値を変更するだけでプロパティが反映されるよ</p> | ||
<p>ブロックを崩すと点数がもらえるよ</p> | ||
<p>ログインしていると点数で全国ランクを競えるよ</p> | ||
</ContentsWrapper> | ||
</InnterContainer> | ||
</ModalWrapper> | ||
); | ||
}; | ||
|
||
const ModalWrapper = styled.div` | ||
background-color: rgba(0, 0, 0, 0.5); | ||
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
z-index: ${zIndex.modal}; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
top: 0; | ||
left: 0; | ||
color: ${color.black}; | ||
`; | ||
|
||
const InnterContainer = styled.div` | ||
background-color: white; | ||
position: absolute; | ||
width: 80%; | ||
height: 80%; | ||
border-radius: 8px; | ||
`; | ||
|
||
const ModalHeader = styled.div` | ||
position: relative; | ||
width: 100%; | ||
height: 40px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 8px 0px; | ||
`; | ||
|
||
const ModalTitle = styled.h3` | ||
text-align: center; | ||
font-size: 20px; | ||
`; | ||
|
||
const CloseLink = styled.span` | ||
position: absolute; | ||
right: 12px; | ||
cursor: pointer; | ||
font-size: 20px; | ||
color: ${color.blue}; | ||
`; | ||
|
||
const ContentsWrapper = styled.div` | ||
overflow-y: scroll; | ||
height: calc(100% - 56px); | ||
overflow-y: scroll; | ||
`; | ||
|
||
export default How2Use; |
Oops, something went wrong.