Skip to content

Commit

Permalink
Code Optimizations and Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
thedoggybrad authored Dec 19, 2022
1 parent 749c9eb commit 88211db
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@
<link rel="stylesheet" href="https://thedoggybrad.github.io/getdatetime/resources/slider.css" />
<script type="module" src="https://thedoggybrad.github.io/getdatetime/resources/dark-mode-toggle-playground.mjs"></script>
<script type="module" src="https://thedoggybrad.github.io/getdatetime/resources/dark-mode-toggle.mjs"></script>
</head>
<body>
<dark-mode-toggle
id="dark-mode-toggle-5"
class="slider"
legend="Dark Mode"
appearance="toggle"
remember="Remember this"
></dark-mode-toggle>

<center><h1>What is my current date and time?</h1></center>

<center><h1><span id="time"></span></h1></center>
<script>
`use strict`;
function refreshTime() {
Expand All @@ -57,9 +44,6 @@
setInterval(refreshTime, 1000);
</script>

<div></div>

<center><h1><span id="date"></span></h1></center>
<script>
`use strict`;
function refreshTime() {
Expand All @@ -71,8 +55,6 @@
setInterval(refreshTime, 1000);
</script>

<center><h2 id="day"></h2></center>

<script>
const weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];

Expand All @@ -81,7 +63,21 @@
document.getElementById("day").innerHTML = day;
setInterval(refreshTime, 1000);
</script>
</head>
<body>
<dark-mode-toggle
id="dark-mode-toggle-5"
class="slider"
legend="Dark Mode"
appearance="toggle"
remember="Remember this"
></dark-mode-toggle>

<center><h1>What is my current date and time?</h1></center>

<center><h1><span id="time"></span></h1></center>
<center><h1><span id="date"></span></h1></center>
<center><h2 id="day"></h2></center>
<br />
<br />
<br />
Expand All @@ -90,6 +86,5 @@
<center><footer>
<p>©<a href="https://github.com/thedoggybrad/">TheDoggyBrad</a>. Provided under <a href="https://github.com/thedoggybrad/getdatetime/blob/main/License/">ISC License</a>. </p>
</footer></center>

</body>
</html>

0 comments on commit 88211db

Please sign in to comment.