-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
60 lines (53 loc) · 1.34 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<meta charset="UTF-8" />
<title>httpdf example document</title>
<style>
@media screen {
.page {
margin: 10mm;
box-shadow: 0 0 5mm rgba(0, 0, 0, 0.2);
}
}
@media print {
.page {
margin: 0;
}
}
@page {
size: A4;
padding: 0;
margin: 0;
}
.page {
width: 210mm;
height: 297mm;
padding: 15mm;
overflow: hidden;
position: relative;
box-sizing: border-box;
page-break-after: always;
background-size: cover;
}
body {
font-size: 12pt;
}
h1 {
font-size: 24pt;
font-weight: bold;
margin: 0;
}
</style>
</head>
<body>
<div class="page">
<h1>{{ .title }}</h1>
<p>Created at {{ .date }}</p>
<ul>
{{ range .list }}
<li>{{ .name }}: {{ printf "%.2f" .amount }}</li>
{{ end }}
</ul>
</div>
</body>
</html>