From 64585c63a3eb366ed7f24b401c5e69fe9c6a5348 Mon Sep 17 00:00:00 2001 From: "kujiu (@rincevent)" Date: Sun, 31 Jan 2021 16:09:15 +0100 Subject: [PATCH] Fix: isso comments --- CHANGES | 5 ++++ setup.py | 2 +- sphinx_nervproject_theme/__init__.py | 2 +- sphinx_nervproject_theme/layout.html | 35 +++++++++++++++++++++++++ sphinx_nervproject_theme/page.html | 39 ++-------------------------- 5 files changed, 44 insertions(+), 39 deletions(-) diff --git a/CHANGES b/CHANGES index a179894..5262e46 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,11 @@ Changes ======= +2.0.3 (*2021-01-31*) +==================== + +- Fix isso comments. + 2.0.2 (*2020-07-31*) ==================== diff --git a/setup.py b/setup.py index 4b84448..b147b93 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ with open("README.rst", "r") as fh: setup( name="sphinx_nervproject_theme", - version="2.0.2", + version="2.0.3", url="https://procrastinator.nerv-project.eu/nerv-project/sphinx_nervproject_theme", license="EUPL 1.2", author="Kujiu", diff --git a/sphinx_nervproject_theme/__init__.py b/sphinx_nervproject_theme/__init__.py index df22834..3e45ee7 100644 --- a/sphinx_nervproject_theme/__init__.py +++ b/sphinx_nervproject_theme/__init__.py @@ -5,7 +5,7 @@ from sphinx.environment.collectors import EnvironmentCollector from sphinx import addnodes from sphinx.util.osutil import relative_uri -__version__ = (2, 0, 2) +__version__ = (2, 0, 3) class SimpleTocTreeCollector(EnvironmentCollector): diff --git a/sphinx_nervproject_theme/layout.html b/sphinx_nervproject_theme/layout.html index ca0a92b..d80b6af 100644 --- a/sphinx_nervproject_theme/layout.html +++ b/sphinx_nervproject_theme/layout.html @@ -72,6 +72,9 @@ {%- include "util/linktags.html" %} {%- block extrahead %} {% endblock %} + {% if feed_path %} + + {% endif %} @@ -113,6 +116,38 @@ {%- endblock body_header %}
{% block body %} {% endblock %} + {% if builder=='html' %} +
+ {% if ablog and pagename in ablog %} + {% include "postnavy.html" %} + {% include "share.html" %} + {% else %} + {% if ablog and theme_share_all %} + {% include "share.html" %} + {% endif %} + {% endif %} + {% if ablog and ablog.disqus_shortname and ablog.blog_baseurl and + (not ablog[pagename].nocomments) and + ((pagename in ablog and (ablog[pagename].published or + ablog.disqus_drafts)) or + (not pagename in ablog and ablog.disqus_pages)) %} + {% include "util/disqus.html" %} + {% endif %} + {% if ablog and theme_isso and + (not ablog[pagename].nocomments) and + ((pagename in ablog and (ablog[pagename].published or + ablog.disqus_drafts)) or + (not pagename in ablog and ablog.disqus_pages)) %} +
+

{{ _("Comments") }}

+
+
+
+ {% endif %} +
+ {% endif %}
{%- endblock %} {%- include "util/pagenav.html" %} diff --git a/sphinx_nervproject_theme/page.html b/sphinx_nervproject_theme/page.html index e27d1f0..1faceb6 100644 --- a/sphinx_nervproject_theme/page.html +++ b/sphinx_nervproject_theme/page.html @@ -1,43 +1,8 @@ -{%- extends "layout.html" %} -{%- block extrahead %} +{% extends "!layout.html" %} +{% block extrahead %} {{ super() }} - {% if feed_path %} - - {% endif %} {% endblock %} {% block body %} {{ body }} - {% if builder=='html' %} -
- {% if ablog and pagename in ablog %} - {% include "postnavy.html" %} - {% include "share.html" %} - {% else %} - {% if ablog and theme_share_all %} - {% include "share.html" %} - {% endif %} - {% endif %} - {% if ablog and ablog.disqus_shortname and ablog.blog_baseurl and - (not ablog[pagename].nocomments) and - ((pagename in ablog and (ablog[pagename].published or - ablog.disqus_drafts)) or - (not pagename in ablog and ablog.disqus_pages)) %} - {% include "util/disqus.html" %} - {% endif %} - {% if ablog and theme_isso and - (not ablog[pagename].nocomments) and - ((pagename in ablog and (ablog[pagename].published or - ablog.disqus_drafts)) or - (not pagename in ablog and ablog.disqus_pages)) %} -
-

{{ _("Comments") }}

-
-
-
- {% endif %} -
- {% endif %} {% endblock %}