Discovered Something Great but is there Better?

Discovered Something Great but is there Better?
0

#1

So earlier today I wanted to make a little thing on codepen and I needed to insert some emojis but had no clue how to do so.Then I used the famous philosopher Mr. Google and came across an emoji library made by Twitter back in 2014!Then I continues reading the article and it said something about this one other thing similar to font awesome but on a much smaller scale.Is it the best emoji library out there or do I just have to settle. Thanks!


#2

Operating systems already have emoji bundled with them, so you don’t need to pull them in from elsewhere. Just copy and paste the characters you need from the full emoji list.


#3

Thanks, I never knew that.


#4

One last question, if you guys don’t mind, so when I was looking for this emoji thing I saw a pen on codepen and saw that it was written out in the HTML section and what grabbed my attention was that the HTML was marked as pug -the markdown and was momentarily confused because I had no idea if it was necessary to use pug or is it a habit of that developer (I sometimes preload my pens with liks that i never use), so is pug a neccesity to use the unicode in html or is it not?Thanks


#5

Most languages have one (or more often mutiple competing) HTML templating language that lets you insert logic written in that language directly into the HTML, eg use loops or render out the value of variables. Pug is an HTML templating language for Javascript: write in Pug, spit out HTML. It has nothing to do with unicode (that’s down to the browser)


#6

@DanCouper I like what you are saying but I am not too sure I understood. Do I HAVE to use pug in my HTML or not?


#7

@cisd260036 No you don’t. But it can be helpful when you have a more complicated app.

Take the twitch.tv challenge for example. You have a number of channels but you don’t know how many in advance. The HTML for each channel is mostly the same with just a few parameters which are different such as the name and online status etc. In this type of scenario just writing out HTML would be too inflexible. So what I did was use a templating language called mustache to define a common layout for each channel. I dynamically receive a list of channels from twitch. Then in a javascript for loop I go through the list and apply the generic template to each member, filling in the blanks with the unique data for each channel. It’s less work to program, simpler to understand and easier to maintain if I ever need to change the look and feel.


#8

No, use whatever you want. It’s just there as an option if you want to write the HTML part of the pen using Pug. In this case, if you don’t really know what it is, you definitely don’t need it. If you want to convert it to HTML, you can use http://html2jade.org/ (note Pug used to be called Jade, hence the name of that app); of you want it saved as HTML in codepen, use that converter, past the html into the HTML field, then change the language from pug to HTML.


#9

Thanks guys, I appreciate it!