-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11af95e
commit 6d1d9c0
Showing
4 changed files
with
52 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
<div id="remainTime"> | ||
<div id="one" style="display: inline;"></div> days | ||
<div id="two" style="display: inline;"></div> hours | ||
<div id="three" style="display: inline;"></div> minutes | ||
<div id="four" style="display: inline;"></div> seconds. | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// When the user scrolls down 50px from the top of the document, resize the header's font size | ||
window.onscroll = function () { scrollFunction() }; | ||
|
||
function scrollFunction() { | ||
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { | ||
document.getElementById("whatsapp-1").style.height = "fit-content"; | ||
document.getElementById("header").style.fontSize = "20px"; | ||
document.getElementById("inner").style.padding = "20px"; | ||
document.getElementById("whatsapp-1").style.boxShadow = "0px 5px 10px darkblue"; | ||
document.getElementById("whatsapp-1").style.backgroundImage = "linear-gradient(9deg, rgba(255, 255, 255), rgb(255, 255, 255))"; | ||
document.getElementById("header").style.color = "black"; | ||
document.getElementById("remainTime").style.color = "black"; | ||
document.getElementById("remainTime").style.fontSize = "20px"; | ||
document.getElementById("whatsapp-1").style.aspectRatio = "unset"; | ||
} else { | ||
document.getElementById("whatsapp-1").style.height = "auto"; | ||
document.getElementById("header").style.fontSize = "30px"; | ||
document.getElementById("inner").style.padding = "20px"; | ||
document.getElementById("whatsapp-1").style.boxShadow = "none"; | ||
document.getElementById("whatsapp-1").style.backgroundImage = "url(./static/img/td-po.webp)"; | ||
document.getElementById("header").style.color = "white"; | ||
document.getElementById("remainTime").style.color = "white"; | ||
document.getElementById("remainTime").style.fontSize = "25px"; | ||
document.getElementById("whatsapp-1").style.aspectRatio = "16/9"; | ||
} | ||
} |