mirror of
https://github.com/welpo/tabi.git
synced 2026-04-26 09:57:20 +02:00
Merge branch 'main' into webmentions
This commit is contained in:
commit
0a7ce5358b
14 changed files with 89 additions and 8 deletions
|
|
@ -98,10 +98,10 @@
|
|||
{% if config.extra.full_content_in_feed %}
|
||||
<content type="html">{{ page.content }}</content>
|
||||
{% endif -%}
|
||||
{% if page.summary -%}
|
||||
<summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary>
|
||||
{% elif page.description -%}
|
||||
{% if page.description -%}
|
||||
<summary type="html">{{ page.description }}</summary>
|
||||
{% elif page.summary -%}
|
||||
<summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary>
|
||||
{% endif -%}
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ This variable will hold all the text strings for the language #}
|
|||
{% endblock main_content %}
|
||||
</div>
|
||||
{% include "partials/footer.html" %}
|
||||
|
||||
{# Users can optionally provide this template to add content to the body element. #}
|
||||
{% include "tabi/extend_body.html" ignore missing %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
{#- Check footer feed icon conditions -#}
|
||||
{%- macro should_show_footer_feed_icon() -%}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() -%}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%}
|
||||
{%- set feed_url = feed_utils::get_feed_url() -%}
|
||||
{{- generate_feed and config.extra.feed_icon and feed_url -}}
|
||||
{%- endmacro should_show_footer_feed_icon -%}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,10 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
|||
{%- set previous_visible = true -%}
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.hcard and config.extra.hcard.enable and ( not author_list or author_list is containing(config.author)) %}
|
||||
{% include "partials/hcard_small.html" %}
|
||||
{% endif %}
|
||||
|
||||
{%- set separator_with_class = "<span class='separator' aria-hidden='true'>" ~ separator ~ "</span>"-%}
|
||||
|
||||
{#- Date -#}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{#- Feed icon -#}
|
||||
{%- set feed_url = feed_utils::get_feed_url() -%}
|
||||
{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() -%}
|
||||
{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() == "true" -%}
|
||||
|
||||
{%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
{%- if hcard.avatar -%}
|
||||
<img
|
||||
class="u-photo"
|
||||
src="{{ get_url(path=hcard.avatar) }}"
|
||||
src="{{ get_url(path=hcard.avatar, cachebust=true) }}"
|
||||
width="200"
|
||||
height="200"
|
||||
alt="{{ full_name }}"
|
||||
|
|
|
|||
26
templates/partials/hcard_small.html
Normal file
26
templates/partials/hcard_small.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{%- set hcard = config.extra.hcard -%}
|
||||
|
||||
{%- set full_name = config.author -%}
|
||||
{%- if hcard.full_name -%}
|
||||
{%- set full_name = hcard.full_name -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- set homepage = config.base_url -%}
|
||||
{%- if hcard.homepage -%}
|
||||
{%- set homepage = hcard.homepage -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- set icon_attr = "" -%}
|
||||
{%- if hcard.avatar -%}
|
||||
{%- set icon_attr = "author-icon" -%}
|
||||
{%- endif -%}
|
||||
|
||||
<span class="hidden p-author h-card">
|
||||
<a rel="author" href="{{ homepage }}" class="u-url {{ icon_attr }}" title="{{ full_name }}">
|
||||
{%- if hcard.avatar -%}
|
||||
<img class="u-photo" src="{{ get_url(path=hcard.avatar, cachebust=true) }}" alt="{{ full_name }}" />
|
||||
{%- else -%}
|
||||
{{ full_name }}
|
||||
{%- endif -%}
|
||||
</a>
|
||||
</span>
|
||||
|
|
@ -177,4 +177,6 @@
|
|||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
{# Users can optionally provide this template to add content to the head element. #}
|
||||
{% include "tabi/extend_head.html" ignore missing %}
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{% block main_content %}
|
||||
|
||||
{#- Feed icon -#}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() -%}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%}
|
||||
{%- set feed_url = feed_utils::get_feed_url() -%}
|
||||
{%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%}
|
||||
{%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") -%}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{% block main_content %}
|
||||
|
||||
{#- Feed icon -#}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() -%}
|
||||
{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%}
|
||||
{%- set feed_url = feed_utils::get_feed_url() -%}
|
||||
{%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%}
|
||||
{%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") | length > 0 -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue