diff --git a/index.html b/index.html index 718b033..dc6f647 100644 --- a/index.html +++ b/index.html @@ -38,15 +38,15 @@

Random Disco Light Simulator

+ + github +
-
- - github - +
+
-
diff --git a/script.js b/script.js index 51667be..6cc93ee 100644 --- a/script.js +++ b/script.js @@ -1,3 +1,15 @@ +document.body.addEventListener("click", () => { + if (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) { + document.exitFullscreen(); + document.getElementById("screen").innerHTML = "Enable Fullscreen"; + } + else { + + document.documentElement.requestFullscreen(); + document.getElementById("screen").innerHTML = "Exit Fullscreen"; + } +}) + function run() { function getRandomColor() { diff --git a/style.css b/style.css index 7408a9d..af6b7ea 100644 --- a/style.css +++ b/style.css @@ -61,18 +61,34 @@ h1 { } +#screen { + border-radius: 10px; + background: linear-gradient(yellow, green); + cursor: pointer; +} + +#screen:hover { + background: linear-gradient(green, yellow); + +} + .button { - margin-top: 50px; - margin-bottom: 20px; + margin-top: 40px; + margin-bottom: 16px; display: flex; justify-content: center; align-items: center; gap: 20px; } +.screen { + display: flex; + justify-content: center; + align-items: center; +} + #error { display: flex; - /* color: brown; */ align-items: center; justify-content: center; }