diff --git a/fullscreen-style.css b/fullscreen-style.css new file mode 100644 index 0000000..d10dd2c --- /dev/null +++ b/fullscreen-style.css @@ -0,0 +1,51 @@ +body{ + background-color: #000; + color: #fff; + font-family: 'Heebo', sans-serif; +} +#prog{ + width: 100%; +} +#time{ + font-size: 10em; + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + align-items: center; + align-content: center; + justify-content: center; + overflow: auto; +} +#time-left-readable{ + text-align: center; + cursor: pointer; +} +#bar{ + position: fixed; + left: 0; + bottom: 0; + width: 100%; +} +#button-to-fullscreen, #button-fullscreen-exit{ + position: absolute; + left: 25px; + top: 35px; + cursor: pointer; + color: #333; + z-index: 1; +} +#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ + color: #fff; +} +#button-to-fullscreen, #decsription, footer{ + display: none; +} +#title{ + text-align: center; +} +a:visited{ + color: #fff; +} \ No newline at end of file diff --git a/index.html b/index.html index acbab72..55056fa 100644 --- a/index.html +++ b/index.html @@ -6,15 +6,33 @@ Проблема 2038 года - + -

До смерти 32-битных систем осталось

-
-

- +
+ + + + + + + +
+
+ + + +
+
+

До смерти 32-битных систем осталось

+
+
+

+ +
+

О чём этот сайт?

Проблема 2038 года в вычислительной технике — ожидаемые сбои в программном обеспечении накануне 19 января diff --git a/script.js b/script.js index 7732d38..8e10078 100644 --- a/script.js +++ b/script.js @@ -1,36 +1,29 @@ const maxtimestamp = 2147483647; var readable_timer_mode = 0; -var msec_display = true; function ReadableTimerSwitcher(){ readable_timer_mode++ if(readable_timer_mode > 2){readable_timer_mode = 0} } - -function msecDisplaySwitcher(){ - if(msec_display){ - msec_display = false - $("#time-left-msec").css("display", "none"); +addEventListener("fullscreenchange", (event) => { + console.log("lol") + if(document.fullscreen){ + $("#style").attr("href", "fullscreen-style.css") }else{ - msec_display = true - $("#time-left-msec").css("display", "unset"); + $("#style").attr("href", "style.css") } -} - +}) function Cycle() { var timestamp = Date.now() / 1000, left = maxtimestamp - timestamp, - tmsec = Math.floor(left * 1000) % 1000, t = Math.floor(left); - $("#time-left").html(t.toLocaleString('ru')); - $("#time-left-msec").html("." + ('00' + tmsec).slice(-3)); + $("#time").html(t.toLocaleString('ru')); $("#prog").val(timestamp); $("#timestamp").html(Math.trunc(timestamp).toLocaleString('ru')); if (left < 60 && readable_timer_mode != 2) { $("#time-left-readable").css("display", "none") } if (left <= 0) { clearInterval(c); - $("#time-left").html("0"); - $("#time-left-msec").html(".000"); + $("#time").html("0"); $("#title").html("С͓̪̩̳͕͍̄ͮͤ̚̚м̦͎͉̝̋̄е̥͕̫̫̱̱͓̞̾р̞̤̰͖̤̟̫͓̏̍͒ͣ͐͂̚ͅт̗̥̲̩̣̯̹̅ͅь̙͍̟̟̮̩̦̹ͩͤ"); } switch (readable_timer_mode){ diff --git a/style.css b/style.css index 6927488..687a66a 100644 --- a/style.css +++ b/style.css @@ -6,14 +6,27 @@ body{ #prog{ width: 100%; } -#time-left{ +#time{ + text-align: center; font-size: 10em; - cursor: pointer; } #time-left-readable{ text-align: center; cursor: pointer; } +#button-to-fullscreen, #button-fullscreen-exit{ + position: absolute; + left: 25px; + top: 35px; + cursor: pointer; + color: #333; +} +#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ + color: #fff; +} +#button-fullscreen-exit{ + display: none; +} #title{ text-align: center; }