-
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
fb4b098
commit 924fd6b
Showing
6 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,45 @@ | ||
// Greeter | ||
function called() { | ||
var time = new Date() | ||
let timestamp = time.getHours() | ||
console.log(timestamp) | ||
|
||
var greting_user; | ||
if (timestamp >= 0 && timestamp < 12){ | ||
greting_user = "Good Morning🤩"; | ||
} | ||
else if (timestamp >=12 && timestamp < 19){ | ||
greting_user = "Good AfterNoon🥰" | ||
} | ||
else if (timestamp >=19 && timestamp < 24){ | ||
greting_user = "Good Evening😎" | ||
} | ||
else if (timestamp >=24){ | ||
greting_user = "Good Night😴" | ||
} | ||
|
||
document.getElementById("greetings").innerText = "Hello, "+greting_user | ||
} | ||
|
||
// text color changer | ||
function changColor(){ | ||
let list = ["red", "green", "yellow", "purple", "skyblue", "pink"] | ||
let m = Math.random() * 5 | ||
console.log(parseInt(m)) | ||
document.getElementById("greetings").style.color = list[parseInt(m)] | ||
document.getElementById("table").style.borderColor = list[parseInt(m)] | ||
document.getElementById("greetme").style.color = list[parseInt(m)] | ||
document.getElementById("changColor").style.color = list[parseInt(m)] | ||
document.getElementById("changbackColor").style.color = list[parseInt(m)] | ||
document.getElementById("about").style.color = list[parseInt(m)] | ||
} | ||
|
||
// background Color changer | ||
function changBackgroundColor(){ | ||
let list = ["red", "green", "yellow", "purple", "skyblue", "pink"] | ||
let m = Math.random() * 5 | ||
console.log(parseInt(m)) | ||
// document.getElementById("bck").style.backgroundColor = list[parseInt(m)] | ||
document.getElementById("bck").style.background = background(linear-gradient("-45deg, #ee9952, #e74c7e, #29a6d5, #66d5ab")) | ||
|
||
} |
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,18 @@ | ||
body { | ||
background: linear-gradient(-45deg, #e2c81f, #e20157, #23a6d5, #58e8c6); | ||
background-size: 400% 400%; | ||
animation: gradient 15s ease infinite; | ||
height: 120vh; | ||
} | ||
|
||
@keyframes gradient { | ||
0% { | ||
background-position: 0% 50%; | ||
} | ||
50% { | ||
background-position: 100% 50%; | ||
} | ||
100% { | ||
background-position: 0% 50%; | ||
} | ||
} |