{#  -*- coding: utf-8 -*- #}
{% macro comment_form(url, title, identifier) %}
    {% if comment_system_id %}
        <div data-title="{{ title|e }}" id="isso-thread"></div>
        <script src="{{ comment_system_id }}js/embed.min.js" data-isso="{{ comment_system_id }}" data-isso-lang="{{ lang }}"
        {% if isso_config %}
        {% for k, v in isso_config.items() %}
        data-isso-{{ k }}="{{ v }}"
        {% endfor %}
        {% endif %}
        ></script>
    {% endif %}
{% endmacro %}

{% macro comment_link(link, identifier) %}
    {% if comment_system_id %}
        <a href="{{ link }}#isso-thread">{{ messages("Comments") }}</a>
    {% endif %}
{% endmacro %}


{% macro comment_link_script() %}
    {% if comment_system_id and 'index' in pagekind %}
        <script src="{{ comment_system_id }}js/count.min.js" data-isso="{{ comment_system_id }}" data-isso-lang="{{ lang }}"></script>
    {% endif %}
{% endmacro %}
