add img rotation

This commit is contained in:
ivan 2024-06-21 00:11:11 +03:00
parent 3972a2eee7
commit 1494a7cd24
1 changed files with 18 additions and 1 deletions

View File

@ -162,7 +162,9 @@
<br><p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'erisian');" value="Erisian time"/></p> <br><p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'erisian');" value="Erisian time"/></p>
<p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'auto');" value="Christian time"/>:<br> <p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'auto');" value="Christian time"/>:<br>
<div align = "center" id="utcbuttons"></div></p> <div align = "center" id="utcbuttons"></div></p>
<script type="text/javascript"> <script type="text/javascript">
const utcs = { "UTC-11" : "-11", "UTC-10" : "-10", "UTC-9" : "-9", const utcs = { "UTC-11" : "-11", "UTC-10" : "-10", "UTC-9" : "-9",
"UTC-8" : "-8", "UTC-7" : "-7", "UTC-6" : "-6", "UTC-5" : "-5", "UTC-8" : "-8", "UTC-7" : "-7", "UTC-6" : "-6", "UTC-5" : "-5",
"UTC-4" : "-4", "UTC-3:30" : "-3.5", "UTC-3" : "-3", "UTC-0" : "0", "UTC-4" : "-4", "UTC-3:30" : "-3.5", "UTC-3" : "-3", "UTC-0" : "0",
@ -179,7 +181,9 @@ for (var u in utcs) {
if (counter % 5 == 0) buttons += "<br>"; if (counter % 5 == 0) buttons += "<br>";
} }
document.getElementById("utcbuttons").innerHTML = buttons; document.getElementById("utcbuttons").innerHTML = buttons;
</script> </script>
<div align = "center" id="soltable"></div><br><div align = "center" id="oneyearrow"></div> <div align = "center" id="soltable"></div><br><div align = "center" id="oneyearrow"></div>
<script type="text/javascript"> <script type="text/javascript">
@ -299,8 +303,21 @@ function makeTable(UTC, timeoutput) {
</script> </script>
<br><p align="center"><font size="6">&#9660;</font></a>
<br><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year"><img id="wheel" src="0.5.0_octosol.png" alt="Octosol by DougInAMug"></a></p>
<script type="text/javascript">
const dayOfYear = date => Math.floor((date - new Date(date.getFullYear(),
0, 0)) / (1000 * 60 * 60 * 24));
var daynumber = dayOfYear(new Date());
var degree = Math.round((360 / 365) * (daynumber + 10));
var rotatestring = "rotate(" + degree + "deg)"
document.getElementById("wheel").style.transform = rotatestring;
</script>
<br><p align="center"><a href="https://gitlab.com/zlax/solarwheeloftheyear">source code</a></p> <br><p align="center"><a href="https://gitlab.com/zlax/solarwheeloftheyear">source code</a></p>
<br><p align="center"><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year"><img src="0.5.0_octosol.png" alt="Octosol by DougInAMug"></a></p>
</body> </body>
</html> </html>