Skip to content
Permalink
Browse files

Integrate Twitter Emoji rendering support

  • Loading branch information...
leeaustinadams committed Oct 11, 2019
1 parent 91a3b75 commit 4929864e6ed91cab1d1bcb69ba9e0f3cb6d3106d
Showing with 18 additions and 2 deletions.
  1. +9 −0 resources/public/css/mango.css
  2. +2 −1 src/mango/core.cljs
  3. +5 −0 src/mango/dom.cljs
  4. +2 −1 src/mango/widgets.clj
@@ -615,3 +615,12 @@ textarea {
#syntax td:nth-child(even) {
border-right: 1px solid var(--quaternary);
}

img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
float: none;
border: none;
}
@@ -4,7 +4,7 @@
[mango.article]
[mango.page]
[mango.edit]
[mango.dom :refer [body js-script element-by-id elements-by-tag]]
[mango.dom :refer [body js-script element-by-id elements-by-tag twemoji]]
[oops.core :refer [oget oset!]]))

(enable-console-print!)
@@ -76,6 +76,7 @@
[]
(when-let [upload-form (element-by-id "upload-form")]
(bind-upload-form upload-form))
(twemoji (body))
(bind-pocket "pocket-btn-js" "https://widgets.getpocket.com/v1/j/btn.js?v=1"))

(defn unbind
@@ -87,3 +87,8 @@
[root]
(doseq [block (elements-by-tag root "code")]
(.highlightBlock js/hljs block)))

(defn twemoji
"Renders Twitter Emoji"
[root]
(.parse js/twemoji root))
@@ -20,7 +20,8 @@
(include-css "/css/styles/github-gist.css")
(include-css config/app-css)
(include-js "/js/lib/highlight.pack.js")
(include-js config/app-js)))
(include-js config/app-js)
[:script {:type "text/javascript" :crossorigin "anonymous" :src "https://twemoji.maxcdn.com/v/latest/twemoji.min.js"}]))

(defn footer
"Render the footer"

0 comments on commit 4929864

Please sign in to comment.
You can’t perform that action at this time.