<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Time by Sir Gadfly</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .clock { position: relative; width: 200px; height: 200px; border: 10px solid rgb(255, 255, 255); border-radius: 50%; overflow: hidden; background-position: center; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } .background-image { position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-size: cover; background-position: center; z-index: -1; } .hour-hand, .minute-hand, .second-hand, .center-circle { position: absolute; transform-origin: 50% 100%; } .hour-hand { width: 6px; height: 50px; background-color: white; top: calc(50% - 50px); left: calc(50% - 3px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } .minute-hand { width: 4px; height: 70px; background-color: white; top: calc(50% - 70px); left: calc(50% - 2px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } .second-hand { width: 2px; height: 80px; background-color: #ff5500; top: calc(50% - 80px); left: calc(50% - 1px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } .center-circle { width: 12px; height: 12px; border-radius: 50%; background-color: rgb(255, 255, 255); top: calc(50% - 6px); left: calc(50% - 6px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } </style> </head> <body> <div class="clock"> <div class="background-image"> <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 25 25"> <image href="/content/cfab194b924f7785c6e453728e1c264b89b74843633278cda3ad3f57576c1e93i0" width="100%" height="100%" style="image-rendering: pixelated;" /> </svg> </div> <div class="hour-hand"></div> <div class="minute-hand"></div> <div class="second-hand"></div> <div class="center-circle"></div> </div> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script> function updateClock() { const now = new Date(); const seconds = now.getSeconds(); const minutes = now.getMinutes(); const hours = now.getHours(); const secondHand = document.querySelector('.second-hand'); const minuteHand = document.querySelector('.minute-hand'); const hourHand = document.querySelector('.hour-hand'); const secondDeg = (seconds / 60) * 360; const minuteDeg = ((minutes * 60 + seconds) / 3600) * 360; const hourDeg = ((hours % 12 + minutes / 60) / 12) * 360; secondHand.style.transform = `rotate(${secondDeg}deg)`; minuteHand.style.transform = `rotate(${minuteDeg}deg)`; hourHand.style.transform = `rotate(${hourDeg}deg)`; } updateClock(); setInterval(updateClock, 1000); </script> </body> </html>
Inscription number 18,580,811
Genesis block 799,740
File type text
File size 3.13 KB
Creation date Jul 22,2023 8:12 am