2018-10-16 05:28:42 +00:00
|
|
|
<% if (!has_config('comment.app_id') || !has_config('comment.app_key')) { %>
|
|
|
|
<div class="notification is-danger">
|
|
|
|
You forgot to set the <code>app_id</code> or <code>app_key</code> for Valine. Please set it in <code>_config.yml</code>.
|
|
|
|
</div>
|
2017-08-31 04:13:03 +00:00
|
|
|
<% } else { %>
|
2018-10-16 05:28:42 +00:00
|
|
|
<div id="valine-thread"></div>
|
|
|
|
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
|
|
|
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
|
|
|
|
<script>
|
|
|
|
new Valine({
|
|
|
|
el: '#valine-thread' ,
|
2018-10-19 04:53:09 +00:00
|
|
|
notify: <%= get_config('comment.notify') %>,
|
|
|
|
verify: <%= get_config('comment.verify') %>,
|
2018-10-16 05:28:42 +00:00
|
|
|
app_id: '<%= get_config('comment.app_id') %>',
|
|
|
|
app_key: '<%= get_config('comment.app_key') %>',
|
2018-10-19 04:53:09 +00:00
|
|
|
placeholder: '<%= get_config('comment.placeholder') %>'
|
2018-10-16 05:28:42 +00:00
|
|
|
});
|
|
|
|
</script>
|
2017-08-31 04:13:03 +00:00
|
|
|
<% } %>
|