bugfix entities gridrow, grid && improve graph design on homepage
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Mine\SeekerBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
@@ -78,4 +79,38 @@ class Grid
|
||||
{
|
||||
return $this->playedGame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add gridRow
|
||||
*
|
||||
* @param GridRow $gridRow
|
||||
*
|
||||
* @return Grid
|
||||
*/
|
||||
public function addGridRow(GridRow $gridRow)
|
||||
{
|
||||
$this->gridRow[] = $gridRow;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove gridRow
|
||||
*
|
||||
* @param GridRow $gridRow
|
||||
*/
|
||||
public function removeGridRow(GridRow $gridRow)
|
||||
{
|
||||
$this->gridRow->removeElement($gridRow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gridRow
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getGridRow()
|
||||
{
|
||||
return $this->gridRow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Grid
|
||||
private $playedGame;
|
||||
|
||||
/**
|
||||
* @var GridCol
|
||||
* @var GridRow
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\GridRow", mappedBy="grid", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
|
||||
@@ -78,38 +78,4 @@ class Grid
|
||||
{
|
||||
return $this->playedGame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add gridRow
|
||||
*
|
||||
* @param GridCol $gridRow
|
||||
*
|
||||
* @return Grid
|
||||
*/
|
||||
public function addGridRow(GridCol $gridRow)
|
||||
{
|
||||
$this->gridRow[] = $gridRow;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove gridRow
|
||||
*
|
||||
* @param GridCol $gridRow
|
||||
*/
|
||||
public function removeGridRow(GridCol $gridRow)
|
||||
{
|
||||
$this->gridRow->removeElement($gridRow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gridRow
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getGridRow()
|
||||
{
|
||||
return $this->gridRow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700|Ravi+Prakash&subset=latin-ext');
|
||||
/*
|
||||
font-family: 'Ravi Prakash', cursive;
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
*/
|
||||
|
||||
* {
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
background: #2C3E50;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
background: rgba(255, 255, 255, 0.7) url('/bundles/mineseeker/images/homepage/header.jpg') no-repeat;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 560px;
|
||||
color: #ffffff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
display: block;
|
||||
font: normal 72px 'Ravi Prakash', cursive;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
color: #ffa800;
|
||||
}
|
||||
|
||||
header h3 {
|
||||
display: block;
|
||||
font: normal 32px 'Open Sans Condensed', sans-serif;
|
||||
text-align: center;
|
||||
color: #ffcd02;
|
||||
}
|
||||
|
||||
header > a {
|
||||
background: #e8e8e8;
|
||||
display: block;
|
||||
font: bold 22px 'Open Sans Condensed', sans-serif;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
color: #2C3E50;
|
||||
padding: 10px 70px;
|
||||
margin-top: 20px;
|
||||
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75);
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
header > a:hover {
|
||||
background: #ffffff;
|
||||
|
||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.75);
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
header > img {
|
||||
position: absolute;
|
||||
width: 350px;
|
||||
bottom: -250px;
|
||||
}
|
||||
|
||||
main {
|
||||
font: normal 32px 'Open Sans Condensed', sans-serif;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
padding-top: 50px;
|
||||
}
|
||||
@@ -14,6 +14,11 @@ body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mine-container {
|
||||
background: url("/bundles/mineseeker/images/bg-mineseeker-outbg.jpg") no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
@@ -65,7 +65,10 @@ class MineSeeker extends React.Component {
|
||||
session: this.state.session,
|
||||
channel: this.state.channel,
|
||||
overlay: true,
|
||||
overlayTitle: "We are waiting for your opponent..."
|
||||
overlayTitle: "We are waiting for your opponent bazmeg...",
|
||||
overlaySubTitle: this.state.gameAssoc
|
||||
? <a href={"/play/" + this.state.gameAssoc} target="_blank">Play w/ me!</a>
|
||||
: ''
|
||||
});
|
||||
|
||||
/** setup the web player */
|
||||
@@ -127,7 +130,7 @@ class MineSeeker extends React.Component {
|
||||
}
|
||||
);
|
||||
},
|
||||
(error, desc) => console.log(["RPC Error", error, desc])
|
||||
(error, desc) => console.error(["RPC Error", error, desc])
|
||||
);
|
||||
});
|
||||
|
||||
@@ -135,7 +138,7 @@ class MineSeeker extends React.Component {
|
||||
* DisConnect
|
||||
* Error provides us with some insight into the disconnection: error.reason and error.code
|
||||
*/
|
||||
websocket.on("socket/disconnect", (error) => console.log("Disconnected for " + error.reason + " with code " + error.code));
|
||||
websocket.on("socket/disconnect", (error) => console.error("Disconnected for " + error.reason + " with code " + error.code));
|
||||
}
|
||||
|
||||
onClick(coords) {
|
||||
@@ -168,18 +171,6 @@ class MineSeeker extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
/** FOR DEVELOPMENT */
|
||||
createLink() {
|
||||
/*
|
||||
<div>
|
||||
{this.createLink()}
|
||||
</div>
|
||||
*/
|
||||
return this.state.gameAssoc
|
||||
? <a href={"/play/" + this.state.gameAssoc} target="_blank">Play w/ me!</a>
|
||||
: '';
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<GridControl ref="gridControl"
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
Bazmeg index.
|
||||
{% block header %}
|
||||
<h1>MineSeeker</h1>
|
||||
<h3>version 1.0a</h3>
|
||||
<a href="{{ path('MineSeekerBundle_gamePlay') }}">Play now</a>
|
||||
<img src="{{ asset('bundles/mineseeker/images/homepage/mineseeker.png') }}" alt="" border="0">
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
The site is under construction
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% stylesheets filter='cssrewrite'
|
||||
'@MineSeekerBundle/Resources/public/css/style.homepage.css' %}
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_url }}" type="text/css"/>
|
||||
{% endstylesheets %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user