mirror of
https://github.com/welpo/tabi.git
synced 2025-10-10 23:38:53 +02:00
Link webmentions in quick button + load webmentions after comments
This commit is contained in:
parent
0c2e0f36c4
commit
7fb563464a
2 changed files with 15 additions and 8 deletions
|
@ -322,11 +322,6 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
|||
{% set enabled_systems = 0 %}
|
||||
{% set comment_system = "" %}
|
||||
|
||||
{# Webmentions #}
|
||||
{%- if config.extra.webmentions.enable -%}
|
||||
{%- include "partials/webmentions.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% for system in systems %}
|
||||
{% set global_enabled = config.extra[system].enabled_for_all_posts | default(value=false) %}
|
||||
{% set page_enabled = page.extra[system] | default(value=global_enabled) %}
|
||||
|
@ -345,6 +340,11 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
|||
{% include "partials/comments.html" %}
|
||||
{% endif %}
|
||||
|
||||
{# Webmentions #}
|
||||
{%- if config.extra.webmentions.enable -%}
|
||||
{%- include "partials/webmentions.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
</article>
|
||||
</main>
|
||||
|
||||
|
|
|
@ -21,9 +21,16 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Button to go to the comment section #}
|
||||
{% if comment_system %}
|
||||
<a href="#comments" id="comments-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_comments", default="Go to comments section", language_strings=language_strings) }}">
|
||||
{# Button to go to the comment/webmentions section #}
|
||||
{% if comment_system or config.extra.webmentions.enable %}
|
||||
{%- if comment_system -%}
|
||||
{#- Comments are shown above webmentions -#}
|
||||
{%- set comments_id = "comments" -%}
|
||||
{%- else -%}
|
||||
{%- set comments_id = "webmentions" -%}
|
||||
{%- endif -%}
|
||||
|
||||
<a href="#{{- comments_id -}}" id="comments-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_comments", default="Go to comments section", language_strings=language_strings) }}">
|
||||
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue