Поддержка аттрибутов в макросе b
parent
61ad931508
commit
217c11ad22
|
@ -1,8 +1,5 @@
|
|||
{% macro b(class=None, tag="div", id=None) -%}
|
||||
<{{ tag }}
|
||||
{%- if class is not none %} class="{{class}}" {%- endif -%}
|
||||
{%- if id is not none %} id="{{id}}" {%- endif -%}
|
||||
>
|
||||
{% macro b(tag="div", attributes=None) -%}
|
||||
<{{ tag }}{% if attributes %} {{attributes|safe}}{%endif%}{% for name, value in kwargs.items() %} {{name}}="{{value}}"{% endfor -%}>
|
||||
{%- if caller %}
|
||||
{{ caller() }}
|
||||
{% endif -%}
|
||||
|
|
Reference in New Issue