diff options
author | Renard | 2019-09-22 12:50:45 -0300 |
---|---|---|
committer | Renard | 2019-09-22 12:50:45 -0300 |
commit | 5adcc8d6b34e0e2db145e5609248b477eaa16e0c (patch) | |
tree | 5f4882254da04e58872589b6d6846d810ef3747c /src | |
parent | 39d3bf2e7e4b9ed4d0cb0e9f090fef4a35f30d6d (diff) | |
download | bai-client-5adcc8d6b34e0e2db145e5609248b477eaa16e0c.tar.gz bai-client-5adcc8d6b34e0e2db145e5609248b477eaa16e0c.tar.xz bai-client-5adcc8d6b34e0e2db145e5609248b477eaa16e0c.zip |
Hue filter avatars
Diffstat (limited to 'src')
-rw-r--r-- | src/Post.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Post.js b/src/Post.js index 1140d49..6e09dd2 100644 --- a/src/Post.js +++ b/src/Post.js @@ -62,13 +62,15 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => { Math.round(idRng() * 200) + ")"; - let rndAvatar; + let rndAvatar, hue; if (user_id !== "") { - let i = Math.round(idRng() * avatars.length); + let i = Math.round(idRng() * avatars.length - 1); rndAvatar = avatars[i]; + hue = Math.round(idRng() * 360); } else { - let i = Math.round(rng() * avatars.length); + let i = Math.round(rng() * avatars.length - 1); rndAvatar = avatars[i]; + hue = Math.round(rng() * 360); } let flag; @@ -105,6 +107,7 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => { <Comment inverted={nightMode}> <Comment.Avatar src={`https://bienvenidoainternet.org/static/ico/${rndAvatar}.gif`} + style={{ filter: `hue-rotate(${hue}deg)` }} /> <Comment.Content> <Comment.Author |