Merge pull request #74 from esSteres/redacted
[Redacted] #71, also fix a bug or two and make header look nicer
This commit is contained in:
commit
7922dd4262
|
@ -18,10 +18,14 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#title {
|
#title {
|
||||||
grid-column: 2;
|
grid-column: 1 / 4;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#title > .page_header {
|
||||||
|
margin: auto
|
||||||
|
}
|
||||||
|
|
||||||
.link{
|
.link{
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
@ -84,11 +88,13 @@ h2 {
|
||||||
.inning {
|
.inning {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.weather {
|
.weather {
|
||||||
float: right;
|
float: right;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
$(document).ready(function (){
|
$(document).ready(function (){
|
||||||
var socket = io.connect();
|
var socket = io.connect();
|
||||||
var gameslist = [];
|
var gameslist = [];
|
||||||
var maxslot = 3;
|
var maxSlot = 1;
|
||||||
var totalslots = 15;
|
|
||||||
var grid = document.getElementById("container");
|
var grid = document.getElementById("container");
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,17 +13,23 @@ $(document).ready(function (){
|
||||||
for (const timestamp in json) {
|
for (const timestamp in json) {
|
||||||
if (!gameslist.includes(timestamp)) { //adds game to list if not there already
|
if (!gameslist.includes(timestamp)) { //adds game to list if not there already
|
||||||
gameslist.push(timestamp)
|
gameslist.push(timestamp)
|
||||||
var gridBoxes = grid.children;
|
for (var slotnum = 1; true; slotnum++) { //this is really a while loop but don't tell anyone
|
||||||
for (var slotnum = 3; slotnum <= Math.min(maxslot, totalslots-1); slotnum++) {
|
if (slotnum >= grid.children.length) {
|
||||||
if (gridBoxes[slotnum].className == "emptyslot") {
|
for (var i = 0; i < 3; i ++) {
|
||||||
|
newBox = document.createElement("DIV");
|
||||||
|
newBox.className = "emptyslot";
|
||||||
|
grid.appendChild(newBox);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (grid.children[slotnum].className == "emptyslot") {
|
||||||
insertGame(slotnum, json[timestamp], timestamp);
|
insertGame(slotnum, json[timestamp], timestamp);
|
||||||
maxslot += 1;
|
maxSlot = Math.max(maxSlot, slotnum);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
for (var slotnum = 3; slotnum <= Math.min(maxslot, totalslots-1); slotnum++) {
|
for (var slotnum = 1; slotnum <= maxSlot; slotnum++) {
|
||||||
if (grid.children[slotnum].timestamp == timestamp) {
|
if (grid.children[slotnum].timestamp == timestamp) {
|
||||||
updateGame(grid.children[slotnum], json[timestamp]);
|
updateGame(grid.children[slotnum], json[timestamp]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src="//code.jquery.com/jquery-3.5.1.min.js"></script>
|
<script src="//code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.0.4/socket.io.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.0.4/socket.io.js"></script>
|
||||||
|
@ -10,12 +9,10 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<section class="container" id="container">
|
<section class="container" id="container">
|
||||||
<div></div>
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h2 class="page_header">THE SIMMADOME</h2>
|
<h2 class="page_header" style="font-size: 50px;">THE SIMMADOME</h2>
|
||||||
<h2 class="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" class="link"><img src="static/discord.png" height="30"></a> to start your own games!</h2>
|
<h2 class="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" class="link"><img src="static/discord.png" height="30"></a> to start your own games!</h2>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
|
||||||
<div class="emptyslot"></div>
|
<div class="emptyslot"></div>
|
||||||
<div class="emptyslot"></div>
|
<div class="emptyslot"></div>
|
||||||
<div class="emptyslot"></div>
|
<div class="emptyslot"></div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user