gwoe-antragspruefer/app/templates/v2/components/kasten.html

31 lines
899 B
HTML
Raw Normal View History

{#
kasten.html — ECOnGOOD-Kasten (4 Varianten, Manual Seite 13)
Props:
variant : "solid-green" | "solid-blue" | "outline-green" | "outline-blue"
title : Optionaler Kasten-Titel (h4, Avenir Black, color:inherit)
body : Fließtext oder HTML-String
caller : Optionaler Jinja2-Caller-Block für komplexen Body-Inhalt
Verwendung:
{% from "v2/components/kasten.html" import kasten %}
{{ kasten("solid-green", "Hinweis", "Body-Text.") }}
Mit Caller-Block:
{% call kasten("outline-blue", "Titel") %}
<p>Komplexer Inhalt mit <strong>Markup</strong>.</p>
{% endcall %}
#}
{% macro kasten(variant="outline-green", title="", body="") %}
<div class="v2-kasten {{ variant }}">
{% if title %}
<h4>{{ title }}</h4>
{% endif %}
{% if body %}
<p>{{ body }}</p>
{% endif %}
{{ caller() if caller is defined else "" }}
</div>
{% endmacro %}