aboutsummaryrefslogtreecommitdiff
path: root/static/fuck/index.html
blob: 39fedea7fe2f68f820bd8b6feb74864fce61a0a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<meta id="fuck" content="fuck everything idk" property="og:title" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="my website isnt dynamic :skull:" property="og:description" />
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>fuck rust</title>
</head>
<style>
  *{
    overflow: hidden;
  }
  #troll {
    font-size: 70px;
    width: fit-content;
    color: white;
  }
  body {
    background-color: black;
  }
</style>
<body>
  <div id="troll">fuck rust</div>
</body>
<script>
const funny = decodeURIComponent(location.hash.slice(1)) 
console.log(funny)
troll.innerText = "fuck " + funny
fuck.content = "fuck " + funny
document.title = "fuck " + funny
const section = document.body;
const text = troll;
const FPS = 60;
const colors = ['red','pink']
section.style.height = window.innerHeight + "px";
section.style.width = window.innerWidth + "px";

let xPosition = 10;
let yPosition = 10;
let xSpeed = 4;
let ySpeed = 4;
text.style.transition = "color 1000ms linear";
function update() {
  text.style.transform = `translateX(${xPosition}px) translateY(${yPosition}px)`
}

setInterval(() => {
  if (xPosition + text.clientWidth >= window.innerWidth || xPosition <= 0) {
    xSpeed = -xSpeed;
  }
  if (yPosition + text.clientHeight >= window.innerHeight || yPosition <= 0) {
    ySpeed = -ySpeed;
  }
  text.style.color = colors[parseInt(Math.random() * ((colors.length - 1) - 1) + 1)];
  xPosition += xSpeed;
  yPosition += ySpeed;
  update();
}, 1000 / FPS);

window.addEventListener("resize", () => {
  xPosition = 10;
  yPosition = 10;

  section.style.height = window.innerHeight + "px";
  section.style.width = window.innerWidth + "px";
});

</script>
</html>