set up script for header cooling

This commit is contained in:
awesomeuser 2023-07-07 20:14:06 +00:00
parent a8875b468b
commit 39178c3a6b

View file

@ -27,7 +27,7 @@
list-style-type: none; list-style-type: none;
} }
h1 { #header {
//text-transform: uppercase; //text-transform: uppercase;
color: #fff; color: #fff;
text-shadow: -4px 4px #c91a29, text-shadow: -4px 4px #c91a29,
@ -66,7 +66,7 @@
</head> </head>
<body> <body>
<h1>awesome.colean.cc</h1> <h1 id="header">awesome.colean.cc</h1>
<img src="res/awdog.png" width="160"><br> <img src="res/awdog.png" width="160"><br>
awdog, the mascot of awesome awdog, the mascot of awesome
@ -77,6 +77,25 @@
<li><a href="https://git.colean.cc/awesomeuser/awesome.git">@gitrepo</a></li> <li><a href="https://git.colean.cc/awesomeuser/awesome.git">@gitrepo</a></li>
<li><a href="proj/wolfystein.html">@Wolfystein3D</a></li> <li><a href="proj/wolfystein.html">@Wolfystein3D</a></li>
</ul> </ul>
<script>
var header = document.getElementById("header");
var prevTimestamp = 0;
async function update(timestamp) {
// get dt
let dt = (timestamp - prevTimestamp);
prevTimestamp = timestamp;
header.style.transform = "translate(50px, 100px);";
// loop
requestAnimationFrame(update);
}
requestAnimationFrame(update);
</script>
</body> </body>
</html> </html>