Sunday, July 21, 2024
The Time I made Dekh Bhai Meme Creator
When I was learning JavaScript before moving to New Zealand, I decided to take on a small project. It was back in 2016, and "Dekh Bhai" memes were all the rage in India. The phrase "Dekh Bhai" means "Look Brother" in English. These memes originated from an Indian TV series called Dekh Bhai Dekh. I saw this project as a challenge and an opportunity to learn something new. Since I was still a beginner in JavaScript, it took me about a month to complete. The entire script was written using HTML, CSS, and JavaScript.
[link]https://git.hsinghhira.me/LookBro/[/link]
For the framework, I chose to use Bootstrap. It was easier for me to work with since I had been using Bootstrap for most of my projects. Bootstrap is a very popular CSS framework that helps in developing websites that are responsive and mobile-friendly.
To further enhance and support the script, I also utilized Normalize.css by Nicolas Gallagher. This helped ensure consistent rendering across different browsers.
To create the text-to-image functionality, I relied on Fabric.js. Fabric.js is a powerful and user-friendly JavaScript HTML5 canvas library. It provides an interactive object model on top of the canvas element and even includes an SVG-to-canvas (and canvas-to-SVG) parser.
In order to change the color of the texts, I utilized Prism.js by Lea Verou. Prism.js is a lightweight and versatile syntax highlighter.
For the left-hand side characters selection box, I implemented nanoScroller by James F. nanoScroller.js is a jQuery plugin that simplifies the implementation of Mac OS X Lion-styled scrollbars.
To select colors, I used JSColor.js by Jan Odvarko. This lightweight JavaScript library made it easy to choose colors within the project.
Lastly, I incorporated socialShare.js by Ritesh Kumar, a deprecated jQuery plugin that used to provide more control over social sharing buttons. Unfortunately, the script is no longer available in 2024.
To support all the JavaScript mentioned above, I utilized jQuery v2.1.0.
The rest of the scripts were developed by me.