{# Main panel fragment for HTMX navigation - post article content #}
  <article class="relative">
    {# ❤️ like button - always visible in top right of article #}
    {% if g.user %}
    <div class="absolute top-2 right-2 z-10 text-8xl md:text-6xl">
      {% set slug = post.slug %}
      {% set liked = post.is_liked or False %}
      {% set like_url = url_for('blog.post.like_toggle', slug=slug)|host %}
      {% set item_type = 'post' %}
      {% include "_types/browse/like/button.html" %}
    </div>
    {% endif %}

    {# Draft indicator + edit link #}
    {% if post.status == "draft" %}
      <div class="flex items-center justify-center gap-2 mb-3">
        <span class="inline-block px-3 py-1 rounded-full text-sm font-semibold bg-amber-100 text-amber-800">Draft</span>
        {% if post.publish_requested %}
          <span class="inline-block px-3 py-1 rounded-full text-sm font-semibold bg-blue-100 text-blue-800">Publish requested</span>
        {% endif %}
        {% set is_admin = (g.get("rights") or {}).get("admin") %}
        {% if is_admin or (g.user and post.user_id == g.user.id) %}
          {% set edit_href = url_for('blog.post.admin.edit', slug=post.slug)|host %}
          <a
            href="{{ edit_href }}"
            hx-get="{{ edit_href }}"
            hx-target="#main-panel"
            hx-select="{{hx_select_search}}"
            hx-swap="outerHTML"
            hx-push-url="true"
            class="inline-block px-3 py-1 rounded-full text-sm font-semibold bg-stone-700 text-white hover:bg-stone-800 transition-colors"
          >
            <i class="fa fa-pencil mr-1"></i> Edit
          </a>
        {% endif %}
      </div>
    {% endif %}

    {% if post.custom_excerpt %}
      <div class="w-full text-center italic text-3xl p-2">
        {{post.custom_excerpt|safe}}
      </div>
    {% endif %}
    <div class="hidden md:block">
      {% include '_types/blog/_card/at_bar.html' %}
    </div>
    {% if post.feature_image %}
      <div class="mb-3 flex justify-center">
        <img
          src="{{ post.feature_image }}"
          alt=""
          class="rounded-lg w-full md:w-3/4 object-cover"
        >
      </div>
    {% endif %}
    <div class="blog-content p-2">
      {% if post.html %}
        {{post.html|safe}}
      {% endif %}
    </div>
  </article>
  <div class="pb-8"></div>
