diff --git a/client/lib/fizzy-text.js b/client/lib/fizzy-text.js index ac69885c..8c99fe84 100644 --- a/client/lib/fizzy-text.js +++ b/client/lib/fizzy-text.js @@ -10,7 +10,7 @@ function fizzyText(message) { this.growthSpeed = 0.2; // how fast do particles change size? this.minSize = 1; - this.maxSize = 4; // how big can they get? + this.maxSize = 6; // how big can they get? this.noiseStrength = 10; // how turbulent is the flow? this.speed = 0.4; // how fast do particles move? this.displayOutline = false; // should we draw the message as a stroke? @@ -216,7 +216,8 @@ function fizzyText(message) { // Draw the circle. g.beginPath(); - g.arc(this.x, this.y, this.r, 0, Math.PI * 2, false); + // g.arc(this.x, this.y, this.r, 0, Math.PI * 2, false); + g.rect(this.x, this.y, this.r, this.r); g.fill(); } diff --git a/client/package.json b/client/package.json index a0766172..e0a506b7 100755 --- a/client/package.json +++ b/client/package.json @@ -14,6 +14,7 @@ "borc": "^2.0.3", "bulma-toast": "^1.2.0", "docco": "^0.7.0", + "jdenticon": "^2.1.0", "jest": "^18.0.0", "parcel": "^1.9.7", "preact": "^8.3.1", diff --git a/client/src/navbar.jsx b/client/src/navbar.jsx index 0a1e80d9..5059e653 100644 --- a/client/src/navbar.jsx +++ b/client/src/navbar.jsx @@ -1,39 +1,48 @@ const preact = require('preact'); const jdenticon = require('jdenticon'); -{/*Test to render navbar and some identicons*/} -const Navbar = () => ( -
- +// components all the way down +const Icon = name => ( - Mashy -> - + {name} + - - Ntr -> - - -
); -module.exports = Navbar; \ No newline at end of file +// the css attribute name `class` is reserved in js +// so in react you have to call it `className` +function Navbar() { + const NAMES = ['Mashy', 'ntr']; + + return ( +
+ + {NAMES.map(Icon)} +
+ ); + // map is a function that is called on every element of an array + // so in this ^^ case it calls Icon('Mashy') which returns some jsx + // that gets put into the dom +} + +module.exports = Navbar; diff --git a/client/src/socket.jsx b/client/src/socket.jsx index 5dc2cbb9..6893f046 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -1,9 +1,8 @@ const { toast } = require('bulma-toast'); +const cbor = require('borc'); const actions = require('./actions'); -const cbor = require('borc'); - function errorToast(err) { console.error(err); return toast({