diff --git a/assets/moon1.png b/assets/moon1.png new file mode 100644 index 0000000..2755bd8 Binary files /dev/null and b/assets/moon1.png differ diff --git a/assets/moon2.png b/assets/moon2.png new file mode 100644 index 0000000..848bf9b Binary files /dev/null and b/assets/moon2.png differ diff --git a/index.html b/index.html index 8f43f43..a18b653 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,9 @@ ChaosWeb - The Disorderly UI Experiment - + + + @@ -46,5 +48,6 @@

ChaosWeb - The Disorderly UI Experiment

+ diff --git a/js/night_time.js b/js/night_time.js new file mode 100644 index 0000000..dec6f40 --- /dev/null +++ b/js/night_time.js @@ -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); + \ No newline at end of file diff --git a/night_time.html b/night_time.html new file mode 100644 index 0000000..18c6139 --- /dev/null +++ b/night_time.html @@ -0,0 +1,18 @@ + + + + + + ChaosWeb - The Disorderly UI Experiment + + + + +
+ +
+
Too late to reach us.
+
Come back during daylight.
+ + + \ No newline at end of file diff --git a/style1.css b/style1.css new file mode 100644 index 0000000..5c4269b --- /dev/null +++ b/style1.css @@ -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 */ + } +} \ No newline at end of file