Add margin callouts for report template base

This commit is contained in:
Oliver Walters 2021-02-04 14:49:11 +11:00
parent cf0c43d899
commit ddbf2a6313

View File

@ -3,29 +3,76 @@
<head> <head>
<style> <style>
@page { @page {
{% block page_style %} size: A4;
size: {% if page_size %}{{ page_size }}{% else %}A4{% endif %}; margin: 2cm;
margin: {% if page_margin %}{{ page_margin }}{% else %}10mm{% endif %}; margin-top: 4cm;
font-family: Arial, Helvetica, sans-serif;
font-size: 75%;
@top-left {
{% block top_left %}
{% endblock %} {% endblock %}
} }
#page-number:after { @top-center {
counter-increment: page; {% block top_center %}
content: counter(page); {% endblock %}
} }
#page-count:after { @top-right {
counter-increment: page; {% block top_right %}
content: counter(pages); {% endblock %}
}
@bottom-left {
{% block bottom_left %}
{% endblock %}
}
@bottom-center {
{% block bottom_center %}
{% endblock %}
}
@bottom-right {
{% block bottom_right %}
content: "Page " counter(page) " of " counter(pages);
{% endblock %}
}
} }
body { body {
{% block body_style %}
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
}
.header {
top: 0px;
left: 0px;
position: fixed;
width: 100%;
margin-top: -2.5cm;
}
.content {
{% block content_style %}
width: 100%;
page-break-inside: auto;
position: relative;
{% endblock %}
}
.footer {
{% block footer_style %}
bottom: 0px;
left: 0px;
position: fixed;
width: 100%;
margin-bottom: -20mm;
{% endblock %} {% endblock %}
} }
{% block style %} {% block style %}
/* User defined styles go here */
{% endblock %} {% endblock %}
</style> </style>
@ -33,17 +80,17 @@
<body> <body>
<div class='page-header'> <div class='header'>
{% block header_content %} {% block header_content %}
{% endblock %} {% endblock %}
</div> </div>
<div class='page-content'> <div class='content'>
{% block page_content %} {% block page_content %}
{% endblock %} {% endblock %}
</div> </div>
<div class='page-footer'> <div class='footer'>
{% block footer_content %} {% block footer_content %}
{% endblock %} {% endblock %}
</div> </div>