-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: columns in dynamic containers (#209)
- Loading branch information
Showing
7 changed files
with
371 additions
and
151 deletions.
There are no files selected for viewing
15 changes: 13 additions & 2 deletions
15
print_designer/print_designer/page/print_designer/jinja/macros/relative_containers.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
{% from 'print_designer/page/print_designer/jinja/macros/render_element.html' import render_element with context %} | ||
|
||
{% macro relative_containers(element, send_to_jinja) -%} | ||
<div style="position:relative; left:{{ element.startX }}px; {%- if not element.isDynamicHeight -%} height:{{ element.height }}px; {%- endif -%} {{convert_css(element.style)}} border: none !important;" | ||
{% macro relative_columns(element, send_to_jinja) -%} | ||
<div style="position:relative; top: 0px; width:{{ element.width }}px; {%- if not element.isDynamicHeight -%} height:{{ element.height }}px; {%- endif -%} {{convert_css(element.style)}}" | ||
class="rectangle {{ element.classes | join(' ') }}"> | ||
{% if element.childrens %} | ||
{% for object in element.childrens %} | ||
{{ render_element(object, send_to_jinja, element.get("isDynamicHeight", false)) }} | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
{%- endmacro %} | ||
|
||
{% macro relative_containers(element, send_to_jinja) -%} | ||
<div style="position:relative; left:{{ element.startX }}px; {%- if not element.isDynamicHeight -%} height:{{ element.height }}px; {%- endif -%} {{convert_css(element.style)}}" | ||
class="rectangle relative-row {{ element.classes | join(' ') }}"> | ||
{% if element.childrens %} | ||
{% for object in element.childrens %} | ||
{{ relative_columns(object, send_to_jinja) }} | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.