<!doctype html>
<html lang="{{ language }}" data-language-prefix="{{ language_prefix }}"{% if html_theme_attribute %} {{ html_theme_attribute }}{% endif %}>
  {% render 'partials/head', page_title: page_title, pico_stylesheet_href: pico_stylesheet_href, alternate_links: alternate_links, language_prefix: language_prefix %}
  <body>
    <main>
      {% render 'partials/language-switcher', blog_languages: blog_languages, language: language %}
      <h1>{{ post.title }}</h1>
      {% render 'partials/menu', menu_items: menu_items, language: language, calendar_initial_year: calendar_initial_year, calendar_initial_month: calendar_initial_month %}
      {% if post_categories.size > 0 or post_tags.size > 0 %}
      <div class="single-post-taxonomy" aria-label="{{ 'render.taxonomy.ariaLabel' | i18n: language }}">
        {% for category in post_categories %}
        <a class="single-post-taxonomy-bubble single-post-taxonomy-bubble-category" href="{{ language_prefix }}/category/{{ category.slug | default: category | url_encode }}/">{{ category.name | default: category | escape }}</a>
        {% endfor %}
        {% for tag in post_tags %}
        {% assign tag_name = tag.name | default: tag %}
        {% assign tag_color = tag.color %}
        <a class="single-post-taxonomy-bubble single-post-taxonomy-bubble-tag" href="{{ language_prefix }}/tag/{{ tag.slug | default: tag_name | url_encode }}/"{% if tag_color %} style="--bubble-accent: {{ tag_color | escape }};"{% endif %}>{{ tag_name | escape }}</a>
        {% endfor %}
      </div>
      {% endif %}
      <article class="single-post" data-template="single-post" data-pagefind-body>
        <div class="post">{{ post.content | markdown: post.id, post_data_json_by_id, canonical_post_path_by_slug, canonical_media_path_by_source_path, language, language_prefix }}</div>
      </article>
      {% if backlinks.size > 0 %}
      <div class="single-post-backlinks" aria-label="{{ 'render.backlinks.ariaLabel' | i18n: language }}">
        <span class="single-post-backlinks-label">{{ 'render.backlinks.label' | i18n: language }}</span>
        {% for backlink in backlinks %}
        <a class="single-post-taxonomy-bubble single-post-backlink-bubble" href="{{ backlink.path }}">{{ backlink.display_slug }}</a>
        {% endfor %}
      </div>
      {% endif %}
    </main>
  </body>
</html>