mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add margin callouts for report template base
This commit is contained in:
parent
cf0c43d899
commit
ddbf2a6313
@ -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;
|
||||||
{% endblock %}
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
font-size: 75%;
|
||||||
|
|
||||||
#page-number:after {
|
@top-left {
|
||||||
counter-increment: page;
|
{% block top_left %}
|
||||||
content: counter(page);
|
{% endblock %}
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-count:after {
|
@top-center {
|
||||||
counter-increment: page;
|
{% block top_center %}
|
||||||
content: counter(pages);
|
{% endblock %}
|
||||||
|
}
|
||||||
|
|
||||||
|
@top-right {
|
||||||
|
{% block top_right %}
|
||||||
|
{% 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>
|
||||||
|
Loading…
Reference in New Issue
Block a user