diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | glitch.css | 196 | ||||
-rw-r--r-- | glitch.scss | 84 | ||||
-rw-r--r-- | index.html | 121 |
4 files changed, 412 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..e466991 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Alicorn Network website + +Just a simple website, for fun. + +The glitch animation is generated from the glitch.scss file. The output file +is commited because the glitch is randomly generated when we compilated +the glitch.scss file and we *want* to keep the animation when we push the +website elsewhere. + +For keeping this repo light, the font unifont_jp-13.0.03.ttf is not commited. +The official website is: http://unifoundry.com/unifont/index.html diff --git a/glitch.css b/glitch.css new file mode 100644 index 0000000..b07e7be --- /dev/null +++ b/glitch.css @@ -0,0 +1,196 @@ +/* Our mixin positions a copy of our text +directly on our existing text, while +also setting content to the appropriate +text set in the data-text attribute. */ +.glitch { + position: relative; + color: white; + font-size: 12px; + letter-spacing: .5em; + /* Animation provies a slight random skew. Check bottom of doc + for more information on how to random skew. */ + animation: glitch-skew 1s infinite linear alternate-reverse; } + .glitch::before { + content: attr(data-text); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + left: 2px; + text-shadow: -2px 0 #ff00c1; + /* Creates an initial clip for our glitch. This works in + a typical top,right,bottom,left fashion and creates a mask + to only show a certain part of the glitch at a time. */ + clip: rect(44px, 450px, 56px, 0); + /* Runs our glitch-anim defined below to run in a 5s loop, infinitely, + with an alternating animation to keep things fresh. */ + animation: glitch-anim 5s infinite linear alternate-reverse; } + .glitch::after { + content: attr(data-text); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + left: -2px; + text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1; + animation: glitch-anim2 1s infinite linear alternate-reverse; } + +/* Creates an animation with 20 steaps. For each step, it calculates +a percentage for the specific step. It then generates a random clip +box to be used for the random glitch effect. Also adds a very subtle +skew to change the 'thickness' of the glitch.*/ +@keyframes glitch-anim { + 0% { + clip: rect(61px, 9999px, 7px, 0); + transform: skew(0.17deg); } + 5% { + clip: rect(9px, 9999px, 91px, 0); + transform: skew(0.24deg); } + 10% { + clip: rect(24px, 9999px, 95px, 0); + transform: skew(0.69deg); } + 15% { + clip: rect(78px, 9999px, 69px, 0); + transform: skew(0.32deg); } + 20% { + clip: rect(99px, 9999px, 59px, 0); + transform: skew(0.55deg); } + 25% { + clip: rect(20px, 9999px, 92px, 0); + transform: skew(0.62deg); } + 30% { + clip: rect(90px, 9999px, 77px, 0); + transform: skew(0.2deg); } + 35% { + clip: rect(54px, 9999px, 41px, 0); + transform: skew(0.93deg); } + 40% { + clip: rect(29px, 9999px, 66px, 0); + transform: skew(0.76deg); } + 45% { + clip: rect(53px, 9999px, 42px, 0); + transform: skew(0.3deg); } + 50% { + clip: rect(5px, 9999px, 22px, 0); + transform: skew(0.48deg); } + 55% { + clip: rect(3px, 9999px, 31px, 0); + transform: skew(0.71deg); } + 60% { + clip: rect(61px, 9999px, 66px, 0); + transform: skew(0.64deg); } + 65% { + clip: rect(85px, 9999px, 96px, 0); + transform: skew(0.7deg); } + 70% { + clip: rect(9px, 9999px, 49px, 0); + transform: skew(0.14deg); } + 75% { + clip: rect(73px, 9999px, 90px, 0); + transform: skew(0.24deg); } + 80% { + clip: rect(93px, 9999px, 23px, 0); + transform: skew(0.31deg); } + 85% { + clip: rect(92px, 9999px, 65px, 0); + transform: skew(1deg); } + 90% { + clip: rect(65px, 9999px, 61px, 0); + transform: skew(0.13deg); } + 95% { + clip: rect(99px, 9999px, 17px, 0); + transform: skew(0.02deg); } + 100% { + clip: rect(99px, 9999px, 38px, 0); + transform: skew(0.23deg); } } + +@keyframes glitch-anim2 { + 0% { + clip: rect(50px, 9999px, 51px, 0); + transform: skew(0.2deg); } + 5% { + clip: rect(53px, 9999px, 26px, 0); + transform: skew(0.91deg); } + 10% { + clip: rect(43px, 9999px, 19px, 0); + transform: skew(0.7deg); } + 15% { + clip: rect(33px, 9999px, 74px, 0); + transform: skew(0.53deg); } + 20% { + clip: rect(47px, 9999px, 61px, 0); + transform: skew(0.08deg); } + 25% { + clip: rect(20px, 9999px, 31px, 0); + transform: skew(0.09deg); } + 30% { + clip: rect(55px, 9999px, 69px, 0); + transform: skew(0.68deg); } + 35% { + clip: rect(5px, 9999px, 43px, 0); + transform: skew(0.44deg); } + 40% { + clip: rect(13px, 9999px, 80px, 0); + transform: skew(0.73deg); } + 45% { + clip: rect(60px, 9999px, 58px, 0); + transform: skew(0.86deg); } + 50% { + clip: rect(52px, 9999px, 24px, 0); + transform: skew(0.12deg); } + 55% { + clip: rect(37px, 9999px, 41px, 0); + transform: skew(0.94deg); } + 60% { + clip: rect(31px, 9999px, 8px, 0); + transform: skew(0.75deg); } + 65% { + clip: rect(86px, 9999px, 51px, 0); + transform: skew(0.17deg); } + 70% { + clip: rect(41px, 9999px, 23px, 0); + transform: skew(0.47deg); } + 75% { + clip: rect(70px, 9999px, 14px, 0); + transform: skew(0.61deg); } + 80% { + clip: rect(32px, 9999px, 24px, 0); + transform: skew(0.43deg); } + 85% { + clip: rect(100px, 9999px, 69px, 0); + transform: skew(0.49deg); } + 90% { + clip: rect(45px, 9999px, 56px, 0); + transform: skew(0.47deg); } + 95% { + clip: rect(85px, 9999px, 95px, 0); + transform: skew(0.55deg); } + 100% { + clip: rect(85px, 9999px, 14px, 0); + transform: skew(0.41deg); } } + +@keyframes glitch-skew { + 0% { + transform: skew(4deg); } + 10% { + transform: skew(-3deg); } + 20% { + transform: skew(-4deg); } + 30% { + transform: skew(-4deg); } + 40% { + transform: skew(-3deg); } + 50% { + transform: skew(-2deg); } + 60% { + transform: skew(-4deg); } + 70% { + transform: skew(0deg); } + 80% { + transform: skew(5deg); } + 90% { + transform: skew(1deg); } + 100% { + transform: skew(4deg); } } diff --git a/glitch.scss b/glitch.scss new file mode 100644 index 0000000..c96f1f8 --- /dev/null +++ b/glitch.scss @@ -0,0 +1,84 @@ +// source: https://codepen.io/cipherbeta/pen/YLdVjw + +/* Our mixin positions a copy of our text +directly on our existing text, while +also setting content to the appropriate +text set in the data-text attribute. */ +@mixin glitchCopy { + content: attr(data-text); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.glitch { + position: relative; + color: white; + font-size: 12px; + letter-spacing: .5em; + /* Animation provies a slight random skew. Check bottom of doc + for more information on how to random skew. */ + animation: glitch-skew 1s infinite linear alternate-reverse; + + // Creates a copy before our text. + &::before{ + // Duplicates our text with the mixin. + @include glitchCopy; + // Scoots text slightly to the left for the color offset. + left: 2px; + // Creates the color 'shadow' that happens on the glitch. + text-shadow: -2px 0 #ff00c1; + /* Creates an initial clip for our glitch. This works in + a typical top,right,bottom,left fashion and creates a mask + to only show a certain part of the glitch at a time. */ + clip: rect(44px, 450px, 56px, 0); + /* Runs our glitch-anim defined below to run in a 5s loop, infinitely, + with an alternating animation to keep things fresh. */ + animation: glitch-anim 5s infinite linear alternate-reverse; + } + + // Creates a copy after our text. Note comments from ::before. + &::after { + @include glitchCopy; + left: -2px; + text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1; + animation: glitch-anim2 1s infinite linear alternate-reverse; + } +} + +/* Creates an animation with 20 steaps. For each step, it calculates +a percentage for the specific step. It then generates a random clip +box to be used for the random glitch effect. Also adds a very subtle +skew to change the 'thickness' of the glitch.*/ +@keyframes glitch-anim { + $steps: 20; + @for $i from 0 through $steps { + #{percentage($i*(1/$steps))} { + clip: rect(random(100)+px, 9999px, random(100)+px, 0); + transform: skew((random(100) / 100) + deg); + } + } +} + +// Same deal, just duplicated for ultra randomness. +@keyframes glitch-anim2 { + $steps: 20; + @for $i from 0 through $steps { + #{percentage($i*(1/$steps))} { + clip: rect(random(100)+px, 9999px, random(100)+px, 0); + transform: skew((random(100) / 100) + deg); + } + } +} + +// Does the same deal as before, but now only skews. Used for main text. +@keyframes glitch-skew { + $steps: 10; + @for $i from 0 through $steps { + #{percentage($i*(1/$steps))} { + transform: skew((random(10) - 5) + deg); + } + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..10e401e --- /dev/null +++ b/index.html @@ -0,0 +1,121 @@ +<head> + <meta charset="utf-8"> +<style> + + +@import url("/glitch.css"); + +@font-face { + font-family: "unifont_jp"; + src: url("/unifont_jp-13.0.03.ttf") format("truetype"); +} + +html { + color: white; + background: black; +} + +pre, .glitch { + font-family: 'unifont_jp'; +} + +pre { + position: relative; +} + +html, body { + height: 100%; + overflow: hidden; +} +body { + margin: 0; +} +.flex-container { + height: 100%; + padding: 0; + margin: 0; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; +} +.row { + width: auto; +} + +.glitch { + position: absolute; + top: 84%; + left: 34%; + background: black; + padding-bottom: 1px; + display: inline !important; +} + + +</style> +</head> + +<body> +<div class="flex-container"> + <div class="row"> + <div class="flex-item code"> + <pre> ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ +░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ + + ,| + //| ,| + //,/ -~ | + // / | _-~ / , + /'/ / / _-~ _/_-~ | + ( ( / /' _ -~ _-~ ,/' + \~\/'/| __--~~__--\ _-~ _/, + ,,)))))));, \/~-_ __--~~ --~~ __/~ _-~ / + __))))))))))))));,>/\ / __--~~ \-~~ _-~ + -\(((((''''(((((((( >~\/ --~~ __--~' _-~ ~| + --==//////(('' . `)))))), / ___---~~ ~~\~~__--~ + ))| @ ;-. (((((/ __--~~~'~~/ + ( `| / ) )))/ ~~~~~__\__---~~__--~~--_ + | | | (/ ---~~~/__-----~~ ,;::' \ , + o_); ; / ----~~/ \,-~~~\ | /| + ; ( ---~~/ `:::| |;| < > + | _ `----~~~~' / `:| \;\_____// + ______/\/~ | / / ~------~ + /~;;.____/;;' / ___----( `;;;/ + / // _;______;'------~~~~~ |;;/\ / + // | | / | \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + + ██ ██ + SPACE ░██░░ + ██████ ░██ ██ █████ ██████ ██████ ███████ + ░░░░░░██ ░██░██ ██░░░██ ██░░░░██░░██░░█░░██░░░██ + ███████ ░██░██░██ ░░ ░██ ░██ ░██ ░ ░██ ░██ + ██░░░░██ ░██░██░██ ██░██ ░██ ░██ ░██ ░██ + ░░████████ ███░██░░█████ ░░██████ ░███ ███ ░██ + ░░░░░░░░ ░░░ ░░ ░░░░░ ░░░░░░ ░░░ ░░░ ░░ + NET + + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ░▓ セルフホスト ネットワーク ▓ + ░▓ - SpaceAlicorn - ▓ + ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ + + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ +░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ +<span style="display: none;" class="glitch" data-text="セルフホスト ネットワーク">セルフホスト ネットワーク</span> +</pre> +</div> +</div> +</div> + + +</body> |