Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ $ npm start
...
Starting up http-server, serving ./public
Available on:
http://127.0.0.1:4321
http://10.0.1.11:4321
http://127.0.0.1:8080
http://10.0.1.11:8080
```

Then open `http://localhost:4321/` in your browser of choice and play away!
Then open `http://localhost:8080/` in your browser of choice and play away!
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bowser Games</title>
</head>
<body>
<div id="root"></div>
<script src="bundle.js"></script>
</body>
</html>
23 changes: 21 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.0",
"description": "A collection of games to play in a web browser.",
"scripts": {
"start": "http-server ./public -p 4321"
"build": "./node_modules/bin/webpack",
"start": "./node_modules/.bin/webpack-dev-server"
},
"repository": {
"type": "git",
Expand All @@ -19,7 +20,25 @@
"url": "https://github.com/GuildCrafts/browser-games/issues"
},
"homepage": "https://github.com/GuildCrafts/browser-games#readme",
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-preset-env": "^1.1.4",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
"babel-register": "^6.18.0",
"react-hot-loader": "^1.3.1",
"react-scripts": "0.8.5",
"url-loader": "^0.5.8",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"
},
"dependencies": {
"http-server": "^0.9.0"
"http-server": "^0.9.0",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-router": "^4.0.0",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2",
"react-history": "*"
}
}
22 changes: 0 additions & 22 deletions public/index.html

This file was deleted.

Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/components/.DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions src/components/App/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import './app.css';
import Nav from 'components/Nav/Nav';
import Home from 'components/Home/Home';
import Footer from 'components/Footer/Footer';

export default class App extends React.Component{

render(){
return(
<div className="app_container">
<Nav />
<Home />
<Footer />
</div>
)
}
}
File renamed without changes.
13 changes: 13 additions & 0 deletions src/components/Footer/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import './footer.css'

export default class Footer extends React.Component{
render(){
return(
<div className="footer">
<div className="footer_container"><p className="footer_title">Footer</p></div>
<div className="footer_top_section"></div>
</div>
)
}
}
45 changes: 45 additions & 0 deletions src/components/Footer/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.footer{
position:relative;
/*background-color:red;*/
}

/*.footer_container{
background-color:green;
margin-top:9px;
padding-top:3.52%;
position:absolute;
width:100%;
}*/

.footer_container:after{
content:'';
border-top: solid 140px transparent;
border-left: solid 100vw yellowgreen;
/*background: repeating-linear-gradient( -45deg, #000 0px, #000 5px, #333 6px, #333 11px, #000 12px);*/
background-color: rgb(137,216,230);
background-image: linear-gradient(transparent 50%, rgb(173,216,230) 50%);
background-size: 50px 15px;
position: absolute;
margin-top:-131px;
}

/*.footer_top_section {
position:relative;
background-color:#ddd;
height:200px !important;
width:100% !important;
z-index: 1;
}*/

.footer_top_section:after{
content:'';
border-top: solid 140px transparent;
border-right: solid 100vw orange;
position: absolute;
margin-top:-131px;
/*border-left: solid 50vw transparent;*/
/*top: 100%;
left: 0;
width: 0;
height: 0;*/
}
Binary file added src/components/Home/bowser_hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions src/components/Home/home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.home_container{
/*margin-left:25%*/
height:420px;
}

.home_bowser_hero{
margin-top: -55px;
position: absolute;
width: 134%;
height: 190%;
max-width: 500px;
max-height: 500px;
padding-left:30%;
z-index:2;
}

.home_princess_castle{
position:absolute;
margin-left:10px;
margin-bottom:5px;
border-radius:5px;
z-index: -10;
margin-top:-30px;
}

.home_link_container{
margin-left:5%;
margin-top:7%;
position:absolute;
z-index:2;
}

.home_links{
padding:10px;
border:4px solid black;
border-radius:5px;
margin-bottom:10px;
cursor:pointer;
background-color:white;
min-width:90px;
width:35vw;
font-size:20px;
}

.home_tictactoe_link{
margin-top:8%;
}

.home_tictactoe_link:hover{
border:4px solid skyblue;
}

.home_simon_link:hover{
border:4px solid limegreen;
}

.home_empty_link:hover{
border:4px solid red;
}

@media (min-width: 600px) and (max-width:1000px){
.home_empty_link{
background-color:gainsboro;
}
.home_bowser_hero{
padding-left:43%;
width: 570px;
height: 545%;
}
}
18 changes: 18 additions & 0 deletions src/components/Home/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import './home.css';

export default class Index extends React.Component{

render(){
return(
<div className="home_container">
<img className="home_bowser_hero" src={require('url-loader?limit=10000!./bowser_hero.png')} />
<div className="home_link_container">
<div className="home_links home_tictactoe_link">Tic Tac Toe</div>
<div className="home_links home_simon_link">Simon</div>
<div className="home_links home_empty_link">Empty</div>
</div>
</div>
)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/components/Nav/Nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import './nav.css';

export default class Nav extends React.Component{

render(){
return(
<div className="nav">
<div className="nav_container"><p className="nav_title">Bowser Games</p></div>
<div id="top_section"></div>
</div>
)
}
}


{/* <h1>Browser Games!</h1>

<p>A collection of games to play in a web browser.</p>

<hr>

<nav>
<ul>
<li><a>LINK TO FIRST GAME</a></li>
<li><a>LINK TO SECOND GAME</a></li>
<li>...</li>
</ul>
</nav> */}
22 changes: 22 additions & 0 deletions src/components/Nav/nav.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.nav{
position:relative;
/*z-index:5;*/
}
.nav_container{
background-color:#ddd;
margin-top:-16px;
padding-top:6%;
}

#top_section:after {
content:'';
border-top: solid 51px #ddd;
border-right: solid 100vw transparent;
position:absolute;
margin-top:-30px;
}

.nav_title{
font-size:30px;
padding-left:15%
}
3 changes: 3 additions & 0 deletions src/components/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body{
margin:0;
}
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { render } from 'react-dom';
import App from 'components/App/App';
import './components/index.css';

render(
<App />,
document.getElementById('root')
);
Empty file added src/js/.gitkeep
Empty file.
36 changes: 36 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
var webpack = require('webpack');
var path = require('path');

module.exports = {
devtool: 'inline-source-map',
entry: [
'webpack-dev-server/client?http://127.0.0.1:8080/',
'webpack/hot/only-dev-server',
'./src'
],
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js'
},
resolve: {
modulesDirectories: ['node_modules', 'src'],
extensions: ['', '.js']
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel?presets[]=react,presets[]=es2015']
},
{
test: /\.css$/,
loader: 'style!css'
},
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
};