diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..751553b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.bak diff --git a/README.md b/README.md deleted file mode 100644 index 2fce6f8..0000000 --- a/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Smart Board Screen Background for general and educational usage -Development demo: https://tahta.iflpanel.com -Aktif Olarak İzmir Fen Lisesi Bilgisayarları için geliştirilmektedir. - -## Similar Apps -- [Digiscreen](https://ladigitale.dev/digiscreen/) / [DigiTools](https://ladigitale.dev/digitools/) - -## Development -- SmartScreen currently under in heavy development. Please see Issues, PRs and Project Page for more information - - \ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css index 136d240..0898364 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -45,6 +45,9 @@ section#top { height: 100px; } section#top .class { + display: flex; + flex-direction: column; + column-gap: 10px; margin: 5px; min-width: 20vw; margin-right: auto; @@ -64,10 +67,21 @@ section#top .clock #time { justify-content: center; font-size: 80px; } -section#top .settings-box { +section#top .toolbox { min-width: 20vw; margin-left: auto; text-align: right; + display: block; +} +section#top .toolbox button { + height: 30px; + width: 30px; + line-height: 20px; +} +section#top .settings-box { + min-width: min-content; + margin-left: 0; + text-align: right; } section#top .settings-box button { height: 30px; @@ -84,7 +98,8 @@ section#top .settings-box #settings { section#top .settings-box #settings form { display: flex; flex-direction: column; - position: relative; + position: absolute; + min-width: 10vw; background-color: grey; } section#top .settings-box #settings form .cell { @@ -236,14 +251,14 @@ section#mid #timers #stopwatch { flex-direction: column; } section#mid #timers #stopwatch .timer { - font-size: 100px; + font-size: 150px; display: flex; align-self: center; } section#mid #timers #stopwatch .timer .min, section#mid #timers #stopwatch .timer .sec, section#mid #timers #stopwatch .timer .msec { - width: 10vw; + width: 12vw; } section#mid #timers #timer { display: none; diff --git a/assets/css/main.css.map b/assets/css/main.css.map index dff5235..54b2ece 100644 --- a/assets/css/main.css.map +++ b/assets/css/main.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../scss/_animation.scss","../scss/_button.scss"],"names":[],"mappings":";AAAA;ACAA;AAEA;EACE;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;;ADZJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;;;AAMA;EACE;EACA;EACA;EAEA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAWZ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGE;EACE;EACA;EACA;;AAEA;EAEE;EACA;;AEnKV;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA,YACE;;AAGJ;EACE;EACA;EACA;EACA;EACA;EAEA;;AAOF;EACE;EACA;EACA;EAGA;EACA;EACA;EACA;EACA,YACE;;AAGJ;EACE;;AAGF;EACE;EACA,YACE;;AAGJ;EACE;EACA;;AAGF;EACE;EACA,YACE;;AAGJ;EACE;EACA;;AAGF;EACE;;AAKA;AAAA;AAAA;EAGE;EACA;;AAGF;EACE;;AAUF;AAAA;AAAA;EAIE;EACA;;AAGF;EACE;;AFwDM;EACE;EACA;;AAOR;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;EAGE;;AAKN;EACE;EACA;;AAEA;EACE;;AAMN;EACE;EACA;;AAGF;EACE;EACA;;AAMJ;EACE;;AAEA;EACE;EACA;EACA;;;AAKN;EACE;EACA;EACA","file":"main.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../scss/_animation.scss","../scss/_button.scss"],"names":[],"mappings":";AAAA;ACAA;AAEA;EACE;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;;ADZJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;;;AAMA;EACE;EACA;EACA;EAEA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAWZ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGE;EACE;EACA;EACA;;AAEA;EAEE;EACA;;AEpLV;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA,YACE;;AAGJ;EACE;EACA;EACA;EACA;EACA;EAEA;;AAOF;EACE;EACA;EACA;EAGA;EACA;EACA;EACA;EACA,YACE;;AAGJ;EACE;;AAGF;EACE;EACA,YACE;;AAGJ;EACE;EACA;;AAGF;EACE;EACA,YACE;;AAGJ;EACE;EACA;;AAGF;EACE;;AAKA;AAAA;AAAA;EAGE;EACA;;AAGF;EACE;;AAUF;AAAA;AAAA;EAIE;EACA;;AAGF;EACE;;AFyEM;EACE;EACA;;AAOR;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;EAGE;;AAKN;EACE;EACA;;AAEA;EACE;;AAMN;EACE;EACA;;AAGF;EACE;EACA;;AAMJ;EACE;;AAEA;EACE;EACA;EACA;;;AAKN;EACE;EACA;EACA","file":"main.css"} \ No newline at end of file diff --git a/assets/css/not_scss.css b/assets/css/not_scss.css new file mode 100644 index 0000000..1991330 --- /dev/null +++ b/assets/css/not_scss.css @@ -0,0 +1,10 @@ +.timer-action-button { + color: white; + background-color: #097a8b; + border-radius: 10px; + padding: 10px; + margin: 10px; + border-bottom-color: #0b147a; + border-right-color: #0b147a; + border-style: ridge; +} \ No newline at end of file diff --git a/assets/images/bagis-qr.png b/assets/images/bagis-qr.png new file mode 100644 index 0000000..dc5a079 Binary files /dev/null and b/assets/images/bagis-qr.png differ diff --git a/assets/js/old_main.js b/assets/js/old_main.js index 754fdb1..061da58 100644 --- a/assets/js/old_main.js +++ b/assets/js/old_main.js @@ -4,6 +4,10 @@ var FlagSecond = 0; var FlagSettings = 0; var FlagTimers = 1; +var FlagExtras = 1; +var FlagTools = 1; +var FlagFullscreen = 0; +var FlagLargenClock = 0; var MidItems = ["timers", "stopwatch", "timer", "yemek-listesi", "animations"] // RUN FUNCTIONS ON START @@ -31,7 +35,7 @@ function updateTime() { document.getElementById("time").innerHTML = curHour + "." + curMin; } - if (curHour == 12 && (curMin >= 24 && curMin <= 30)) { + if (curHour == 12 && (curMin >= 24 && curMin <= 30) && FlagExtras == 1) { document.getElementById("time").style.color = "red"; document.getElementById("rainbow").style.display = "inherit"; } else { @@ -97,6 +101,77 @@ function toggleAnimations() { } +function toggleExtra() { + let chx = document.getElementById("chx-closeExtra"); + if (chx.checked) { + FlagExtras = 0; + } else { + FlagExtras = 1; + } + updateExtras(); + +} + +function toggleTools() { + let chx = document.getElementById("chx-closeTools"); + if (chx.checked) { + FlagTools = 0; + } else { + FlagTools = 1; + } + updateToolVisibility(); +} + +function toggleFullscreen() { + let chx = document.getElementById("chx-fullscreen"); + if (chx.checked) { + FlagFullscreen = 1; + } else { + FlagFullscreen = 0; + } + updateFullscreen(); +} + +function toggleLargenClock() { + let chx = document.getElementById("chx-largenClock"); + if (chx.checked) { + FlagLargenClock = 1; + } else { + FlagLargenClock = 0; + } + updateClockSize(); +} + +function toggleExamMode() { + let chx = document.getElementById("chx-examMode"); + if (chx.checked) { + document.getElementById("chx-largenClock").checked = true; + document.getElementById("chx-closeExtra").checked = true; + document.getElementById("chx-clockSecond").checked = true; + document.getElementById("chx-closeTools").checked = true; + // document.getElementById("chx-fullscreen").checked = true; + // toggleFullscreen(); + // FIXME Try, if not works open new tab and make fullscreen automatically, when exiting fullscreen actually close tab !!! + toggleExtra(); + toggleLargenClock(); + toggleClockSeconds(); + toggleTools(); + document.getElementById("header-note").style.display = "block"; + } else { + document.getElementById("chx-largenClock").checked = false; + document.getElementById("chx-closeExtra").checked = false; + document.getElementById("chx-clockSecond").checked = false; + document.getElementById("chx-closeTools").checked = false; + // document.getElementById("chx-fullscreen").checked = false; + // toggleFullscreen(); + toggleExtra(); + toggleLargenClock(); + toggleClockSeconds(); + toggleTools(); + document.getElementById("header-note").style.display = "none"; + } +} + // ----------------------------------------- // UTILITIES // @@ -117,23 +192,108 @@ function hideMidAll(...except) { }); } -/** type: id, class - * - * name: id or class name +/** + * @param type id, class + * @param name id or class name + * @param display display type */ -function toggleItem(type, name) { +function toggleItem(type, name, display = "default") { switch (type) { case "id": - let item = document.getElementById(name); - if (item.style.display == "flex") { + + // TODO AUTO display type recognizer, do not require to type display type + + var targetDisplay = "flex"; + switch (display) { + case "absolute": + targetDisplay = "absolute"; + break; + case "block": + targetDisplay = "block"; + break; + default: + break; + } + + var item = document.getElementById(name); + if (item.style.display == targetDisplay) { item.style.display = "none"; } else { - item.style.display = "flex"; + item.style.display = targetDisplay; } break; - default: console.error("no toggle item except ids!"); break; } +} + +function updateFullscreen() { + var elem = document.documentElement; + if (FlagFullscreen) { + console.warn("FULLSCREEN"); + /* View in fullscreen */ + + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.webkitRequestFullscreen) { /* Safari */ + elem.webkitRequestFullscreen(); + } else if (elem.msRequestFullscreen) { /* IE11 */ + elem.msRequestFullscreen(); + } + + } else { + /* Close fullscreen */ + + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.webkitExitFullscreen) { /* Safari */ + document.webkitExitFullscreen(); + } else if (document.msExitFullscreen) { /* IE11 */ + document.msExitFullscreen(); + } + + } +} + +function updateToolVisibility() { + var item = document.getElementsByClassName("settings-box")[0]; + if (FlagTools) { + document.getElementById("toolbox").style.display = "block"; + item.style.marginLeft = "0px"; + item.style.minWidth = "min-content"; + } else { + hideMidAll(); + document.getElementById("toolbox").style.display = "none"; + item.style.marginLeft = "auto"; + item.style.minWidth = "20vw"; + } +} + +function updateExtras() { + var arr = document.getElementsByClassName("extraItem"); + for (let i = 0; i < arr.length; i++) { + const element = arr[i]; + if (FlagExtras) { + element.style.display = "inherit"; + } + else { + element.style.display = "none"; + } + } +} + +function updateClockSize() { + let clock = document.getElementById("time"); + let top = document.getElementById("top"); + if (FlagLargenClock) { + document.getElementById("clock-divider").style.display = "none"; + clock.style.fontSize="200px"; + top.style.height="max-content"; + + } else { + document.getElementById("clock-divider").style.display = "block"; + clock.style.fontSize="80px"; + top.style.height="100px"; + } } \ No newline at end of file diff --git a/assets/js/old_stopwatch.js b/assets/js/old_stopwatch.js index 1f51c49..393dadb 100644 --- a/assets/js/old_stopwatch.js +++ b/assets/js/old_stopwatch.js @@ -11,9 +11,9 @@ tick(); // NOT OPTIMIZED, place in start switch var t = setInterval(tick, 10); +const sleep = ms => new Promise(r => setTimeout(r, ms)); - -function Stopwatch(action) { +async function Stopwatch(action) { switch (action) { case "start": console.log("start function started"); @@ -22,11 +22,28 @@ function Stopwatch(action) { curAction = "increase"; tick(); previousAction = "start"; + document.getElementById("start-cro").style.color = "greenyellow"; + document.getElementById("start-cro").style.borderTopColor = "greenyellow"; + document.getElementById("start-cro").style.borderLeftColor = "greenyellow"; + await sleep(200); + document.getElementById("start-cro").style.color = "grey"; + document.getElementById("start-cro").style.borderTopColor = "grey"; + document.getElementById("start-cro").style.borderLeftColor = "grey"; break; case "stop": curAction = "stop"; tick(); previousAction = "stop"; + document.getElementById("stop-cro").style.color = "red"; + document.getElementById("stop-cro").style.borderTopColor = "red"; + document.getElementById("stop-cro").style.borderLeftColor = "red"; + await sleep(200); + document.getElementById("stop-cro").style.color = "white"; + document.getElementById("stop-cro").style.borderTopColor = "white"; + document.getElementById("stop-cro").style.borderLeftColor = "white"; + document.getElementById("start-cro").style.color = "white"; + document.getElementById("start-cro").style.borderTopColor = "white"; + document.getElementById("start-cro").style.borderLeftColor = "white"; break; default: diff --git a/assets/pop.mp3 b/assets/pop.mp3 new file mode 100644 index 0000000..6a9260f Binary files /dev/null and b/assets/pop.mp3 differ diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 752a40f..4df982e 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -38,6 +38,9 @@ section { height: 100px; .class { + display: flex; + flex-direction: column; + column-gap: 10px; margin: 5px; min-width: 20vw; margin-right: auto; @@ -62,10 +65,23 @@ section { } } - .settings-box { + .toolbox { min-width: 20vw; margin-left: auto; text-align: right; + display: block; + + button { + height: 30px; + width: 30px; + line-height: 20px; + } + } + + .settings-box { + min-width: min-content; + margin-left: 0; + text-align: right; button { height: 30px; @@ -84,7 +100,8 @@ section { form { display: flex; flex-direction: column; - position: relative; + position: absolute; + min-width: 10vw; background-color: grey; .cell { @@ -182,14 +199,14 @@ section { flex-direction: column; .timer { - font-size: 100px; + font-size: 150px; display: flex; align-self: center; .min, .sec, .msec { - width: 10vw; + width: 12vw; } } } diff --git a/dev.html b/dev.html index 308e187..d7778ba 100644 --- a/dev.html +++ b/dev.html @@ -13,8 +13,9 @@ - - + + + DEV VERSION | iflpanel Tahta @@ -170,22 +171,50 @@ -
+
+

+
+ + + +
+
-
- - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index f13f0a7..1c5ef8a 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,9 @@ - + + + iflpanel Tahta @@ -22,16 +24,30 @@
- 12 - C +
+ 12 / + C +
+
+ +

  👈 + Geliştirme sürecine destek verin
      (Sıradaki: )

+
+
-

12.00

-
+
+
+
+
+
@@ -48,12 +64,32 @@
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
+
@@ -69,6 +105,15 @@ +
@@ -86,10 +131,10 @@
- - + +
@@ -97,7 +142,7 @@
00.00.00
-

yapım aşamasında: geriye doğru sayma özelliği

+

Şu anda yapım aşamasında
sınav salonundaki akıllı tahta için 100% doğru kronometre

@@ -115,8 +160,64 @@
- - + + + + \ No newline at end of file