Skip to content

Commit 98d8e73

Browse files
committed
lots of random things inculding a new color theme
1 parent f03c228 commit 98d8e73

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

css/main.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ body {
319319
display: inline;
320320
}
321321

322-
#gameoptions {
322+
#gameoptions, .themeSelectors {
323323
display: flex;
324324
flex-direction: row;
325325
flex-wrap: wrap;

games/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3 id="title">Loading...</h3><br>
2828
<a id="advanced" class="squaresNew noColorChange">Show advanced options</a>
2929
</div>
3030
<div id="html5gameoptions">
31-
<a id="fullscreen" class="squaresNew noColorChange">Open game in new tab</a>
31+
<a id="fullscreen" class="squaresNew">Open game in new tab</a>
3232
</div>
3333
</div>
3434
<br><br><br><br>

images/bg/neon.jpg

5.89 KB
Loading

javascript/main.js

+17-9
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,15 @@ var colorThemes = {
268268
'link': '#808080',
269269
'sidebarlink': '#808080',
270270
'button': '#404040'
271+
},
272+
'Neon': {
273+
'backgroundtype': 'image',
274+
'background': '/images/bg/neon.jpg',
275+
'textbg': '#000000',
276+
'text': '#ffffff',
277+
'link': '#fffa00',
278+
'sidebarlink': '#00ccf5',
279+
'button': '#dc00f0'
271280
}
272281
};
273282

@@ -385,11 +394,6 @@ function makeSettingsPage() {
385394
changeStyleForElement(currentButton,'color','#ffffff');
386395
buttonHover(currentButton,themeData.button);
387396
document.getElementById('button_div').appendChild(currentButton);
388-
for (var j = 0;j < 3;j++) {
389-
document.getElementById('button_div').appendChild(
390-
document.createElement('br')
391-
);
392-
}
393397
currentButton = null;
394398
}
395399
var save = document.getElementById('savecolortheme');
@@ -421,15 +425,19 @@ function makeSettingsPage() {
421425
document.getElementById('customtheme_bgtype').click();
422426
document.getElementById('savecolortheme').onclick = function() {
423427
var output = {};
424-
'[IMAGE]' == document.getElementById('bgtype_display').innerHTML
425-
? output.backgroundtype = 'image'
426-
: output.backgroundtype == 'color';
428+
if (document.getElementById('bgtype_display').innerHTML === '[IMAGE]') {
429+
output.backgroundtype = 'image'
430+
}
431+
else {
432+
output.backgroundtype = 'color';
433+
}
427434
output.background = document.getElementById('bgsrc_input').firstChild.value;
428435
output.textbg = document.getElementById('textbg_input').value;
429436
output.text = document.getElementById('text_input').value;
430437
output.link = document.getElementById('link_input').value;
431438
output.sidebarlink = document.getElementById('sidebarlink_input').value;
432439
output.button = document.getElementById('button_input').value;
440+
console.log(JSON.stringify(output));
433441
setCookie('customColorTheme', JSON.stringify(output), 1000);
434442
setCookie('colorTheme', 'Custom', 1000);
435443
colorTheme();
@@ -464,7 +472,7 @@ function showMessage (content, closeMessage) {
464472
close.id = 'close';
465473
close.className = 'noColorChange';
466474
gray.style = `
467-
background: rgba(60,60,60,0.6);
475+
background: rgba(0,0,0,0.7);
468476
position: fixed;
469477
top: 0px;
470478
left: 0px;

stuff/settings/index.html

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@ <h3 id="title">Settings</h3><br>
1515
<p>To change your color theme, simply click the theme you want and it will change.</p>
1616
<div id="button_div">
1717
</div>
18-
<br><p> </p><br><p id="lowertext">Make a custom theme: (WORK IN PROGRESS)</p><br>
18+
<br><p> </p><br><p> </p><br><p> </p><br><p> </p><br><br>
19+
<h3 id="lowertext">Make a custom theme!</h3><br>
1920
<div><p class="customColorLabel" id="customtheme_bgtype">Background Type: <span id="bgtype_display">[IMAGE]</span> (click to change)</p></div>
2021
<div><p class="customColorLabel" id="customtheme_bgsrc"><span id="bgsrc_label"></span><span id="bgsrc_input"></span></p></div>
2122
<div><p class="customColorLabel" id="customtheme_textbg">Text Background Color: <input id="textbg_input" type="color"></p></div>
2223
<div><p class="customColorLabel" id="customtheme_text">Text Color: <input id="text_input" type="color"></p></div>
2324
<div><p class="customColorLabel" id="customtheme_link">Link Color: <input id="link_input" type="color"></p></div>
2425
<div><p class="customColorLabel" id="customtheme_sidebarlink">Sidebar Link Color: <input id="sidebarlink_input" type="color"></p></div>
2526
<div><p class="customColorLabel" id="customtheme_button">Button Color: <input id="button_input" type="color"></p></div>
26-
<a id="savecolortheme" class="noColorChange">Save!</a>
27-
<br>
28-
<br>
29-
<br>
27+
<a id="savecolortheme" class="squaresNew noColorChange">Save!</a>
28+
<br><br><br><br><br><br>
3029
</div>
3130
</div>
3231
<script id="scriptBody" src="/javascript/bodyScript.js"></script>

0 commit comments

Comments
 (0)