Codemmit (previously named as CodeXpool) is a channel for learning Full-Stack Web Development mostly for Web Designs and UI Development using HTML CSS, JavaScript and also using React.js and Vue.js. Thanks For Visiting. HIT SUBSCRIBE For More Such Coding Stuff.
You can use the below source code for adding responsiveness (only you need to Call a function and set sphere radius depending on screen width). <script> const Texts = [ "HTML", "CSS", "JAVASCRIPT", "SWIFT", "MONGOOSE", "REACT", "PYTHON", "SASS", "DJANGO", "NODEJS", "MONGODB", "EXPRESS", "MYSQL", "JQUERY", "JAVA" ]; function radiusValue() { if (window.screen.width <= 778) { radii = 150; } else { radii = 290; } return radii; } var tagCloud = TagCloud(".Sphere", Texts, { // Sphere radius in px radius: radiusValue(), // animation speed // slow, normal, fast maxSpeed: "normal", initSpeed: "fast", // Rolling direction [0 (top) , 90 (left), 135 (right-bottom)] direction: 135, // interaction with mouse or not [Default true (decelerate to rolling init speed, and keep rolling with mouse).] keep: true }); // Giving color to each text in sphere var color = "#FF5733 "; document.querySelector(".Sphere").style.color = color; </script>
Hi, just using this as a template to integrate into my own portfolio but I love the look of this! I'm unable to get the contact field to work.. Where am I supposed to put my email address that sends me the info after someone fills out the contact form? Thanks!!!
@MegaDubstepmixes No need of it here, you can remove it. But if you want to make it responsive you can use below code: useEffect(() => { const container = '.tagcloud'; let radii; const texts = [ 'HTML', 'CSS', 'SASS', 'JavaScript', 'React', 'Vue', 'Nuxt', 'NodeJS', 'Shopify', 'Jquery', 'ES6', 'GIT', 'GITHUB', ]; function radiusValue() { if (window.screen.width <= 778) { radii = 150; } else { radii = 290; } return radii; } const options = { radius: radiusValue(), maxSpeed: 'normal', initSpeed: 'normal', keep: true, }; TagCloud(container, texts, options); }, []);
@MegaDubstepmixes I have deployed it on netlify, it works for me. Use the source code and take reference from video, make sure to install and import TagCloud, it should work.