Skip to content

Commit

Permalink
move twemoji to js & css files
Browse files Browse the repository at this point in the history
  • Loading branch information
wish13yt committed Dec 24, 2024
1 parent 2ac8762 commit 533cdb7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
6 changes: 6 additions & 0 deletions css/twemoji.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}
22 changes: 3 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@twemoji/api@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/jquery-3.7.1.js"
integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
crossorigin="anonymous"></script>
<style>
img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}
</style>
<link rel="stylesheet" href="css/twemoji.css">
</head>
<body>
<script>
// https://stackoverflow.com/questions/56381173/how-to-resize-twemoji-emojis
$(document).ready(function () {
document.body = twemoji.parse(document.body);
});
</script>
<div id="snow" data-count="200"></div>
<noscript>
<link rel="stylesheet" href="css/js-disabled.css">
Expand Down Expand Up @@ -157,8 +140,9 @@ <h2>
</div>
</div>
</footer>
<script src="js\christmasmusic.js"></script>
<script src="js/christmasmusic.js"></script>
</body>
<script src="js/twemoji.js"></script>
</html>
<!--I love boys <3 -->

Expand Down
2 changes: 2 additions & 0 deletions js/twemoji.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// requires <script src="https://cdn.jsdelivr.net/npm/@twemoji/api@latest/dist/twemoji.min.js" crossorigin="anonymous"></script> in head
twemoji.parse(document.body);

0 comments on commit 533cdb7

Please sign in to comment.