Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (51 sloc) 2.61 KB
<div class="panel panel-primary">
<div class="panel-heading">
{{ site.data.localization.leave_comment[page.lang] }}
</div>
<div class="panel-body">
<form method="POST" action="https://api.staticman.net/v2/entry/masterandrey/masterandrey.com/master/comments">
<input name="options[redirect]" type="hidden" value="https://masterandrey.com/{{page.lang}}/comment_post.html">
<!-- e.g. "2016-01-02-this-is-a-post" -->
<input name="options[slug]" type="hidden" value="{{ page.slug }}">
<input name="fields[lang]" type="hidden" value="{{ page.lang }}">
<input name="fields[email]" type="hidden" value="filbert@ya.kz">
<div class="form-group">
<label for="name">{{ site.data.localization.name[page.lang] }}</label>
<input id="name" name="fields[name]" type="text" class="form-control">
</div>
<div class="form-group">
<label for="message">{{ site.data.localization.message[page.lang] }}</label>
<textarea id="message" name="fields[message]" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-default">{{ site.data.localization.post_button[page.lang] }}</button>
</form>
</div>
</div>
<div class="panel-group">
<div class="panel panel-default">
{% assign no_comments = true %}
<div class="panel-heading">{{ site.data.localization.comments[page.lang] }}</div>
<div class="panel-body">
{% if site.data.comments and site.data.comments[page.slug] %}
{% assign comments = site.data.comments[page.slug] | sort %}
{% for comment in comments %}
{% assign entry = comment[1] %}
{% if entry.lang == page.lang %}
<div class="panel panel-info">
{% assign no_comments = false %}
<div class="panel-heading">
{{ entry.date | date: "%Y.%m.%d %H:%M" }} <b>{{ entry.name }}</b>
</div>
<div class="panel-body">
{{ entry.message | markdownify }}
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% if no_comments %}
{{ site.data.localization.no_comments[page.lang] }}
{% endif %}
</div>
</div>
</div>