<html>
<head>
<style>
body {
text-align: center
}
</style>
</head>
<body>
<img id="greetingImage" src="https://images.unsplash.com/photo-1506126383447-1baf4fb3c267?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80" height="200px">
<h1 id="greeting">Good Afternoon</h1>
<h3>Time: <span id="hour">12</span>:00</h3>
0:00 <input id="slider" type="range" min="0" max="23" oninput="slide(this.value)" onchange="slide(this.value)"> 23:00
<script>
function slide(value) { var time = document.getElementById("hour"); time.textContent = value; var image = document.getElementById("greetingImage"); var greeting = document.getElementById("greeting");
if (value < 7) { image.setAttribute("src", "https://mimo.app/i/ride-and-shine.png"); greeting.textContent = "Rise and shine"; } else if (value < 12) { image.setAttribute("src", "https://mimo.app/i/good-morning.png"); greeting.textContent = "Good morning"; } else if (value < 17) { greeting.textContent = "Good afternoon"; image.setAttribute("src", "https://mimo.app/i/good-afternoon.png"); } else if (value < 21) { image.setAttribute("src", "https://mimo.app/i/good-evening.png"); greeting.textContent = "Good evening";
} else { image.setAttribute("src", "https://mimo.app/i/good-night.png"); greeting.textContent = "Good night";
} }
</script>
</body>
</html>]]>