|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>{{page['title']}}</title>
|
|
|
|
|
|
|
|
<script src="/postit/fitText.js"></script>
|
|
|
|
<script src="/postit/selectElements.js" defer></script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
html,
|
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
font-size: 0;
|
|
|
|
font-family:arial, helvetica, sans-serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
* {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hr {
|
|
|
|
page-break-after: always;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
padding: 0;
|
|
|
|
margin: {{page['margin']}}{{page['unit']}};
|
|
|
|
border-collapse: collapse;
|
|
|
|
border: 1px dashed gray;
|
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
position: relative;
|
|
|
|
border: 1px dashed gray;
|
|
|
|
width: {{page['post_width']}}mm;
|
|
|
|
height: {{page['post_height']}}mm;
|
|
|
|
padding: 0;
|
|
|
|
background-color: {{page['background']}};
|
|
|
|
}
|
|
|
|
|
|
|
|
td img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
|
|
|
|
td .caption {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
font-size: 12px;
|
|
|
|
background-color: white;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cell {
|
|
|
|
line-height: 1.6;
|
|
|
|
text-align: center;
|
|
|
|
padding: 5mm;
|
|
|
|
}
|
|
|
|
|
|
|
|
@page { size: auto; margin: 0mm; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
{% for content in contents %}
|
|
|
|
<table>
|
|
|
|
{%for row in range(page['rows'])%}
|
|
|
|
<tr>
|
|
|
|
{%for col in range(page['cols'])%}
|
|
|
|
<td>
|
|
|
|
{%if content['img'] %}
|
|
|
|
<img src="{{content['img']}}" />
|
|
|
|
<div class="caption">{{content['alt']}}</div>
|
|
|
|
{%else%}
|
|
|
|
|
|
|
|
<div class="cell">{{content}}</div>
|
|
|
|
|
|
|
|
{%endif%}
|
|
|
|
</td>
|
|
|
|
{%endfor%}
|
|
|
|
</tr>
|
|
|
|
{%endfor%}
|
|
|
|
</table>
|
|
|
|
<hr />
|
|
|
|
{%endfor%}
|
|
|
|
</body>
|
|
|
|
</html>
|