Just using https://api.github.com/emojis to mess around with CSS grid.
A Pen by Stan Williams on CodePen.
<div class="๐"></div> |
$.getJSON('https://api.github.com/emojis', function(emoji) { | |
$.each(emoji, function(key, value) { | |
$('.๐').append('<img src="' + value + '" title="' + key + '">'); | |
}); | |
}); | |
$(document).on('click', '.๐ img', function () { | |
var code = $(this).attr('title'); | |
prompt('Copy to clipboard: Ctrl+C, Enter', ':' + code + ':'); | |
}); |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
.๐ { | |
display:grid; | |
grid-column-gap:1rem; | |
grid-row-gap:1rem; | |
grid-template-columns:repeat(auto-fit, minmax(30px, 1fr)); | |
padding:1rem; | |
} | |
.๐ img { | |
cursor:pointer; | |
height:auto; | |
max-width:100%; | |
width:100%; | |
} |
Just using https://api.github.com/emojis to mess around with CSS grid.
A Pen by Stan Williams on CodePen.