Skip to content

Commit 5851cad

Browse files
authored
Merge pull request #5 from CSBeastMode/move-init
Move init
2 parents 66fdd46 + 79f999f commit 5851cad

File tree

15 files changed

+359
-34
lines changed

15 files changed

+359
-34
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@testing-library/react": "^9.3.2",
88
"@testing-library/user-event": "^7.1.2",
99
"axios": "^0.19.1",
10+
"dotenv": "^8.2.0",
1011
"react": "^16.12.0",
1112
"react-dom": "^16.12.0",
1213
"react-router-dom": "^5.1.2",

src/App/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { BrowserRouter, } from "react-router-dom";
33
import Routes from './routes'
44

55
import { Main } from './styles'
6-
import Nav from '../Nav'
76

7+
import Nav from '../Nav'
88
import { RouteContext } from "../Contexts/routeContext";
99

1010
const App = (props) => {

src/App/styles.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@ import img from '../Images/jeremy-thomas-4dpAqfTbvKA-unsplash.jpg'
33
// adding comment
44
export const Main = styled.main`
55
display: flex;
6-
justify-content: center;
6+
flex-direction: column;
7+
justify-content: space-evenly;
78
align-items: center;
8-
flex-flow: column;
9+
10+
main {
11+
width: 99%
12+
height: 99%
13+
}
14+
15+
16+
// flex-flow: column;
917
background-image: url(${img});
1018
background-color: #D4C7DC; /* Used if the image is unavailable */
1119
height: -webkit-fill-available; /* You must set a specified height */

src/Game/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react'
22
import {
33
Main,
4+
Bridge,
5+
Container
46
} from "./styles";
57

68
import Terminal from '../Terminal'
@@ -9,8 +11,11 @@ import Map from '../Map'
911
const Game = () => {
1012
return (
1113
<Main>
12-
<Terminal />
13-
<Map />
14+
<Container>
15+
<Bridge id='bridge' />
16+
<Terminal id='term' />
17+
<Map id='map' />
18+
</Container>
1419
</Main>
1520
)
1621
}

src/Game/styles.js

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,79 @@
11
import styled from 'styled-components'
2+
import bridge from '../Images/humanbridge.png'
23

34
export const Main = styled.main`
4-
display: flex;
5-
justify-content: center;
6-
align-items: center;
7-
`
5+
// display: flex;
6+
// flex-direction: row;
7+
// justify-content: center;
8+
// align-items: space-evenly;
9+
height: 95vh:
10+
width: 95vw;
11+
display: grid;
12+
grid-template-columns: repeat(20, 1fr);
13+
grid-template-rows: repeat(20, 1fr);
14+
15+
#bridge {
16+
grid-column: 1 / span
17+
grid-column-end: ;
18+
// max-width: 50vw;
19+
}
20+
21+
#term {
22+
// max-width: 50vw;
23+
}
24+
25+
26+
`
27+
export const Container = styled.section`
28+
29+
`
30+
31+
export const Bridge = styled.div`
32+
// display: flex;
33+
// justify-content: center;
34+
// align-items: center;
35+
border: 4px solid white;
36+
background-image: url(${bridge});
37+
// background-color: #D4C7DC; /* Used if the image is unavailable */
38+
height: 500px; /* You must set a specified height */
39+
background-position: center; /* Center the image */
40+
background-repeat: no-repeat; /* Do not repeat the image */
41+
background-size: cover; /* Resize the background image to cover the entire container */
42+
`
43+
44+
//FROM MAIN
45+
// display: grid;
46+
// grid-template-rows: repeat(20, 5vw)
47+
// grid-template-columns: repeat(20, 5vw)
48+
49+
50+
// @media(min-width: 500px){
51+
// div{
52+
// grid-row: 0 / span 20
53+
// grid-column: 0 / span 20
54+
// }
55+
// }
56+
57+
58+
//FROM CONTAINER
59+
// display: grid
60+
// grid-template-rows: 20% 20% 20% 20% 20%
61+
// grid-template-columns: 20% 20% 20% 20% 20%
62+
// width: 100vw;
63+
// height: 95vh;
64+
// margin-top: 5px;
65+
// padding: 0px;
66+
67+
// #bridge {
68+
// grid-column: 1 / span 2;
69+
// grid-row: 1 / span 2;
70+
// }
71+
72+
// #term {
73+
// width: 100vw;
74+
// grid-columm: 1 / span 2;
75+
// grid-row: 4 / span 2;
76+
// }
77+
// #map{
78+
// grid-row: 4;
79+
// }

src/Images/Starship.png

499 KB
Loading

src/Images/humanbridge.png

3.61 MB
Loading

src/Landing/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
MyImage,
88
} from "./styles";
99
import { Link } from "react-router-dom";
10-
import img from '../Images/ship.png'
10+
import img from '../Images/Starship.png'
1111

1212

1313
const Landing = () => {

src/Map/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import React from 'react'
2+
import { Map } from "./styles";
23

34
const index = () => {
45
return (
5-
<div>
6+
<Map>
67

7-
</div>
8+
</Map>
89
)
910
}
1011

src/Map/styles.js

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
import styled from 'styled-components'
22

3-
export const Map = styled.section`
4-
display: grid:
5-
grid-template-rows: repeat(8, 12.5vh);
6-
grid-template-colums: repeat(8, 12.5vh);
7-
8-
@media (min-width: 768px){
9-
display:flex;
10-
}
3+
import starship from '../Images/Starship.png'
4+
5+
// const mapObj = {
6+
// rows: 10,
7+
// columns: 10,
8+
// }
9+
10+
// display: grid:
11+
// grid-template-rows: repeat(${mapObj.rows}, 100/${mapObj.rows}vh);
12+
// grid-template-columns: repeat(${mapObj.columns}, 100/${mapObj.columns}vw);
13+
14+
15+
export const Map = styled.div`
16+
// display: flex;
17+
// justify-content: center;
18+
// align-items: center;
19+
20+
background-image: url(${starship});
21+
// background-color: #D4C7DC; /* Used if the image is unavailable */
22+
height: 1200px; /* You must set a specified height */
23+
background-position: center; /* Center the image */
24+
background-repeat: no-repeat; /* Do not repeat the image */
25+
background-size: contain; /* Resize the background image to cover the entire container */
26+
27+
// @media (min-width: 768px){
28+
// display:flex;
29+
// }
30+
`
31+
32+
export const Room = styled.div`
33+
1134
`

0 commit comments

Comments
 (0)