FirstCommit

Set project
This commit is contained in:
NoNameGuy 2016-10-13 20:39:37 +01:00
commit c24194fe7f
8 changed files with 522 additions and 0 deletions

144
css/main.css Normal file
View File

@ -0,0 +1,144 @@
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
h1,h2{
text-align: center;
font-family: monospace;
}
.container {
margin-bottom: 100px;
}
.dad-board{
width: 450px;
height: 450px;
margin: 10px auto;
}
.dad-row{
width: 450px;
height: 50px;
display: flex;
}
.dad-row .dad-cell {
width: 50px;
height: 50px;
border-left: 1px solid black;
border-top: 1px solid black;
line-height: 50px;
text-align: center;
}
.dad-row .dad-cell input {
width: 40px;
height: 40px;
text-align: center;
outline: none;
border: none;
display: block;
margin: 4px;
}
.dad-row .dad-cell:last-child{
border-right: 1px solid black;
}
.dad-row:last-child .dad-cell{
border-bottom: 1px solid black;
}
.dad-row:first-child .dad-cell{
border-top: 2px solid black;
}
.dad-row:last-child .dad-cell{
border-bottom: 2px solid black;
}
.dad-row:nth-child(3n) .dad-cell{
border-bottom: 2px solid black;
}
.dad-row .dad-cell:first-child {
border-left: 2px solid black;
}
.dad-row .dad-cell:last-child {
border-right: 2px solid black;
}
.dad-row .dad-cell:nth-child(3n) {
border-right: 2px solid black;
}
input.with-value{
background-color: rgba(234,162,89,0.6);
}
input.conflict{
background-color: rgba(235,86,86,0.6) !important;
}
input.individual-conflict{
background-color: rgba(235,86,86,0.6) !important;
}
input.finished{
background-color: rgba(179,234,89,0.6); !important;
}
.dad-row .dad-cell input.individual-highlight{
border: 4px solid #d9534f;
}
.dad-row .dad-cell input.highlight{
border: 4px solid #337ab7;
}
input[disabled].initial{
font-weight: bold;
cursor: not-allowed;
background-color: #CCCCCC;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.messages{
width: 500px;
height: 40px;
line-height: 40px;
text-align: center;
margin: auto;
}
#message{
font-weight: bold;
font-family: monospace;
font-size: 1.5em;
}
.controls{
width: 500px;
margin: 10px auto;
text-align: center;
}
#highlightButtons{
width: 500px;
margin: 20px auto;
text-align: center;
}
#select-mode{
display: inline-block;
width: 200px;
}

BIN
img/loading.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
img/photo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
img/photo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
img/photo3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
img/photo4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

358
index.html Normal file
View File

@ -0,0 +1,358 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" integrity="sha256-rByPlHULObEjJ6XQxW/flG2r+22R5dKiAoef+aXWfik=" crossorigin="anonymous" />
<link rel="stylesheet" href="css/main.css" />
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="game/main.js"></script>
<title>
DAD - PROJECT 1
</title>
</head>
<body>
<div class="container">
<h1>DAD - PROJECT 1</h1>
<h2>REST SUDOKU</h2>
<div class="dad-board">
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="0">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="0">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="1">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="1">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="2">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="2">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="3">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="3">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="4">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="4">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="5">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="5">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="6">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="6">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="7">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="7">
</div>
</div>
<div class="dad-row">
<div class="dad-cell">
<input type="number" data-column="0" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="1" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="2" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="3" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="4" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="5" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="6" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="7" data-line="8">
</div>
<div class="dad-cell">
<input type="number" data-column="8" data-line="8">
</div>
</div>
</div>
<div class="controls">
<img src="img/loading.gif" id="loading" class="invisible">
<button id="btn-check" class="btn btn-danger">Check Game</button>
<select class="form-control" id="select-mode">
<option value="easy" selected>Easy</option>
<option value="medium">Medium</option>
<option value="hard">Hard</option>
</select>
<button id="btn-new" class="btn btn-success">New Game</button>
</div>
<div id="highlightButtons">
<button type="button" class="btn btn-primary" value="1">1</button>
<button type="button" class="btn btn-primary" value="2">2</button>
<button type="button" class="btn btn-primary" value="3">3</button>
<button type="button" class="btn btn-primary" value="4">4</button>
<button type="button" class="btn btn-primary" value="5">5</button>
<button type="button" class="btn btn-primary" value="6">6</button>
<button type="button" class="btn btn-primary" value="7">7</button>
<button type="button" class="btn btn-primary" value="8">8</button>
<button type="button" class="btn btn-primary" value="9">9</button>
</div>
<div class="row" id="authors-section">
<h1 class="text-center">Project authors</h1>
<div class="col-xs-6 col-sm-4 text-center photo-zone">
<div class="thumbnail">
<img alt="Photo1" src="img/photo1.png">
<div class="caption">
<h3>2140111</h3>
<p>Nome do primeiro estudante do grupo</p>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-4 text-center photo-zone">
<div class="thumbnail">
<img alt="Photo1" src="img/photo2.png">
<div class="caption">
<h3>2140222</h3>
<p>Nome do segundo estudante do grupo</p>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-4 text-center photo-zone">
<div class="thumbnail">
<img alt="Photo1" src="img/photo3.png">
<div class="caption">
<h3>2140333</h3>
<p>Nome do terceiro estudante do grupo</p>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-4 text-center photo-zone">
<div class="thumbnail">
<img alt="Photo1" src="img/photo4.png">
<div class="caption">
<h3>2140444</h3>
<p>Nome do quarto estudante do grupo</p>
</div>
</div>
</div>
</div>
</div>
<div id="dialog" title="REST SUDOKU">
<p id="message"></p>
<span id="time"></span>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
<script src="js/main.js">
</script>
</body>
</html>

20
js/main.js Normal file
View File

@ -0,0 +1,20 @@
//2110117 - Paulo Vieira
// Implementation:
//GET BOARD DIFF
//$.get(URL,data,function(data,status,xhr),dataType)
function crateGame("dad-board"){
$(document).ready(function(){
$("btn-new").click(function(){
$.get("http://198.211.118.123:10001/board/:mode", function(resp){
alert(resp.ip);
}, "jsonp");
});
}
}