Skip blog chrome (like, tags, authors, excerpt) for pages

Pages are container/landing pages, not blog posts. Hide the like
button, tags/authors bar, and excerpt when post.is_page is true.
Feature image and content still render for both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-21 22:10:34 +00:00
parent 9db739e56d
commit 1832c53980

View File

@@ -1,17 +1,6 @@
{# Main panel fragment for HTMX navigation - post article content #}
{# Main panel fragment for HTMX navigation - post/page 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 #}
{# Draft indicator + edit link (shown for both posts and pages) #}
{% 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>
@@ -36,6 +25,18 @@
</div>
{% endif %}
{% if not post.is_page %}
{# ── Blog post chrome: like button, excerpt, tags/authors ── #}
{% 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 %}
{% if post.custom_excerpt %}
<div class="w-full text-center italic text-3xl p-2">
{{post.custom_excerpt|safe}}
@@ -44,6 +45,8 @@
<div class="hidden md:block">
{% include '_types/blog/_card/at_bar.html' %}
</div>
{% endif %}
{% if post.feature_image %}
<div class="mb-3 flex justify-center">
<img