Skip to content
Snippets Groups Projects
Commit 9cd40f21 authored by Emmanuel Salomon's avatar Emmanuel Salomon :fist:
Browse files

fix: fetch emojis from discourse #5

parent 09e0e9a1
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,14 @@ html { ...@@ -29,6 +29,14 @@ html {
@apply text-white; @apply text-white;
} }
/* For emojis from discourse */
img.emoji {
width: 20px;
height: 20px;
vertical-align: middle;
display: inline;
}
/* Loader */ /* Loader */
@keyframes spinner { @keyframes spinner {
to { to {
......
<template> <template>
<section id="map"> <section id="map">
<div class="container flex items-end mb-3"> <div class="container flex items-end mb-3 pl-8">
<FaviconMap class="w-12 h-12 mr-3 fill-current dark:text-gray-100" /> <FaviconMap class="w-12 h-12 mr-3 fill-current dark:text-gray-100" />
<a <a
href="https://carte.monnaie-libre.fr" href="https://carte.monnaie-libre.fr"
......
<template> <template>
<section id="agenda" class="container py-12"> <section id="agenda" class="container py-12">
<div class="border-b-2 container flex items-end mb-3 pb-2"> <div class="border-b-2 container flex items-end mb-3 pb-2 pl-1">
<JuneCalendar class="w-12 mr-3 fill-current dark:text-gray-100" /> <JuneCalendar class="w-12 mr-3 fill-current dark:text-gray-100" />
<a <a
:href="`${$config.forum_url}/calendar`" :href="`${$config.forum_url}/calendar`"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
{{ prettyDate(event.event.start) }} {{ prettyDate(event.event.start) }}
<div v-for="(tag, i) in event.tag" :key="i">{{ tag }}</div> <div v-for="(tag, i) in event.tag" :key="i">{{ tag }}</div>
</div> </div>
<div>{{ event.title }}</div> <div v-html="emojify(event.title)" />
</a> </a>
</div> </div>
</aside> </aside>
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<script> <script>
import JuneCalendar from '~/static/img/june-calendar.svg?inline' import JuneCalendar from '~/static/img/june-calendar.svg?inline'
import { fetchNextEvents } from '~/libs/api-forum' import { fetchNextEvents } from '~/libs/api-forum'
import { performEmojiUnescape } from '~/libs/emoji'
export default { export default {
name: 'HomeNextEvents', name: 'HomeNextEvents',
...@@ -118,6 +119,13 @@ export default { ...@@ -118,6 +119,13 @@ export default {
}) })
.reduce((string, part) => string + part) .reduce((string, part) => string + part)
}, },
emojify(text) {
return performEmojiUnescape(text, {
emojiSet: 'images/emoji/twitter',
emojiCDNUrl: 'https://forum.monnaie-libre.fr',
getURL: (url) => url,
})
},
}, },
} }
</script> </script>
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment