commit 775fc528bb1ebd870cf76585fbf5bf88cde8310c parent 733d071cc6ddd25db27d3836c9a7499384d7dd62 Author: Yohanes Bandung Bondowoso <hi@ybbond.id> Date: Thu, 20 May 2021 00:07:06 +0700 refactor: remove remarkbox Diffstat:
| M | layouts/_default/single.html | | | 8 | ++------ |
| D | layouts/partials/post/remarkbox.html | | | 48 | ------------------------------------------------ |
2 files changed, 2 insertions(+), 54 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -1,16 +1,13 @@ {{ define "main" }} - {{ .Scratch.Set "scope" "single" }} {{ if eq .Type "notes" }} - <article> + <article class="single__micro"> {{- partial "post/notes-item.html" . -}} {{ partial "post/webmentions-handler.html" . }} - {{ partial "post/remarkbox.html" . }} </article> {{ else if eq .Type "responses" }} - <article> + <article class="single__micro"> {{- partial "post/responses-item.html" . -}} {{ partial "post/webmentions-handler.html" . }} - {{ partial "post/remarkbox.html" . }} </article> {{ else }} <article class="content h-entry"> @@ -58,7 +55,6 @@ {{- if ne .Type "page" }} {{ partial "post/webmentions-handler.html" . }} - {{ partial "post/remarkbox.html" . }} {{- else }} <br> <br> diff --git a/layouts/partials/post/remarkbox.html b/layouts/partials/post/remarkbox.html @@ -1,48 +0,0 @@ -<!-- Remarkbox - Your readers want to communicate with you --> -<div class="footnotes" role="doc-endnotes"> -<hr /> -<h3 class="footnotes__text">Comments:</h3> -<div id="remarkbox-div"> - <noscript> - <iframe id=remarkbox-iframe src="https://my.remarkbox.com/embed?nojs=true" style="height:600px;width:100%;border:none!important" tabindex=0></iframe> - </noscript> -</div> -<script src="https://my.remarkbox.com/static/js/iframe-resizer/iframeResizer.min.js"></script> -<script> - const rb_owner_key = "372c6a71-6844-11eb-8f74-040140774501"; - let thread_uri = window.location.href; - if (thread_uri.startsWith('http://localhost:1313')) { - thread_uri = 'https://ybbond.id' + thread_uri.substring(21); - } - const thread_title = window.document.title; - const thread_fragment = window.location.hash; - - // rb owner was here. - const rb_src = "https://my.remarkbox.com/embed" + - "?rb_owner_key=" + rb_owner_key + - "&thread_title=" + encodeURI(thread_title) + - "&thread_uri=" + encodeURIComponent(thread_uri) + - thread_fragment; - - function create_remarkbox_iframe() { - var ifrm = document.createElement("iframe"); - ifrm.setAttribute("id", "remarkbox-iframe"); - ifrm.setAttribute("scrolling", "no"); - ifrm.setAttribute("src", rb_src); - ifrm.setAttribute("frameborder", "0"); - ifrm.setAttribute("tabindex", "0"); - ifrm.setAttribute("title", "Remarkbox"); - ifrm.style.width = "100%"; - document.getElementById("remarkbox-div").appendChild(ifrm); - } - create_remarkbox_iframe(); - iFrameResize( - { - checkOrigin: ["https://my.remarkbox.com"], - inPageLinks: true, - initCallback: function(e) {e.iFrameResizer.moveToAnchor(thread_fragment)} - }, - document.getElementById("remarkbox-iframe") - ); -</script> -</div>