Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
silvinor committed Jan 27, 2025
1 parent df73d2f commit 354395c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 25 deletions.
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

24 changes: 24 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The MIT License *(MIT)*

Copyright © 2017, 2025 Silvino Rodrigues

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the *“Software”*), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *"AS IS"*, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
34 changes: 30 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,22 @@
width: 100%;
text-align: center;
padding: 10px;
background: rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.05);
color: #ddd;
opacity: 0; /* Initially hidden */
visibility: hidden; /* Prevents interaction when invisible */
transition: opacity 2s ease-in-out, visibility 2s ease-in-out; /* Fading effect */
opacity: 0;
visibility: hidden;
transition: opacity 2s ease-in-out, visibility 2s ease-in-out;
}
#copyright.visible {
opacity: 1;
visibility: visible;
}

body, #clock, #copyright {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
}
</style>
<!-- Color Palette by Kate Morley > https://iamkate.com/data/12-bit-rainbow/ -->
</head>
Expand Down Expand Up @@ -310,6 +316,25 @@
}
}

function handleDoubleClick() {
if (!document.fullscreenElement) {
let element = document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else {
console.error("Fullscreen API not supported");
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
}

/**
* Run on first load
*/
Expand All @@ -327,6 +352,7 @@
document.addEventListener("visibilitychange", visibilityChange);
window.addEventListener("resize", visibilityChange);
document.addEventListener("mousemove", handleMouseMove);
document.addEventListener("dblclick", handleDoubleClick);

setInterval(updateAll, 1000); // Start the update loop
});
Expand Down

0 comments on commit 354395c

Please # to comment.