{% extends "base.html" %} {% block title %}Dashboard - {{ site_name }}{% endblock %} {% block body_class %}dashboard-page{% endblock %} {% block header_nav %} {% endblock %} {% block sidebar %} {# Recursive navigation component - data comes from context #} {% endblock %} {% block content %}
{{ }} {{ }} {{ }} {{ }}
{% for notification in notifications %} {% %} {{ notification.title }}: {{ notification.message }} {% %} {% else %} {% %} No new notifications. {% %} {% endfor %}
{% %} {{ }} {% %} {% set btn_defaults = {"type": "button", "class": "shadow-sm"} %}
{{ }} {{ }} {{ }} {# Spread wins when it comes after explicit #} {% set special_btn = {"type": "submit", "class": "special-action", "icon": "star"} %} {{ }}
{% set label = "Quick Save" %} {% set variant = "success" %} {{ }}
{% set statuses = [ {"label": "Pending", "variant": "warning", "count": pending_count}, {"label": "Processing", "variant": "info", "count": processing_count}, {"label": "Shipped", "variant": "primary", "count": shipped_count}, {"label": "Delivered", "variant": "success", "count": delivered_count}, {"label": "Cancelled", "variant": "danger", "count": cancelled_count} ] %} {% for status in statuses %} {{ }} {% endfor %}
{% %}

This card contains another card inside it:

{% %}

Nested block components work!

{{ }} {{ }} {% %} Deeply nested alert inside inner card! {% %} {%
%} {%
%} {% endblock %} {% block footer %}

Dashboard rendered with Tera2 Components

© {{ current_year }} {{ site_name }} - All rights reserved

{% endblock %}