move header out of grid, for my own sanity

This commit is contained in:
Elijah Steres 2020-12-31 01:33:03 -05:00
parent 76f60e7c2a
commit 248da07bac
3 changed files with 14 additions and 13 deletions

View File

@ -9,7 +9,7 @@ body {
font-family: 'Alegreya', serif;
display: grid;
grid-template-columns: repeat(3, minmax(500px, 1fr));
grid-template-rows: 100px 330px;
grid-template-rows: 330px;
grid-gap: 50px 30px; /*space between rows, then columns*/
align-items: center;
justify-items: center;
@ -17,12 +17,13 @@ body {
grid-auto-flow: row;
}
#title {
grid-column: 1 / 4;
grid-row: 1;
#header {
width: 100%;
height: 100px;
margin-bottom: 50px;
}
#title > .page_header {
#header > .page_header {
margin: auto
}

View File

@ -19,7 +19,7 @@ $(document).ready(function (){
for (const timestamp in json) {
if (!gameslist.includes(timestamp)) { //adds game to list if not there already
gameslist.push(timestamp)
for (var slotnum = 1; true; slotnum++) { //this is really a while loop but shh don't tell anyone
for (var slotnum = 0; true; slotnum++) { //this is really a while loop but shh don't tell anyone
if (slotnum >= grid.children.length) {
for (var i = 0; i < 3; i ++) {
insertEmpty(grid);
@ -32,20 +32,20 @@ $(document).ready(function (){
};
};
for (var slotnum = 1; slotnum < grid.children.length; slotnum++) {
for (var slotnum = 0; slotnum < grid.children.length; slotnum++) {
if (grid.children[slotnum].timestamp == timestamp) {
updateGame(grid.children[slotnum], json[timestamp]);
};
};
};
for (var slotnum = 1; slotnum < grid.children.length; slotnum++) {
for (var slotnum = 0; slotnum < grid.children.length; slotnum++) {
if (grid.children[slotnum].className == "game" && !(Object.keys(json).includes(grid.children[slotnum].timestamp))) {
grid.removeChild(grid.children[slotnum]);
}
}
var requiredcells = Math.max(4, (3 * Math.ceil(Object.keys(json).length/3))+1);
var requiredcells = Math.max(3, 3 * Math.ceil(Object.keys(json).length/3));
while (grid.children.length > requiredcells) {
grid.removeChild(grid.children[requiredcells]);

View File

@ -8,11 +8,11 @@
</head>
<body>
<div id="header">
<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>
</div>
<section class="container" id="container">
<div id="title">
<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>
</div>
<div class="emptyslot"></div>
<div class="emptyslot"></div>
<div class="emptyslot"></div>