mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 19:41:17 -04:00
twemoji -> imagemoji (but still with twemoji SVGs)
https://github.com/jakejarvis/imagemoji
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import twemoji from "twemoji";
|
||||
import { parse as parseEmoji } from "imagemoji";
|
||||
|
||||
twemoji.parse(document.body, {
|
||||
// simpler relative URIs
|
||||
callback: (icon) => `/assets/emoji/${icon}.svg`,
|
||||
});
|
||||
// we're hosting twemojis locally instead of from Twitter's CDN
|
||||
parseEmoji(document.body, (icon) => `/assets/emoji/${icon}.svg`);
|
||||
|
@@ -5,7 +5,7 @@ import { ifDefined } from "lit-html/directives/if-defined.js";
|
||||
import dayjs from "dayjs";
|
||||
import dayjsLocalizedFormat from "dayjs/plugin/localizedFormat.js";
|
||||
import dayjsRelativeTime from "dayjs/plugin/relativeTime.js";
|
||||
import twemoji from "twemoji";
|
||||
import { parse as parseEmoji } from "imagemoji";
|
||||
|
||||
// API endpoint (sort by stars, limit to 12)
|
||||
const PROJECTS_ENDPOINT = "/api/projects/?top&limit=12";
|
||||
@@ -84,9 +84,7 @@ if (wrapper) {
|
||||
}
|
||||
|
||||
// the repo descriptions were added after the first twemoji parsing
|
||||
twemoji.parse(wrapper, {
|
||||
callback: (icon) => `/assets/emoji/${icon}.svg`,
|
||||
});
|
||||
parseEmoji(wrapper, (icon) => `/assets/emoji/${icon}.svg`);
|
||||
})
|
||||
.catch(() => {
|
||||
// something went horribly wrong, initiate coverup
|
||||
|
Reference in New Issue
Block a user