You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.4 KiB
HTML

<!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>document</title>
<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 {
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;
}
.cell {
font-size: 18px;
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['type'] %}
<img src="{{content['src']}}" />
{%else%}
<div class="cell">{{content}}</div>
{%endif%}
</td>
{%endfor%}
</tr>
{%endfor%}
</table>
<hr />
{%endfor%}
</body>
</html>