Add a link to add comments
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
dbb5bfa521
commit
f12fff5aba
@ -1,4 +1,8 @@
|
|||||||
|
{% assign repos = site.repos | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
|
||||||
|
{% assign issue = page.issue | strip_newlines | strip_html | strip | normalize_whitespace | xml_escape | round %}
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
<!-- Template -->
|
||||||
<script type="text/html" id="template">
|
<script type="text/html" id="template">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
@ -13,20 +17,16 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
<h2>Comments</h2>
|
<h2>Comments</h2>
|
||||||
<div id="comments">
|
|
||||||
<noscript>
|
<!-- List of comments -->
|
||||||
<div class="alert alert-warning" role="alert">
|
<div id="comments"></div>
|
||||||
<span>Activate JavaScript to display comments</span>
|
|
||||||
</div>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
<!-- Script loading comments -->
|
<!-- Script loading comments -->
|
||||||
<script defer type="text/javascript">
|
<script defer type="text/javascript">
|
||||||
window.addEventListener("load", function () {
|
window.addEventListener("load", function () {
|
||||||
Github.getComments(
|
Github.getComments("{{ repos }}", "{{ issue }}",
|
||||||
"{{ site.repos | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}",
|
|
||||||
"{{ page.issue | strip_newlines | strip_html | strip | normalize_whitespace | xml_escape | round }}",
|
|
||||||
function (error, comments) {
|
function (error, comments) {
|
||||||
if (error) { throw new Error(error); }
|
if (error) { throw new Error(error); }
|
||||||
comments.forEach(function (comment) {
|
comments.forEach(function (comment) {
|
||||||
@ -35,4 +35,14 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
<span>Activate JavaScript to display comments</span>
|
||||||
</div>
|
</div>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<!-- Button -->
|
||||||
|
<a href="https://github.com/{{ repos }}/issues/{{ issue }}" class="btn btn-default btn-block" role="button">
|
||||||
|
<span>Add a comment</span>
|
||||||
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user