Skip to content

Commit

Permalink
Merge pull request #70 from ArttuKuikka/Dev
Browse files Browse the repository at this point in the history
tv testi koodi mergee ku oot koulussa
  • Loading branch information
ArttuKuikka authored Nov 6, 2023
2 parents 7e8d7e1 + edde791 commit fd26713
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Views/Infotv/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@
});
//testi js roskaa POISTA
try{
function updateTime() {
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
const timeString = `${hours}:${minutes}:${seconds}`;
document.getElementById('testp').textContent = timeString;
}
// Update the time every second
setInterval(updateTime, 2000);
} catch(error){
console.log(error);
}
</script>

</head>
Expand Down Expand Up @@ -211,5 +232,6 @@
</div>
<img src="~/mainos3.png" style="width:19vw; height:25vw; position:absolute; bottom:50px; right:10px; z-index:4" />
<img src="~/ig.png" style="width:19vw; height:3vw; position:absolute; bottom:0px; right:10px; z-index:4" />
<p id="testp" style="z-index:5;position:fixed; bottom:0; left:0; font-size:1.2em; ">00:00</p>
</body>

0 comments on commit fd26713

Please sign in to comment.