From: Ruben Beltran del Rio Date: Mon, 23 Jan 2023 20:46:29 +0000 (+0100) Subject: Adjust the resources a little X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/3b6787e4533680a15e6cf6d5345c2b6822594826 Adjust the resources a little --- diff --git a/Gemfile.lock b/Gemfile.lock index c433b6b..bb97cad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,62 +1,67 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.0) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) ffi (1.15.5) forwardable-extended (2.6.0) + google-protobuf (3.21.12-x86_64-darwin) + google-protobuf (3.21.12-x86_64-linux) http_parser.rb (0.8.0) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jekyll (4.2.2) + jekyll (4.3.2) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 1.0) - jekyll-sass-converter (~> 2.0) + jekyll-sass-converter (>= 2.0, < 4.0) jekyll-watch (~> 2.0) - kramdown (~> 2.3) + kramdown (~> 2.3, >= 2.3.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.4.0) + mercenary (>= 0.3.6, < 0.5) pathutil (~> 0.9) - rouge (~> 3.0) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - terminal-table (~> 2.0) - jekyll-sass-converter (2.2.0) - sassc (> 2.0.1, < 3.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) jekyll-watch (2.2.1) listen (~> 3.0) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) + liquid (4.0.4) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.7) - rb-fsevent (0.11.1) + public_suffix (5.0.1) + rake (13.0.6) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rdiscount (2.2.0.2) + rdiscount (2.2.7) rexml (3.2.5) - rouge (3.28.0) + rouge (4.0.1) safe_yaml (1.0.5) - sassc (2.4.0) - ffi (~> 1.9) - terminal-table (2.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.8.0) + sass-embedded (1.57.1) + google-protobuf (~> 3.21) + rake (>= 10.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.4.2) webrick (1.7.0) PLATFORMS diff --git a/jekyll/css/application.css b/jekyll/css/application.css index ee2fe3d..bd50233 100644 --- a/jekyll/css/application.css +++ b/jekyll/css/application.css @@ -1,4 +1,4 @@ -h1 canvas { +canvas { width: 64px; height: 64px; display: inline-block; diff --git a/jekyll/js/animation.js b/jekyll/js/animation.js index 3fc4a85..65ee4bd 100644 --- a/jekyll/js/animation.js +++ b/jekyll/js/animation.js @@ -1,26 +1,26 @@ (function () { - var canvas = document.querySelector('canvas'); - var context = canvas.getContext('2d'); - var fps = 30; - var lastFrame = 0; - var speed = 1; - var size = 5 + Roundom(10); + var canvas = document.querySelector('canvas'), + context = canvas.getContext('2d'), + fps = 30, + lastFrame = 0, + speed = 1, + size = 5 + rand(10); var clear = !!(Math.random() > 0.5); var changeColor = !!(Math.random() > 0.5); - var items = Array(Roundom(10) + 6).fill(null).map(() => ({ - x: Roundom(100), - y: Roundom(100), + var items = Array(rand(10) + 6).fill(null).map(() => ({ + x: rand(100), + y: rand(100), angle: Math.random() * 2 * Math.PI, - color: Array(3).fill(null).map(() => Roundom(256)) + color: Array(3).fill(null).map(() => rand(256)) })); var shapes = [square, circle, heart, chaos, lineChaos]; var positions = [identity, spin(5), spin(15)]; - var draw = shapes[Roundom(shapes.length)]; - var position = positions[Roundom(positions.length)]; + var draw = shapes[rand(shapes.length)]; + var position = positions[rand(positions.length)]; - function Roundom (x) { + function rand (x) { return Math.floor(Math.random() * x); } @@ -44,7 +44,7 @@ context.beginPath(); context.moveTo(p.x, p.y); context.lineTo(p.x * 10 * Math.cos(item.angle), p.y * 10 * Math.sin(item.angle)); - context.lineTo(Roundom(100), Roundom(100)); + context.lineTo(rand(100), rand(100)); context.fill(); }