mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
30 lines
912 B
Plaintext
30 lines
912 B
Plaintext
---
|
|
import UIString from "../UIString";
|
|
---
|
|
|
|
<footer>
|
|
<h2><UIString key={"articlePost.comments"} /></h2>
|
|
<div id="comments"></div>
|
|
</footer>
|
|
|
|
<script>
|
|
const $commentsWrapper = document.getElementById("comments");
|
|
const $commentsScript = document.createElement("script");
|
|
|
|
$commentsScript.async = true;
|
|
$commentsScript.src = "https://utteranc.es/client.js";
|
|
$commentsScript.setAttribute("repo", "sergeyyarkov/comments");
|
|
$commentsScript.setAttribute("issue-term", "title");
|
|
$commentsScript.setAttribute("label", "Comment");
|
|
$commentsScript.setAttribute("id", "utterances");
|
|
$commentsScript.setAttribute("crossorigin", "anonymous");
|
|
|
|
if (window.theme) {
|
|
$commentsScript.setAttribute("theme", window.theme === "dark" ? "dark-blue" : "github-light");
|
|
} else {
|
|
$commentsScript.setAttribute("theme", "github-light");
|
|
}
|
|
|
|
if ($commentsWrapper) $commentsWrapper.appendChild($commentsScript);
|
|
</script>
|