brotherton-erpnext/erpnext/templates/includes/macros.html
2016-11-14 13:13:53 +05:30

20 lines
801 B
HTML

{% macro product_image_square(website_image, css_class="") %}
{% if website_image -%}
<meta itemprop="image" content="{{ frappe.utils.quoted(website_image) | abs_url }}"></meta>
{%- endif %}
<div class="product-image product-image-square
{% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
{% if website_image -%}
style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');"
{%- endif %}>
</div>
{% endmacro %}
{% macro product_image(website_image, css_class="") %}
<div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
{% if website_image -%}
<img itemprop="image" src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
{%- endif %}
</div>
{% endmacro %}