This repository has been archived on 2023-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
awesome/index.html
2023-07-08 21:01:17 +00:00

149 lines
No EOL
4.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>awesome</title>
<!-- embedding -->
<meta content="awesome.colean.cc" property="og:title">
<meta content="stuff and things and awdog" property="og:description">
<meta content="https://awesome.colean.cc" property="og:url">
<meta content="https://awesome.colean.cc/res/awdog.png" property="og:image">
<meta content="#ffffff" data-react-helmet="true" name="theme-color">
<style>
@import url('https://fonts.googleapis.com/css2?family=Belanosima:wght@400;600;700&display=swap');
:root {
font-family: 'Belanosima', sans-serif;
}
body {
text-align: center;
color: white;
background: #090524;
overflow-x: hidden;
}
ul {
border: 1px solid lightgray;
border-radius: 10px;
padding: 10px;
width: 400px;
margin: auto;
list-style-type: none;
}
.rainbow {
background: linear-gradient(to right, #ef5350, #f48fb1, #7e57c2, #2196f3, #26c6da, #43a047, #eeff41, #f9a825, #ff5722);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
#header {
//text-transform: uppercase;
color: #fff;
}
#awdog {
cursor: pointer;
}
/* unvisited link */
a:link {
color: pink;
}
/* visited link */
a:visited {
color: lightgray;
}
a:visited::after {
content: " (visited)";
}
/* mouse over link */
a:hover {
color: hotpink;
}
/* selected link */
a:active {
color: white;
}
</style>
</head>
<body>
<h1 id="header">awesome.colean.cc</h1>
<img id="awdog" src="res/awdog.png" width="160" onclick="pet()"><br>
<a href="javascript:bio()">awdog</a>, the mascot of awesome
<br><br>
<ul>
<li><a href="https://git.colean.cc/awesomeuser/awesome.git">@gitrepo</a></li>
<li><a href="https://colean.cc">@mothersite</a></li>
<hr style="border-top: none;">
<li><a href="proj/wolfystein.html">@Wolfystein3D</a></li>
<li><a href="proj/java.html">@javagreaterthancpp</a> <span class="rainbow">(epilepsy warning!)</span></li>
</ul>
<script>
var header = document.getElementById("header");
var awdog = document.getElementById("awdog");
var intensity = 0;
function pet() {
intensity = 10;
}
function bio() {
//temp
alert("awdog is nonbinary ^w^");
}
var prevTime = 0;
async function update(timestamp) {
let dt = (timestamp - prevTime) / 1000;
prevTime = timestamp;
// petting shake
let a = Math.random() * Math.PI * 2;
awdog.style.transform = "translate(" + (Math.cos(a) * intensity) + "px, " + (Math.sin(a) * intensity) + "px)";
if (intensity > 0) {
intensity -= 20 * dt;
} else {
intensity = 0;
}
// header
let t = timestamp / 500;
let x = Math.cos(t) * 20;
let y = Math.sin(t) * 20;
header.style.transform = "translate(" + x + "px, " + y + "px)";// rotate(" + (Math.cos(t) * -5) + "deg)";
header.style.textShadow = (Math.cos(t - 0.2) * 20 - x) + "px " + (Math.sin(t - 0.2) * 20 - y) + "px #c91a29,"
+ (Math.cos(t - 0.4) * 20 - x) + "px " + (Math.sin(t - 0.4) * 20 - y) + "px #c94f1a,"
+ (Math.cos(t - 0.6) * 20 - x) + "px " + (Math.sin(t - 0.6) * 20 - y) + "px #a6c91a,"
+ (Math.cos(t - 0.8) * 20 - x) + "px " + (Math.sin(t - 0.8) * 20 - y) + "px #1ac95a,"
+ (Math.cos(t - 1.0) * 20 - x) + "px " + (Math.sin(t - 1.0) * 20 - y) + "px #1a60c9";
// loop
requestAnimationFrame(update);
}
requestAnimationFrame(update);
</script>
</body>
</html>