-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from hana-maria/feature/hannah
Time reactive ui #9
- Loading branch information
Showing
6 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
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
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,13 @@ | ||
function redirectBasedOnTime() { | ||
const currentHour = new Date().getHours(); | ||
|
||
if (currentHour >= 2 && currentHour < 5) { | ||
window.location.href = 'night_time.html'; | ||
} | ||
else { | ||
window.location.href = 'index.html'; | ||
} | ||
} | ||
redirectBasedOnTime(); | ||
setTimeout(redirectBasedOnTime, 60000); | ||
|
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>ChaosWeb - The Disorderly UI Experiment</title> | ||
<link rel="stylesheet" href="style1.css"> | ||
|
||
</head> | ||
<body> | ||
<div class="moon1"> | ||
<img src="assets/moon1.png" width="650px"></img> | ||
</div> | ||
<div class="text">Too late to reach us.</div> | ||
<div class="text">Come back during daylight.</div> | ||
</body> | ||
<script src="js/night_time.js"></script> | ||
</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,40 @@ | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
background-color: darkslateblue; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
|
||
.moon1 { | ||
display: flex; | ||
justify-content: center; | ||
cursor: pointer; | ||
} | ||
|
||
.moon1 img { | ||
width: 650px; | ||
transition: 0.3s ease; | ||
} | ||
|
||
.moon1 img:hover { | ||
content: url(assets/moon2.png); /* This changes the image source on hover */ | ||
} | ||
|
||
.text { | ||
display: flex; | ||
justify-content: center; | ||
color: white; | ||
font-size: 50px; | ||
text-align: center; | ||
animation: float 3s ease-in-out infinite; /* Apply floating animation */ | ||
} | ||
|
||
/* Floating animation */ | ||
@keyframes float { | ||
0%, 100% { | ||
transform: translateY(0); /* Start and end position */ | ||
} | ||
50% { | ||
transform: translateY(-10px); /* Move up */ | ||
} | ||
} |