{# Iterates over the user's per-profile Overview layout, rendering one row at a time via per-key partials. `layout` comes from /portfolio/body. Hidden rows are omitted when edit_mode is off (no HTMX request for them). In edit mode (purely client-side via Alpine), hidden rows render as a placeholder users can click to restore. #} {% if oob_subline_html %}{{ oob_subline_html|safe }}{% endif %} {% set _row_templates = { "inbox": "_portfolio_row_inbox.html", "kpis": "_portfolio_row_kpis.html", "curves": "_portfolio_row_curves.html", "monthly_pl": "_portfolio_row_monthly_pl.html", "allocation": "_portfolio_row_allocation.html", "top_movers": "_portfolio_row_top_movers.html", } %}
{% set _visible_count = layout.rows | reject('in', layout.hidden) | list | length %} {% if _visible_count == 0 %}
All Overview rows are hidden. Click Edit layout in the toolbar to restore them.
{% endif %} {# Hidden rows are emitted as compact placeholders so Edit layout can surface them — clicking the eye on a placeholder reloads the page so the row's full content can be rendered server-side. Visible rows render content; clicking the eye there flips to a client-rendered placeholder and POSTs the new visibility without a reload. #} {% for key in layout.rows %} {% set _hidden = key in layout.hidden %}
{% if _hidden %}
{{ key|replace('_', ' ')|capitalize }} hidden · click the eye to restore
{% else %}
{% include _row_templates[key] %}
{% endif %}
{% endfor %}