This commit is contained in:
Kujiu 2020-05-25 13:15:27 +02:00
parent 41c0928194
commit c150b2babd
Signed by: kujiu
GPG Key ID: ABBB2CAC6855599F
3 changed files with 25 additions and 26 deletions

View File

@ -12,8 +12,26 @@
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1)}}">
<link rel="stylesheet" href="{{ pathto('_static/theme.css', 1)}}">
<link rel="stylesheet" href="{{ pathto('_static/sphinx_nervproject_theme.css', 1)}}">
{% if theme_isso %}
<link rel="stylesheet" href="{{ pathto('_static/isso.css', 1)}}">
<script data-isso="{{ theme_isso['prefix'] }}"
data-isso-id="{{ pagename }}"
data-isso-css="false"
data-isso-lang="{{ theme_isso['lang'] }}"
data-isso-reply-to-self="{{ theme_isso['reply_to_self'] }}"
data-isso-require-author="{{ theme_isso['require_author'] }}"
data-isso-require-email="{{ theme_isso['require_email'] }}"
data-isso-reply-notifications="{{ theme_isso['reply_notif'] }}"
data-isso-max-comments-top="{{ theme_isso['max_comments_top'] }}"
data-isso-max-comments-nested="{{ theme_isso['max_comments_nested'] }}"
data-isso-reveal-on-click="{{ theme_isso['reveal_on_click'] }}"
data-isso-avatar="{{ theme_isso['avatar'] }}"
data-isso-vote="{{ theme_isso['vote'] }}"
data-isso-vote-levels="{{ theme_isso['vote_levels'] }}"
data-isso-feed="{{ theme_isso['feed'] }}"
src="{{ theme_isso['url'] }}/js/embed.min.js"></script>
<style id="isso-style"></style>
{% endif %}
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />

View File

@ -35,7 +35,13 @@
((pagename in ablog and (ablog[pagename].published or
ablog.disqus_drafts)) or
(not pagename in ablog and ablog.disqus_pages)) %}
{% include "util/isso.html" %}
<section class="comments" id="comments">
<h2 class="panel">{{ _("Comments") }}</h2>
<section id="isso-thread"
data-isso-id="{{ pagename }}"
data-title="{{ title }}"
></section>
</section>
{% endif %}
</div>
{% endblock %}

View File

@ -1,25 +0,0 @@
{% if theme_isso %}
<script data-isso="{{ theme_isso['prefix'] }}"
data-isso-id="{{ pagename }}"
data-isso-css="false"
data-isso-lang="{{ theme_isso['lang'] }}"
data-isso-reply-to-self="{{ theme_isso['reply_to_self'] }}"
data-isso-require-author="{{ theme_isso['require_author'] }}"
data-isso-require-email="{{ theme_isso['require_email'] }}"
data-isso-reply-notifications="{{ theme_isso['reply_notif'] }}"
data-isso-max-comments-top="{{ theme_isso['max_comments_top'] }}"
data-isso-max-comments-nested="{{ theme_isso['max_comments_nested'] }}"
data-isso-reveal-on-click="{{ theme_isso['reveal_on_click'] }}"
data-isso-avatar="{{ theme_isso['avatar'] }}"
data-isso-vote="{{ theme_isso['vote'] }}"
data-isso-vote-levels="{{ theme_isso['vote_levels'] }}"
data-isso-feed="{{ theme_isso['feed'] }}"
src="{{ theme_isso['url'] }}/js/embed.min.js"></script>
<section class="comments" id="comments">
<h2 class="panel">{{ _("Comments") }}</h2>
<section id="isso-thread"
data-isso-id="{{ pagename }}"
data-title="{{ title }}"
></section>
</section>
{% endif %}