mirror of https://github.com/realaravinth/gitpad
feat: display comments on gists
parent
dbc233c1ed
commit
5bdbdaf267
@ -1,27 +0,0 @@
|
||||
<div class="gist__comment-container">
|
||||
<form action="{{gist_comment_link}}" class="gist__comment-form" method="post" accept-charset="utf-8">
|
||||
<label class="form__label" for="comment" >
|
||||
<textarea
|
||||
required
|
||||
class="gist__comment-content"
|
||||
name="comment"
|
||||
id="comment"
|
||||
type="text"
|
||||
placeholder="Markdown supported"
|
||||
></textarea>
|
||||
</label>
|
||||
<div class="gist__button-group">
|
||||
<div class="gist__button-container">
|
||||
<button
|
||||
class="form__submit--secondary"
|
||||
name="add_file"
|
||||
value="true"
|
||||
type="submit"
|
||||
>Preview</button>
|
||||
</div>
|
||||
<div class="gist__button-container">
|
||||
<button class="form__submit" type="submit">Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,15 @@
|
||||
<div class="gist__comment-container">
|
||||
{% if "comments" in payload %}
|
||||
{% for comment in payload.comments %}
|
||||
{% set comment_id = "comment" ~ comment.id %}
|
||||
<div id="{{ comment_id }}" class="comment__container">
|
||||
<div class="comment__meta">
|
||||
<a href="/{{ comment.owner }}" class="comment__owner">~{{ comment.owner }}</a>
|
||||
<a href="{{ comment_id }}" class="comment__created">{{ comment.created }}</a>
|
||||
</div>
|
||||
<p class="comment__body">{{ comment.comment }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% include "gist_comment_input" %}
|
||||
</div>
|
@ -0,0 +1,28 @@
|
||||
<form action="{{gist_comment_link}}" class="gist__comment-form" method="post" accept-charset="utf-8">
|
||||
<label class="form__label" for="comment" >
|
||||
<textarea
|
||||
required
|
||||
class="gist__comment-content"
|
||||
name="comment"
|
||||
id="comment"
|
||||
type="text"
|
||||
placeholder="Markdown supported"
|
||||
{% if new_comment %}
|
||||
value="{{ new_comment }}"
|
||||
{% endif %}
|
||||
></textarea>
|
||||
</label>
|
||||
<div class="gist__button-group">
|
||||
<div class="gist__button-container">
|
||||
<button
|
||||
class="form__submit--secondary"
|
||||
name="add_file"
|
||||
value="true"
|
||||
type="submit"
|
||||
>Preview</button>
|
||||
</div>
|
||||
<div class="gist__button-container">
|
||||
<button class="form__submit" type="submit">Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in New Issue