{% load i18n %}{% comment %} Preview Panel - platform-specific post previews. Context: previews (list of dicts with account, title, caption, first_comment, char_count, char_limit, is_over_limit, truncated_caption, needs_title), media_items, workspace. {% endcomment %} {% if previews %} {% for p in previews %}
{% if p.account.platform != "youtube" %}{% include "partials/_platform_icon.html" with platform=p.account.platform size="sm" %}{% endif %} {% if p.account.platform == "youtube" %}YouTube{% else %}{{ p.account.platform|title }}{% endif %} {% translate "Preview" %} {{ p.char_count }}/{{ p.char_limit }}
{% if p.account.platform == "youtube" %}
{% if media_items %} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% else %}
{% translate "Video thumbnail" %}
{% endif %}
{% if p.title %}{{ p.title|truncatechars:100 }}{% elif p.caption %}{{ p.caption|truncatechars:100 }}{% else %}{% translate "Video title…" %}{% endif %}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }}
{% translate "Publishing preview" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:200 }}
{% endif %}
{% elif p.account.platform == "instagram" or p.account.platform == "instagram_login" %} {# ─── Instagram ─── square media, account header, action icons #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %} {{ p.account.account_name|default:p.account.account_handle }}
{% if media_items %} {% if media_items|length > 1 %} {# ─── Carousel ─── #}
{% for m in media_items %}
{% if m.is_video %} {% else %} {% endif %}
{% endfor %}
{% for m in media_items %} {% endfor %}
{% else %} {# ─── Single media ─── #} {% with m=media_items.0 %}
{% if m.is_video %} {% else %} {% endif %}
{% endwith %} {% endif %} {% else %}
{% endif %}
{% if p.caption %}
{{ p.account.account_name|default:p.account.account_handle }} {{ p.truncated_caption|truncatechars:150 }}
{% else %}
{% translate "Write a caption…" %}
{% endif %} {% if p.first_comment %}
{% translate "View all comments" %}
{% endif %}
{% translate "Just now" %}
{% elif p.account.platform == "facebook" %} {# ─── Facebook ─── classic FB post card #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }}
{% translate "Just now ·" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:250 }}
{% endif %} {% if media_items %} {% if media_items|length > 1 %} {# ─── Carousel ─── #}
{% for m in media_items %}
{% if m.is_video %}
{% else %} {% endif %}
{% endfor %}
{% for m in media_items %} {% endfor %}
{% else %} {# ─── Single media ─── #} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% endif %} {% endif %}
{% translate "Like" %} {% translate "Comment" %} {% translate "Share" %}
{% elif p.account.platform == "linkedin_personal" or p.account.platform == "linkedin_company" %} {# ─── LinkedIn ─── professional feed card #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }}
{{ p.account.account_handle|default:"Company page" }}
{% translate "Just now ·" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:200 }}
{% endif %} {% if media_items %} {% if media_items|length > 1 %} {# ─── Carousel ─── #}
{% for m in media_items %}
{% if m.is_video %}
{% else %} {% endif %}
{% endfor %}
{% for m in media_items %} {% endfor %}
{% else %} {# ─── Single media ─── #} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% endif %} {% endif %}
{% translate "Like" %} {% translate "Comment" %} {% translate "Repost" %} {% translate "Send" %}
{% elif p.account.platform == "tiktok" %} {# ─── TikTok ─── vertical phone-style preview #}
{% if media_items %} {% with m=media_items.0 %} {% if m.is_video %} {% else %} {% endif %} {% endwith %} {% else %}
{% translate "Upload a video" %}
{% endif %}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
0
0
0
@{{ p.account.account_name|default:p.account.account_handle }}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:100 }}
{% endif %}
{% translate "Original sound -" %} {{ p.account.account_name|default:p.account.account_handle }}
{% elif p.account.platform == "threads" %} {# ─── Threads ─── minimal text-first layout #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }} {% translate "just now" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:200 }}
{% else %}
{% translate "Start a thread…" %}
{% endif %} {% if media_items %} {% if media_items|length > 1 %} {# ─── Carousel ─── #}
{% for m in media_items %}
{% if m.is_video %}
{% else %} {% endif %}
{% endfor %}
{% for m in media_items %} {% endfor %}
{% else %} {# ─── Single media ─── #} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% endif %} {% endif %}
{% elif p.account.platform == "bluesky" %} {# ─── Bluesky ─── tweet-like minimal card #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }} {{ p.account.account_handle|default:"@handle" }} {% translate "now" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:200 }}
{% else %}
{% translate "What's up?" %}
{% endif %} {% if media_items %} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% endif %}
{% elif p.account.platform == "pinterest" %} {# ─── Pinterest ─── pin card with rounded corners #}
{% if media_items %} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% else %}
{% endif %}
{% if p.title %}
{{ p.title|truncatechars:100 }}
{% endif %} {% if p.caption %}
{{ p.truncated_caption|truncatechars:150 }}
{% endif %}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %} {{ p.account.account_name|default:p.account.account_handle }}
{% else %} {# ─── Generic fallback (mastodon, google_business, etc.) #}
{% if p.account.avatar_url %} {% else %}
{{ p.account.account_name|default:p.account.account_handle|make_list|first|upper }}
{% endif %}
{{ p.account.account_name|default:p.account.account_handle }}
{% if p.account.account_handle %}
{{ p.account.account_handle }}
{% endif %}
{% translate "Just now" %}
{% if p.caption %}
{{ p.truncated_caption|truncatechars:200 }}
{% else %}
{% translate "No caption yet…" %}
{% endif %} {% if media_items %} {% with m=media_items.0 %}
{% if m.is_video %}
{% else %} {% endif %}
{% endwith %} {% endif %}
{% endif %} {% if p.is_over_limit %}
{% translate "Caption exceeds" %} {{ p.char_limit }} {% translate "character limit" %}
{% endif %}
{% endfor %} {% else %}

{% translate "No preview yet" %}

{% translate "Select a platform and start writing to see how your post will look" %}

{% endif %}