hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit d6104bdcabd2c5184d3919cfb43bb585221118d0
parent 0612537cc27b15c39dfd30d106a1da34403889b3
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sun, 12 Mar 2017 16:33:56 -0400

Add a scrip to load the bridgy webmention

Diffstat:
Mtemplates/mustache/note.mustache | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/templates/mustache/note.mustache b/templates/mustache/note.mustache @@ -52,10 +52,23 @@ $if(modified)$et modifié le <time class="dt-updated">$modified$</time>$endif$. <br/>&crarr; <a href="{{ SITE_URL }}/note">Retourner aux notes</a>. </footer> + + <aside> + <script id="webmention-hosted"> + (function () { + var sn = document.createElement("script"), s = document.getElementsByTagName("script")[0], url; + url = document.querySelectorAll ? document.querySelectorAll("link[rel~=canonical]") : false; + url = url && url[0] ? url[0].href : false; + sn.type = "text/javascript"; sn.async = true; + sn.src = "//webmention.herokuapp.com/api/embed?url=" + encodeURIComponent(url || window.location); + s.parentNode.insertBefore(sn, s); + }()); + </script> + </aside> </div> $if(bridgy)$ <a class="visuallyhidden" href="https://brid.gy/publish/twitter"></a> - $endif$ + $endif$ </article> </main>