mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-17 02:10:45 +02:00
34 lines
1.2 KiB
HTML
34 lines
1.2 KiB
HTML
{% macro media(title, content, image, link) %}
|
|
<div class="media centered {% if link %}clickable{% endif %}"
|
|
{% if link %}style="cursor: pointer;"{% endif %}
|
|
{% if link %}onclick="location.href='{{ link }}'"{% endif %}>
|
|
<div class="media-left">
|
|
<a href="{{ link or "#" }}">
|
|
<img class="media-object"
|
|
src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}"
|
|
style="{% if image and not '/' in image %}opacity: 0.4{% endif %}">
|
|
</a>
|
|
</div>
|
|
<div class="media-body">
|
|
{% if title %}<h4 class="media-heading">{{ title }}</h4>{% endif %}
|
|
{{ content }}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro list(link, image, title, subtitle) %}
|
|
<div class="list list-unstyled">
|
|
<div class="list-item flex">
|
|
<div class="flex1">
|
|
<a class="flex1" href="{{ link or "#" }}"
|
|
<img class="thumbnail" src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}">
|
|
</a>
|
|
</div>
|
|
<div class="flex4">
|
|
{% if title %}<h3 class="h3">{{ title }}</h3>{% endif %}
|
|
{{ content }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|