-
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
Showing
1 changed file
with
0 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,5 @@ | ||
<html> | ||
|
||
<script src="http://gist-it.appspot.com/http://github.com/geekbleofficial/UltrasonicAlarm/blob/main/SpeakerModule/SpeakerModule.ino"></script> | ||
|
||
|
||
<head> | ||
<title>Greeting Message</title> | ||
<style> | ||
#lbl { | ||
font-family: monospace; | ||
font-size: xx-large; | ||
color: #626262; | ||
padding: 5px; | ||
border: 1px solid #ececec; | ||
text-align: center; | ||
line-height: 1.5; | ||
height:85% | ||
|
||
|
||
} | ||
#date{ | ||
font-size:large; | ||
} | ||
body{ | ||
background-color: aliceblue; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="lbl"></div> | ||
</body> | ||
|
||
<script> | ||
var weekday = new Array(7); | ||
weekday[0] = "Sunday"; | ||
weekday[1] = "Monday"; | ||
weekday[2] = "Tuesday"; | ||
weekday[3] = "Wednesday"; | ||
weekday[4] = "Thursday"; | ||
weekday[5] = "Friday"; | ||
weekday[6] = "Saturday"; | ||
|
||
|
||
var today = new Date(); | ||
var hrs = today.getHours(); | ||
var dayOfWeek = weekday[today.getDay()]; | ||
var date = dayOfWeek+" " + today.getDate() + "/" +(today.getMonth()+1) +'/'+today.getFullYear() ; | ||
|
||
var greet; | ||
|
||
if (hrs < 12) | ||
greet = 'Good Morning '; | ||
else if (hrs >= 12 && hrs <= 17) | ||
greet = 'Good Afternoon '; | ||
else if (hrs >= 17 && hrs <= 24) | ||
greet = 'Good Evening '; | ||
|
||
document.getElementById('lbl').innerHTML = | ||
greet+=`<div id="date"> It's ${date}</div>`; | ||
</script> | ||
</html> |