Skip to content

Commit

Permalink
new update
Browse files Browse the repository at this point in the history
  • Loading branch information
wishrohitv committed Jan 6, 2024
1 parent fb4b098 commit 924fd6b
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/portfolio.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added icons/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions index.js
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"))

}
18 changes: 18 additions & 0 deletions style.css
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%;
}
}

0 comments on commit 924fd6b

Please sign in to comment.