From 49935508948f6a00ebcabc4ce17dcfbad8f63bde Mon Sep 17 00:00:00 2001 From: Trumeet Date: Sat, 24 Jul 2021 13:02:27 -0700 Subject: First Commit --- Prototype.odp | Bin 0 -> 61051 bytes bg.svg | 57 +++++++++++++++++++++++ bg.webp | Bin 0 -> 2880 bytes index.css | 116 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 65 ++++++++++++++++++++++++++ indiHome-noBackground.png | Bin 0 -> 253866 bytes main.js | 66 ++++++++++++++++++++++++++ 7 files changed, 304 insertions(+) create mode 100644 Prototype.odp create mode 100644 bg.svg create mode 100644 bg.webp create mode 100644 index.css create mode 100644 index.html create mode 100644 indiHome-noBackground.png create mode 100644 main.js diff --git a/Prototype.odp b/Prototype.odp new file mode 100644 index 0000000..887a71e Binary files /dev/null and b/Prototype.odp differ diff --git a/bg.svg b/bg.svg new file mode 100644 index 0000000..6fd659b --- /dev/null +++ b/bg.svg @@ -0,0 +1,57 @@ + + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + image/svg+xml + + + + + + diff --git a/bg.webp b/bg.webp new file mode 100644 index 0000000..d3bd193 Binary files /dev/null and b/bg.webp differ diff --git a/index.css b/index.css new file mode 100644 index 0000000..9ef04e7 --- /dev/null +++ b/index.css @@ -0,0 +1,116 @@ + + +html { + display: table; + margin: auto; +} + + +body{ + background-repeat: no-repeat; + background-attachment: fixed; + background-image: url("indiHome-noBackground.png"); + background-size: cover; + background-position: center bottom; +} + + + + +h1{ + font-size: 2.0em; + margin-block-end: 0.05em; + margin-block-start: 0.05em; + font-weight: bold; +} +.highlight{ + font-size: 2em; + font-weight: bold; +} + +h2{ + font-size: 1em; + margin-block-end: 0.1em; + margin-block-start: 0.1em; +} + + + + +.indihome-content{ + position: absolute; + left: 5%; + top: 25%; +} + + + + + + +.indihome-line{ + height: 4em; +} + +.indihome-left{ + float: left; + width: 45%; + text-align: right; +} + +.node-left{ + padding-right: 0.5em; +} + + +.node-head{ + font-size: 0.8em; +} +.node-highlight{ + font-size: 1.2em; + color: red; + font-weight: bold; +} +.node-geo{ + font-size: 1.0em; + font-weight: bold; +} + + +.indihome-right{ + float: right; + width: 55%; + height: 4em; + display: flex; + align-items: center; +} +.node-right{ + padding-left: 0.5em; +} +.node-url{ + text-align: left; + font-size: 1.4em; + font-weight: bold; +} + + + + + +.header{ + margin: auto; + left: 0; + right: 0; + margin-block-start: 1em; + margin-block-end: 1em; + text-align: left; + width:auto; + display:inline-block; +} + +.red{ + color: red; + text-shadow: 0.05em 0.05em #0008; +} + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..cadb91f --- /dev/null +++ b/index.html @@ -0,0 +1,65 @@ + + + + + Yuuta Network Services + + + +
+
+

Yuuta

+

Network Services

+

AS4242422980 at DN42

+

Global Network Infrastructure

+
+
+ + +
+
+
+
Yuuta
+
Network Services
+
Tokyo, Japan
+
+
+
tyo1.jp.dn42.yuuta.moe
+
+
+
+
+
Yuuta
+
Network Services
+
San Jose, United States
+
+
+
sjc1.us.dn42.yuuta.moe
+
+
+
+
+
Yuuta
+
Network Services
+
Toronto, Canada
+
+
+
yyz1.ca.dn42.yuuta.moe
+
+
+
+
+
Yuuta
+
Network Services
+
Frankfurt, Germany
+
+
+
fra1.de.dn42.yuuta.moe
+
+
+
+ + + + + \ No newline at end of file diff --git a/indiHome-noBackground.png b/indiHome-noBackground.png new file mode 100644 index 0000000..e48046a Binary files /dev/null and b/indiHome-noBackground.png differ diff --git a/main.js b/main.js new file mode 100644 index 0000000..8f867fb --- /dev/null +++ b/main.js @@ -0,0 +1,66 @@ +const css = window.document.styleSheets[0] + + +let currentTarget={ + fromLeft: 5, + toLeft: 5, // left: 5%; + fromTop:25, + toTop: 25, // top: 25%; + time: 0, +} + +function genTarget(){ + currentTarget.fromLeft = currentTarget.toLeft; + currentTarget.fromTop = currentTarget.toTop; + currentTarget.toLeft = 5 + (randn_bm() - 0.5)*10 + currentTarget.toTop = 25 + (randn_bm()-0.5)*10 + currentTarget.time = randn_bm() * 0.4 +0.05 +} +cssIndex = undefined; + +const toMove = document.getElementById("indihome-content"); +let keyframeId = 0; +function move(){ + genTarget() + if(cssIndex!=undefined){ + css.deleteRule(cssIndex) + } + cssIndex = css.cssRules.length + toMove.style.animation = "" + css.insertRule( + "@keyframes move"+keyframeId+" {\n" + + " 0% {\n" + + " left: "+currentTarget.fromLeft+"%;\n" + + " top: "+currentTarget.fromTop+"%;\n" + + " }\n" + + " 100% {\n" + + " left: "+currentTarget.toLeft+"%;\n" + + " top: "+currentTarget.toTop+"%;\n" + + " }\n" + + "}" + ,cssIndex) + + toMove.style.animation = "move"+keyframeId+" "+currentTarget.time+"s linear" + keyframeId++; +} + +function moveLoop(){ + move() + setTimeout(moveLoop, currentTarget.time*1000) +} +moveLoop() + + +/** + * this code uses the Box–Muller transform to give you a normal distribution between 0 and 1 inclusive. + * https://stackoverflow.com/questions/25582882/javascript-math-random-normal-distribution-gaussian-bell-curve + */ +function randn_bm() { + let u = 0, v = 0; + while(u === 0) u = Math.random(); //Converting [0,1) to (0,1) + while(v === 0) v = Math.random(); + let num = Math.sqrt( -2.0 * Math.log( u ) ) * Math.cos( 2.0 * Math.PI * v ); + num = num / 10.0 + 0.5; // Translate to 0 -> 1 + if (num > 1 || num < 0) return randn_bm() // resample between 0 and 1 + return num +} \ No newline at end of file -- cgit v1.2.3