update and merge with old local code database

This commit is contained in:
asandikci 2023-12-31 10:06:34 +03:00
parent d6ae17b9ed
commit ed351b35ed
No known key found for this signature in database
GPG key ID: 25C67A03B5666BC1
12 changed files with 396 additions and 65 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.bak

View file

@ -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
<!-- ## TODO
- [ ] Saatin Altına (veya fullscreen) arkaplan ekleyebilme
- [ ] Read image/gif/video/website from clipboard
- [ ] Choose from local storage
- [ ] Size Settings (Fit-content, Scretch, Tile)
- [ ] Add multiple images/slideshow feature
- [ ] Remove Wallpaper (transparent cross button in bottom-right)
- [ ] LocalStorage usage? (even when change LivelyWallpaper to another or change wallpaper)
- [ ] beyaztahta.iflpanel.com için tahta.iflpanel.com ilk 30 saniye redirect pop-up'ı (arkaplandan firefoxa nasıl açtırır?) (Geliştirici modundan gelinmediyse) -->

View file

@ -45,6 +45,9 @@ section#top {
height: 100px; height: 100px;
} }
section#top .class { section#top .class {
display: flex;
flex-direction: column;
column-gap: 10px;
margin: 5px; margin: 5px;
min-width: 20vw; min-width: 20vw;
margin-right: auto; margin-right: auto;
@ -64,10 +67,21 @@ section#top .clock #time {
justify-content: center; justify-content: center;
font-size: 80px; font-size: 80px;
} }
section#top .settings-box { section#top .toolbox {
min-width: 20vw; min-width: 20vw;
margin-left: auto; margin-left: auto;
text-align: right; 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 { section#top .settings-box button {
height: 30px; height: 30px;
@ -84,7 +98,8 @@ section#top .settings-box #settings {
section#top .settings-box #settings form { section#top .settings-box #settings form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: absolute;
min-width: 10vw;
background-color: grey; background-color: grey;
} }
section#top .settings-box #settings form .cell { section#top .settings-box #settings form .cell {
@ -236,14 +251,14 @@ section#mid #timers #stopwatch {
flex-direction: column; flex-direction: column;
} }
section#mid #timers #stopwatch .timer { section#mid #timers #stopwatch .timer {
font-size: 100px; font-size: 150px;
display: flex; display: flex;
align-self: center; align-self: center;
} }
section#mid #timers #stopwatch .timer .min, section#mid #timers #stopwatch .timer .min,
section#mid #timers #stopwatch .timer .sec, section#mid #timers #stopwatch .timer .sec,
section#mid #timers #stopwatch .timer .msec { section#mid #timers #stopwatch .timer .msec {
width: 10vw; width: 12vw;
} }
section#mid #timers #timer { section#mid #timers #timer {
display: none; display: none;

View file

@ -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"} {"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"}

10
assets/css/not_scss.css Normal file
View file

@ -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;
}

BIN
assets/images/bagis-qr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

View file

@ -4,6 +4,10 @@
var FlagSecond = 0; var FlagSecond = 0;
var FlagSettings = 0; var FlagSettings = 0;
var FlagTimers = 1; var FlagTimers = 1;
var FlagExtras = 1;
var FlagTools = 1;
var FlagFullscreen = 0;
var FlagLargenClock = 0;
var MidItems = ["timers", "stopwatch", "timer", "yemek-listesi", "animations"] var MidItems = ["timers", "stopwatch", "timer", "yemek-listesi", "animations"]
// RUN FUNCTIONS ON START // RUN FUNCTIONS ON START
@ -31,7 +35,7 @@ function updateTime() {
document.getElementById("time").innerHTML = curHour + "." + curMin; 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("time").style.color = "red";
document.getElementById("rainbow").style.display = "inherit"; document.getElementById("rainbow").style.display = "inherit";
} else { } 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 // UTILITIES
// //
@ -117,23 +192,108 @@ function hideMidAll(...except) {
}); });
} }
/** type: id, class /**
* * @param type id, class
* name: id or class name * @param name id or class name
* @param display display type
*/ */
function toggleItem(type, name) { function toggleItem(type, name, display = "default") {
switch (type) { switch (type) {
case "id": 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"; item.style.display = "none";
} else { } else {
item.style.display = "flex"; item.style.display = targetDisplay;
} }
break; break;
default: default:
console.error("no toggle item except ids!"); console.error("no toggle item except ids!");
break; 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";
}
}

