[READ-ONLY] Mirror of https://github.com/flo-bit/bluesky-particles. flo-bit.dev/bluesky-visualizers/particles
0

Configure Feed

Select the types of activity you want to include in your feed.

add license, disabled state buttons

+42 -6
+21
LICENSE
··· 1 + MIT License Copyright (c) 2024 flo-bit 2 + 3 + Permission is hereby granted, free of 4 + charge, to any person obtaining a copy of this software and associated 5 + documentation files (the "Software"), to deal in the Software without 6 + restriction, including without limitation the rights to use, copy, modify, merge, 7 + publish, distribute, sublicense, and/or sell copies of the Software, and to 8 + permit persons to whom the Software is furnished to do so, subject to the 9 + following conditions: 10 + 11 + The above copyright notice and this permission notice 12 + (including the next paragraph) shall be included in all copies or substantial 13 + portions of the Software. 14 + 15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 18 + EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 + THE SOFTWARE.
+3 -2
package.json
··· 16 16 "autoprefixer": "^10.4.20", 17 17 "postcss": "^8.4.47", 18 18 "tailwindcss": "^3.4.12" 19 - } 20 - } 19 + }, 20 + "license": "MIT" 21 + }
+18 -4
src/script.ts
··· 80 80 }); 81 81 82 82 // post-button 83 - document.getElementById("post-button")?.addEventListener("click", () => { 83 + const postButton = document.getElementById("post-button"); 84 + postButton?.addEventListener("click", () => { 84 85 visible.post = !visible.post; 85 86 if (visible.post) { 86 87 postParticles.container.visible = true; 88 + postButton.style.opacity = "1"; 87 89 } else { 88 90 postParticles.container.visible = false; 91 + postButton.style.opacity = "0.4"; 89 92 } 90 93 }); 91 94 92 95 // like-button 93 - document.getElementById("like-button")?.addEventListener("click", () => { 96 + const likeButton = document.getElementById("like-button"); 97 + likeButton?.addEventListener("click", () => { 94 98 visible.heart = !visible.heart; 95 99 if (visible.heart) { 96 100 heartParticles.container.visible = true; 101 + likeButton.style.opacity = "1"; 97 102 } else { 98 103 heartParticles.container.visible = false; 104 + likeButton.style.opacity = "0.4"; 99 105 } 100 106 }); 101 107 102 108 // follow-button 103 - document.getElementById("follow-button")?.addEventListener("click", () => { 109 + const followButton = document.getElementById("follow-button"); 110 + followButton?.addEventListener("click", () => { 104 111 visible.follow = !visible.follow; 105 112 if (visible.follow) { 106 113 followParticles.container.visible = true; 114 + followButton.style.opacity = "1"; 107 115 } else { 108 116 followParticles.container.visible = false; 117 + followButton.style.opacity = "0.4"; 109 118 } 110 119 }); 111 120 112 121 // user-button 113 - document.getElementById("user-button")?.addEventListener("click", () => { 122 + const userButton = document.getElementById("user-button"); 123 + userButton?.addEventListener("click", () => { 114 124 visible.user = !visible.user; 115 125 if (visible.user) { 116 126 userParticles.container.visible = true; 127 + // set button opacity to 100% 128 + userButton.style.opacity = "1"; 117 129 } else { 118 130 userParticles.container.visible = false; 131 + // set button opacity to 50% 132 + userButton.style.opacity = "0.4"; 119 133 } 120 134 }); 121 135