{% extends "base.html" %} {% from "components/chat_dialog.html" import chat_dialog %} {% from "components/modal.html" import render_modal %} {% from "components/page_header.html" import page_header %} {% block title %}{{ _("Themes - Yaffo") }}{% endblock %} {% block extra_styles %} {% endblock %} {% block content %}
{% set header_actions %}
{% if selected_slug != default_slug %} {% endif %} {% if not selected_is_builtin %} {% endif %}
{% endset %} {% call page_header(selected_label, none, header_actions) %} {{ _("A built-in theme that ships with Yaffo. System themes cannot be deleted.") if selected_is_builtin else _("A custom theme stored in the application database.") }} {% endcall %} {# Built-in themes are hand-crafted (no AI builder), so the conversation panel is hidden for them. #} {% if not selected_is_builtin %}
{% if selected_has_draft %}

{{ _("The assistant has an unpublished design for this theme. Save it to make it live, or discard the draft.") }}

{% endif %} {{ chat_dialog( 'theme-chat', _('Conversation'), _('Describe how this theme should look and the assistant will design it.'), _('Describe how this theme should look…'), messages=selected_conversations, empty_text=(_('System themes are hand-crafted and have no conversation.') if selected_is_builtin else _('No conversation yet — describe the look you want and the assistant will build it.')), disabled=selected_is_builtin ) }}
{% endif %}
{% macro render_new_theme_form() %}

{{ _("Starts from the classic look — design it through a conversation later.") }}

{% endmacro %} {{ render_modal('newThemeModal', _('New Theme'), url_for('themes_create'), render_new_theme_form, _('Create')) }} {% if not selected_is_builtin %} {% macro render_rename_theme_form() %}

{{ _("Renaming updates the theme's web address (slug) to match.") }}

{% endmacro %} {{ render_modal('renameThemeModal', _('Rename Theme'), url_for('themes_rename', slug=selected_slug), render_rename_theme_form, _('Save')) }} {% endif %} {% endblock %} {% block scripts %} {% endblock %}