View file

@ -11,9 +11,9 @@ tick();
// NOT OPTIMIZED, place in start switch // NOT OPTIMIZED, place in start switch
var t = setInterval(tick, 10); var t = setInterval(tick, 10);
const sleep = ms => new Promise(r => setTimeout(r, ms));
async function Stopwatch(action) {
function Stopwatch(action) {
switch (action) { switch (action) {
case "start": case "start":
console.log("start function started"); console.log("start function started");
@ -22,11 +22,28 @@ function Stopwatch(action) {
curAction = "increase"; curAction = "increase";
tick(); tick();
previousAction = "start"; 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; break;
case "stop": case "stop":
curAction = "stop"; curAction = "stop";
tick(); tick();
previousAction = "stop"; 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; break;
default: default:

BIN
assets/pop.mp3 Normal file

Binary file not shown.

View file

@ -38,6 +38,9 @@ section {
height: 100px; height: 100px;
.class { .class {
display: flex;
flex-direction: column;
column-gap: 10px;
margin: 5px; margin: 5px;
min-width: 20vw; min-width: 20vw;
margin-right: auto; margin-right: auto;
@ -62,10 +65,23 @@ section {
} }
} }
.settings-box { .toolbox {
min-width: 20vw; min-width: 20vw;
margin-left: auto; margin-left: auto;
text-align: right; 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 { button {
height: 30px; height: 30px;
@ -84,7 +100,8 @@ section {
form { form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: absolute;
min-width: 10vw;
background-color: grey; background-color: grey;
.cell { .cell {
@ -182,14 +199,14 @@ section {
flex-direction: column; flex-direction: column;
.timer { .timer {
font-size: 100px; font-size: 150px;
display: flex; display: flex;
align-self: center; align-self: center;
.min, .min,
.sec, .sec,
.msec { .msec {
width: 10vw; width: 12vw;
} }
} }
} }

View file

@ -13,8 +13,9 @@
<meta name="author" content="Aliberk Sandıı"> <meta name="author" content="Aliberk Sandıı">
<!-- CSS Files --> <!-- CSS Files -->
<link rel="stylesheet" type="text/css" href="/assets/css/main.css"> <link rel="stylesheet" type="text/css" href="./assets/css/main.css">
<link rel="stylesheet" type="text/css" href="/assets/css/dev.css"> <link rel="stylesheet" type="text/css" href="./assets/css/dev.css">
<title>DEV VERSION | iflpanel Tahta</title> <title>DEV VERSION | iflpanel Tahta</title>
</head> </head>
@ -170,22 +171,50 @@
</div> </div>
</section> </section>
<!-- NON-INTERACTIVE DECORATION AREA --> <!-- NON-INTERACTIVE DECORATION AREA -->
<section id="bottom"> <section id="bottom">
<hr>
<p id="debug-area"></p>
<form>
<button id="localtest" type="button" onmouseover="Localtest(0)" onclick="Localtest(0)">TEST</button>
<button id="yazdir" type="button" onmouseover="Localtest(1)" onclick="Localtest(1)">Yazdır</button>
<button id="popsound" type="button" onmouseover="Popsound()" onclick="Popsound()">POP SOUND</button>
</form>
<div id="DEV" style="font-size: x-small;"></div>
<div id="rainbow"></div> <div id="rainbow"></div>
</section> </section>
<script src="/assets/js/utils.js"></script>
<script src="/assets/js/updates.js"></script>
<script src="/assets/js/mid.js"></script> <script>
function Localtest(a) {
if (a == 0) {
var nowdate = new Date;
localStorage.setItem("localtest", nowdate);
}
if (a == 1) {
if (localStorage.getItem("localtest") == null) {
document.getElementById("debug-area").innerHTML = "ÇALIŞMIYOR :(";
}
else {
document.getElementById("debug-area").innerHTML = localStorage.getItem("localtest");
}
}
}
<script src="/assets/js/initialize.js"></script> function Popsound() {
var audio = new Audio('./assets/pop.mp3');
audio.play();
}
</script>
<script src="/assets/js/timers.js"></script> <script src="./assets/js/utils.js"></script>
<script src="./assets/js/updates.js"></script>
<script src="./assets/js/mid.js"></script>
<script src="./assets/js/initialize.js"></script>
<script src="./assets/js/timers.js"></script>
</body> </body>
</html> </html>

View file

@ -13,7 +13,9 @@
<meta name="author" content="Aliberk Sandıı" /> <meta name="author" content="Aliberk Sandıı" />
<!-- CSS Files --> <!-- CSS Files -->
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" /> <link rel="stylesheet" type="text/css" href="./assets/css/main.css" />
<link rel="stylesheet" type="text/css" href="./assets/css/not_scss.css" />
<title>iflpanel Tahta</title> <title>iflpanel Tahta</title>
</head> </head>
@ -22,16 +24,30 @@
<!-- MAIN AREA --> <!-- MAIN AREA -->
<section id="top"> <section id="top">
<div class="class"> <div class="class">
<span class="grade">12</span> <div>
<span class="grade">12</span> /
<span class="branch">C</span> <span class="branch">C</span>
</div> </div>
<div style="display:flex; align-content: center; align-items: center; margin-top: 10px;" class="extraItem">
<a href="https://asandikci.com/bagis/" target="_blank"><img src="assets/images/bagis-qr.png" width="50"></a>
<p style="align-self: center; font-style: normal; text-align: center; font-size: small;"> &nbsp; &#x1F448;
Geliştirme sürecine destek verin<br>&nbsp; &nbsp; &nbsp; (Sıradaki: <span
style="width: min-content; font-size: x-small;" id="sirada-yapilacaklar"></span>) </p>
</div>
<div id="header-note" style="display:none;">
Başarılar
</div>
</div>
<div class="clock"> <div class="clock">
<h1 id="time">12.00</h1> <h1 id="time">12.00</h1>
</div> </div>
<div class="settings-box"> <div class="toolbox" id="toolbox">
<form> <form>
<button id="timers-button" type="button" onmouseover="toggleTimers()" onclick="toggleTimers()"></button> <button id="timers-button" type="button" onmouseover="toggleTimers()" onclick="toggleTimers()"></button>
</form>
</div>
<div class="settings-box">
<form>
<button id="settings-button" type="button" onmouseover="toggleSettings()" onclick="toggleSettings()"></button> <button id="settings-button" type="button" onmouseover="toggleSettings()" onclick="toggleSettings()"></button>
</form> </form>
<div id="settings"> <div id="settings">
@ -48,12 +64,32 @@
<input type="checkbox" id="chx-devVersion" onchange="toggleDevVersion()"> <input type="checkbox" id="chx-devVersion" onchange="toggleDevVersion()">
<label for="chx-devVersion">Geliştirici Sürümü</label> <label for="chx-devVersion">Geliştirici Sürümü</label>
</div> </div>
<div class="cell">
<input type="checkbox" id="chx-closeExtra" onchange="toggleExtra()">
<label for="chx-closeExtra">Ekstra Bildirimleri Kapatın</label>
</div>
<div class="cell">
<input type="checkbox" id="chx-closeTools" onchange="toggleTools()">
<label for="chx-closeTools">Araç Çubuğunu Gizle</label>
</div>
<div class="cell">
<input type="checkbox" id="chx-largenClock" onchange="toggleLargenClock()">
<label for="chx-largenClock">Saati Büyült</label>
</div>
<div class="cell">
<input type="checkbox" id="chx-fullscreen" onchange="toggleFullscreen()">
<label for="chx-fullscreen">Tam Ekran</label>
</div>
<div class="cell">
<input type="checkbox" id="chx-examMode" onchange="toggleExamMode()">
<label for="chx-examMode"><b style="color:red;">Sınav Modu</b></label>
</div>
</form> </form>
</div> </div>
</div> </div>
</section> </section>
<hr style="width: 100%; box-sizing: border-box;"> <hr style="width: 100%; box-sizing: border-box;" id="clock-divider">
<!-- INTERACTIVE / FUNCTIONAL AREA --> <!-- INTERACTIVE / FUNCTIONAL AREA -->
<section id="mid"> <section id="mid">
@ -69,6 +105,15 @@
</span> </span>
</button> </button>
</li> </li>
<!-- <li onmouseover="toggleTimers('timer')" onclick="toggleTimers('timer')">
<button class="pushable pushable-l">
<span class="shadow"></span>
<span class="edge"></span>
<span class="front" style="padding: 1px 10px; background-color: red;">
Güvenli<br>Kronometre
</span>
</button>
</li> -->
</ul> </ul>
</div> </div>
<div id="stopwatch"> <div id="stopwatch">
@ -86,10 +131,10 @@
</div> </div>
</div> </div>
<form> <form>
<input type="button" id="start-cro" name="start-cro" value="Başlat" onmouseover="Stopwatch('start')" <input class="timer-action-button" type="button" id="start-cro" name="start-cro" value="▶️ Başlat"
onclick="Stopwatch('start')" checked> onmouseover="Stopwatch('start')" onclick="Stopwatch('start')" checked>
<input type="button" id="stop-cro" name="stop-cro" value="Durdur ve Sıfırla" onmouseover="Stopwatch('stop')" <input class="timer-action-button" type="button" id="stop-cro" name="stop-cro" value="⏸️ Durdur ve Sıfırla"
onclick="Stopwatch('stop')" checked> onmouseover="Stopwatch('stop')" onclick="Stopwatch('stop')" checked>
</form> </form>
</div> </div>
@ -97,7 +142,7 @@
<div class="timer"> <div class="timer">
00.00.00 00.00.00
</div> </div>
<p>yapım aşamasında: geriye doğru sayma özelliği</p> <p>Şu anda yapım aşamasında<br><b>sınav salonundaki akıllı tahta için 100% doğru kronometre</b></p>
</div> </div>
</div> </div>
@ -115,8 +160,64 @@
<section id="bottom"> <section id="bottom">
<div id="rainbow"></div> <div id="rainbow"></div>
</section> </section>
<script src="/assets/js/old_main.js"></script>
<script src="/assets/js/old_stopwatch.js"></script> <script>
function b64DecodeUnicode(str) {
// Going backwards: from bytestream, to percent-encoding, to original string.
return decodeURIComponent(atob(str).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
}
var curAmount = 0
var goalAmount = 0;
let localtest = 0;
//
// PUBLIC DATA
//
let url2 = 'https://git.aliberksandikci.com.tr/api/v1/repos/asandikci.com/www/contents/public-data.json';
// let url2 = "http://127.0.0.1:PORT/public-data.json";
// localtest = 1;
fetch(url2)
.then(res => res.json())
.then(out => {
var publicjson;
if (localtest) {
publicjson = out[0]["public-todo"];
} else {
var cnt = out.content;
console.log("base64: " + cnt);
publicjson = JSON.parse(b64DecodeUnicode(cnt))[0]["public-todo"];
}
publicjson.sort(function (a, b) {
return Number(Object.keys(a)) > Number(Object.keys(b));
});
console.log(publicjson);
var curi = 0;
let i = 0;
for (i = 0; i < publicjson.length; i++) {
const element = Number(Object.keys(publicjson[i]));
if (curAmount < element) {
goalAmount = element;
curi = i;
break;
}
}
let aka = publicjson[i][goalAmount][0];
document.getElementById("sirada-yapilacaklar").innerHTML = aka.split("- ")[1];
})
.catch(err => {
throw err
});
</script>
<script src="./assets/js/old_main.js"></script>
<script src="./assets/js/old_stopwatch.js"></script>
</body> </body>
</html> </html>