39 lines
968 B
Twig
39 lines
968 B
Twig
{% set defaultPagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
|
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
|
|
|
|
<style>
|
|
.rulerItemHorizontal {
|
|
position: absolute;
|
|
top: -{{ pagePadding.0 }}mm;
|
|
width: 0;
|
|
height: 7px;
|
|
color: blue;
|
|
border-left: 1px solid blue
|
|
}
|
|
|
|
.rulerItemVertical {
|
|
position: absolute;
|
|
left: -{{ pagePadding.3 }}mm;
|
|
width: 7px;
|
|
height: 0;
|
|
color: blue;
|
|
border-top: 1px solid blue
|
|
}
|
|
</style>
|
|
|
|
{# horizontal #}
|
|
{% for rulerItemsHorizontal in range(10, 600, 10) %}
|
|
<div class="rulerItemHorizontal" style="left: {{ loop.index0 - pagePadding.3 }}mm">
|
|
{{ loop.index0 }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{# vertical #}
|
|
{% for rulerItemsVertical in range(0, 600, 10) %}
|
|
<div class="rulerItemVertical" style="top: {{ loop.index0 - pagePadding.0 }}mm">
|
|
{{ loop.index0 }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
|