diff --git a/build/application.js b/build/application.js index 1cb5db7..0d798da 100644 --- a/build/application.js +++ b/build/application.js @@ -20,15 +20,27 @@ } var commandline = document.getElementById("command"); commandline.value = ""; + commandline.oninput = syncTyping; commandline.onkeydown = syncTyping; commandline.onkeyup = syncTyping; commandline.onselect = syncTyping; commandline.onfocus = syncTyping; commandline.focus(); - document.onmousedown = function() { + document.body.onmousedown = function() { commandline.focus(); return false; }; + var brightness = 0; + function alterBrightness(delta) { + brightness = Math.max(0, Math.min(1, brightness + delta)); + document.getElementById("scanlines").style.backgroundColor = "hsl(120, 100%, " + 16 * brightness + "%)"; + } + document.getElementById("knobup").onmousedown = function() { + alterBrightness(.0625); + }; + document.getElementById("knobdown").onmousedown = function() { + alterBrightness(-.0625); + }; function handleForm() { var history = document.getElementById("history"); var val = this.command.value; diff --git a/build/assets/images/knob.svg b/build/assets/images/knob.svg new file mode 100644 index 0000000..9723ee8 --- /dev/null +++ b/build/assets/images/knob.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + +image/svg+xml + + + + + + + + + + + + + diff --git a/build/assets/images/scanline.svg b/build/assets/images/scanline.svg index 7de66c9..73cfb81 100644 --- a/build/assets/images/scanline.svg +++ b/build/assets/images/scanline.svg @@ -9,5 +9,5 @@ - + diff --git a/build/assets/images/screen.svg b/build/assets/images/screen.svg index 2a14a98..26c66b9 100644 --- a/build/assets/images/screen.svg +++ b/build/assets/images/screen.svg @@ -2,20 +2,14 @@ - - - - - - - - - + + + @@ -27,32 +21,22 @@ - + - - - - - - + + + + + + - - + + -contrast - - - - - +contrast - - - - - diff --git a/build/compiled-styles.css b/build/compiled-styles.css index ca02ffe..e7e7b2b 100644 --- a/build/compiled-styles.css +++ b/build/compiled-styles.css @@ -14,7 +14,7 @@ body { background-image: url('/assets/images/table.svg'); background-size: 100% 100%; } -#processor { +#compy { position: absolute; top: 0; bottom: 0; @@ -28,14 +28,13 @@ body { font-size: 6vh; } @media (max-width: 132.6029165vh) { - #processor { + #compy { height: 75.4131226vw; width: 100%; font-size: 4.524787356vw; } } -#processor:after { - content: ''; +#compy > #case { position: absolute; top: 0; bottom: 0; @@ -43,9 +42,21 @@ body { right: 0; background-image: url('/assets/images/screen.svg'); background-size: 100% 100%; - pointer-events: none; } -#processor > label { +#compy > #case > .knob { + position: absolute; + top: 87.3%; + left: 8.5%; + height: 7%; + width: 4.7%; + background: url('/assets/images/knob.svg'); + background-size: 100% 100%; + cursor: pointer; +} +#compy > #case > .knob#knobup { + left: 13%; +} +#compy > #screen { position: absolute; top: 1em; bottom: 2.25em; @@ -55,15 +66,10 @@ body { word-break: break-all; z-index: 0; } -#processor > label:before, -#processor > label:after { +#compy > #screen > #scanlines { position: absolute; left: 0; right: 0; - content: ''; -} -#processor > label:before { - z-index: -1; top: -3em; bottom: -3em; -webkit-animation: scroll 2s linear infinite; @@ -72,6 +78,7 @@ body { background-size: 25em 4em; background-repeat: repeat-y; background-position: 50% 0%; + z-index: -1; } #scrollback { position: absolute; diff --git a/build/index.php b/build/index.php index a3e81d9..e8d437a 100644 --- a/build/index.php +++ b/build/index.php @@ -8,14 +8,19 @@ -
-