aboutsummaryrefslogtreecommitdiffstats
path: root/js/arrows.js
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 13:43:53 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-01-29 13:43:53 +0200
commitdcf61354050bfe81d6983f1aec34d7d3d6733a0d (patch)
tree87535d87bc498d8d852f30bb1de96864d68e9ba4 /js/arrows.js
parent33e533d28dbf9ad7bfc7ad9af467e5efe25ae8a0 (diff)
downloadfileup-dcf61354050bfe81d6983f1aec34d7d3d6733a0d.tar.gz
index.html + login.html => index.php
those files had the entire HTML tree duplicated, which would make it difficult to make any changes to the front end. this commit combines the two files in one, with some front-end JS to switch between the login and register forms.
Diffstat (limited to 'js/arrows.js')
-rw-r--r--js/arrows.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/js/arrows.js b/js/arrows.js
deleted file mode 100644
index 10ad416..0000000
--- a/js/arrows.js
+++ /dev/null
@@ -1,37 +0,0 @@
-
-arrows = [];
-
-const minSpeed = 3;
-const maxSpeed = 8;
-const delay = 1500;
-const lifetime = 20000;
-
-function make_arrow() {
- const svg = document.getElementById("protoarrow").cloneNode();
- svg.style.left = Math.random() * 100 + '%';
- svg.style.display = 'block';
- document.getElementById('arrows').append(svg);
- const ob = {
- y: -800,
- svg: svg,
- speed: Math.random() * (maxSpeed - minSpeed) + minSpeed
- };
- arrows.push(ob);
- setTimeout(make_arrow, delay);
- setTimeout(() => {
- svg.remove();
- arrows.shift();
- }, lifetime);
-}
-
-function update() {
- for (const arrow of arrows) {
- arrow.y += arrow.speed;
- arrow.svg.style.bottom = arrow.y + 'px';
- }
-
- window.requestAnimationFrame(update);
-}
-
-make_arrow();
-update();