{% macro product_image_square(website_image, css_class="") %}
{% endmacro %} {% macro product_image(website_image, css_class="product-image", alt="") %}
{{ alt }}
{% endmacro %} {% macro media_image(website_image, name, css_class="") %} {% endmacro %} {% macro render_homepage_section(section) %} {% if section.section_based_on == 'Custom HTML' and section.section_html %} {{ section.section_html }} {% elif section.section_based_on == 'Cards' %}

{{ section.name }}

{% for card in section.section_cards %}
{% if card.image %}
{% endif %}
{{ card.title }}

{{ card.subtitle or '' }}

{{ card.content or '' | truncate(140, True) }}

{% endfor %}
{% endif %} {% endmacro %} {%- macro item_card(title, image, url, description, rate, category, is_featured=False, is_full_width=False, align="Left") -%} {%- set align_items_class = resolve_class({ 'align-items-end': align == 'Right', 'align-items-center': align == 'Center', 'align-items-start': align == 'Left', }) -%} {%- set col_size = 3 if is_full_width else 4 -%} {% if is_featured %}
{% else %}
{% if image %}
{{ title }}
{% else %}
{{ frappe.utils.get_abbr(title) }}
{% endif %} {{ item_card_body(title, description, url, rate, category, is_featured, align) }}
{% endif %} {%- endmacro -%} {%- macro item_card_body(title, description, url, rate, category, is_featured, align) -%} {%- set align_class = resolve_class({ 'text-right': align == 'Right', 'text-center': align == 'Center' and not is_featured, 'text-left': align == 'Left' or is_featured, }) -%}
{{ title or '' }}
{% if is_featured %}
{{ rate or '' }}
{{ description or '' }}
{% else %}
{{ category or '' }}
{{ rate or '' }}
{% endif %}
{%- endmacro -%}