{% extends 'public/base.html' %} {% block title %}{{ page.meta_title or page.title }} - {{ site_name }}{% endblock %} {% block meta_description %}{{ page.meta_description or page.excerpt or '' }}{% endblock %} {% block meta_tags %} {%- set _og_img_obj = images_map.get(page.og_image or page.featured_image) if images_map is defined else None %} {%- if page.og_image or page.featured_image %} {%- if _og_img_obj %} {%- set _og_meta = _og_img_obj.get_og_meta() %} {%- else %} {%- endif %} {%- elif site_og_meta %} {%- endif %} {%- if page.twitter_image %} {%- set _tw_img_obj = images_map.get(page.twitter_image) if images_map is defined else None %} {%- if _tw_img_obj %} {%- else %} {%- endif %} {%- elif _og_img_obj %} {%- elif page.featured_image %} {%- elif settings.get('twitter_image') or settings.get('og_image') %} {%- endif %} {% if page.meta_keywords %} {% endif %} {% if page.schema_author %} {% elif page.author %} {% endif %} {% endblock %} {% block canonical %}{% endblock %} {% block hreflang %} {%- if all_versions is defined %} {%- for version in all_versions %} {%- if is_homepage is defined and is_homepage %} {%- if version.language == (default_language or 'en') %} {%- else %} {%- endif %} {%- else %} {%- endif %} {%- endfor %} {%- if is_homepage is defined and is_homepage %} {%- else %} {%- endif %} {%- endif %} {% endblock %} {% block schema %} {% endblock %} {% block content %}

{{ page.title }}

{% if (page.show_date is not defined or page.show_date) or (page.show_author is not defined or page.show_author) %}
{% if page.show_date is not defined or page.show_date %} {% if page.published_at %} {% endif %} {% endif %} {% if page.show_author is not defined or page.show_author %} {% if page.schema_author %} · {{ page.schema_author }} {% elif page.author %} · {{ page.author.get_display_name() }} {% endif %} {% endif %}
{% endif %}
{% if page.featured_image %} {% endif %} {# ================================================================ PAGE CONTENT — Two rendering modes: 1. Page Builder (JSON blocks) — if use_builder is true 2. Legacy HTML content — original editor ================================================================ #}
{% if page.use_builder and page.blocks %} {# Builder: own block styles, no .ap-prose wrapper needed (text blocks already wrap their content in .ap-prose) #} {{ page.blocks | render_blocks(page.template) | safe }} {% else %} {# Legacy: render raw HTML content (TinyMCE / markdown) #}
{{ page.content | safe }}
{% endif %} {% if page.get_faq_list() %}

{{ pt('faq_heading') }}

{% for faq in page.get_faq_list() %}
{{ faq.question }}
{{ faq.answer }}
{% endfor %}
{% endif %}
{% if page.tags and page.get_tags_list() %}
{% for tag in page.get_tags_list() %} {{ tag }} {% endfor %}
{% endif %}
{# ================================================================ POSTS PAGE — when the page is flagged "Show latest posts", a paginated grid of published posts in the page's language follows the page's own content. Same card markup as the homepage listing. Pagination stays on this page's own slug (?page=N), so hreflang, the language switcher, and translation groups keep working: each language version of this page lists posts in its own language. ================================================================ #} {% if posts is defined and posts %} {% if posts_schema %} {% endif %} {% if posts.items %}
{% for post in posts.items %}
{% if post.featured_image %} {% set card_img = images_map.get(post.featured_image) if images_map is defined else None %} {# The whole image is a link to the post. aria-hidden + tabindex=-1 keep it out of the tab order and the accessibility tree: the title link right below goes to the same URL, so assistive tech announces one link per card instead of two identical ones. Google still follows the href and uses the img alt as its anchor text. #}
{% endif %}

{{ post.title }}

{% if post.excerpt %}

{{ post.excerpt }}

{% endif %}
{% endfor %}
{% if posts.pages > 1 %} {# Each language version of a posts page has its own slug, so pagination links never need a lang parameter — /en-blog?page=2, /de-blog?page=2. EXCEPTION: when this posts page is the static homepage, its slug 301s to /, so pagination must go through index() with the same lang logic as the built-in homepage listing (lang omitted for default language). #} {%- if is_homepage is defined and is_homepage %} {%- if current_language and current_language != (default_language or 'en') %} {%- set _pag_lang = current_language %} {%- else %} {%- set _pag_lang = none %} {%- endif %} {%- macro _pag_url(num) %}{{ url_for('index', page=(num if num > 1 else none), lang=_pag_lang) }}{% endmacro %} {%- else %} {%- macro _pag_url(num) %}{{ url_for('view_content', slug=page.slug, page=(num if num > 1 else none)) }}{% endmacro %} {%- endif %} {% endif %} {% else %}

{{ pt('no_posts') }}

{{ pt('check_back') }}

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