forked from musalbas/Mailpile-print
-
Notifications
You must be signed in to change notification settings - Fork 1
/
print.html
158 lines (148 loc) · 10.1 KB
/
print.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en"><!--
Mailpile printout. Complete raw message headers:
{% for hdr, val in result.message.header_list %}
{{hdr|safe}}: {{val|safe}}
{% endfor %}
--><head>
<title>Print message</title>
<meta name="description" content="">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<style type="text/css">
@font-face {
font-family: Mailpile-300;
src: url(/static/webfonts/Mailpile-Light.eot);
src: url(/static/webfonts/Mailpile-Light.eot?#iefix) format('embedded-opentype'), url(/static/webfonts/Mailpile-Light.woff) format('font-woff'), url(/static/webfonts/Mailpile-Light.ttf) format('truetype'), url(/static/webfonts/Mailpile-Light.svg#wf) format('svg')
}
body {
background: #fff;
font-size: 18px;
font-weight: 400;
font-family: HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 24px;
color: #333;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 {
color: #333;
font-family: Mailpile-300, HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 700;
letter-spacing: 0;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
font-weight: inherit;
}
h1 {
font-size: 36px;
line-height: 36px;
margin-bottom: 30px;
}
#thread-title h1 {
font-family: Mailpile-300, HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 24px;
font-weight: 700;
margin: 0;
padding: 0;
}
.logo {
width: 67px;
display: table-cell;
box-sizing: border-box;
vertical-align: middle;
}
.logo #svg_logo {
display: block;
margin-left: 15px;
}
.logo-name {
width: 157px;
height: 40px;
display: table-cell;
box-sizing: border-box;
vertical-align: middle;
}
.logo-name #svg_logo_name {
display: block;
margin-left: 10px;
}
hr {
border: solid #b3b3b3;
clear: both;
height: 0;
border-width: 1px 0 0;
margin: 5px 0;
}
#message {
white-space: pre-wrap;
}
</style>
</head><body>
<div class="logo">
<svg version="1.1" id="svg_logo" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px" width="51.359px" height="36.152px" viewBox="0 0 51.359 36.152" enable-background="new 0 0 51.359 36.152" xml:space="preserve">
<g>
<polygon fill="#337FB2" points="30.845,12.283 29.104,1.644 23.619,8.464 20.684,11.224 24.706,15.172 29.83,18.932 29.34,19.619 25.846,17.665 19.871,11.907 16.647,15.924 11.939,13.392 10.562,16.32 5.347,23.443 4.34,22.793 9.494,15.707 11.289,12.473 6.505,10.245 0.663,6.159 1.218,13.629 3.142,24.806 13.08,25.266 24.38,22.949 30.398,22.161 31.59,20.342"/>
<polygon fill="#337FB2" points="12.166,11.295 16.285,14.103 18.747,11.096 22.805,7.276 28.932,0.152 16.013,1.814 7.158,3.18 0.451,4.672 7.049,8.999"/>
</g>
<g>
<polygon fill="#BE1C21" points="37.792,30.277 38.955,23.488 34.223,26.465 31.873,27.522 33.48,30.744 35.794,34.083 35.355,34.396 33.651,32.488 31.239,27.765 28.455,29.521 26.139,27.01 24.697,28.492 20.063,31.711 19.59,31.107 24.18,27.899 25.937,26.319 23.511,23.978 21.343,24.521 19.612,24.922 18.447,32.074 24.356,34.422 31.664,35.375 35.465,36.152 36.563,35.301"/>
<polygon fill="#BE1C21" points="26.711,25.791 28.617,28.346 30.729,27.041 33.977,25.578 39.162,22.551 32.186,21.152 31.029,22.9 27.28,23.32 25.385,23.489 24.48,23.721"/>
</g>
<path fill="#4B9441" d="M48.834,1.655L41.45,2.97l-7.405,1.542l-2.729,0.433l1.311,7.074l1.351,6.243l4.976-1.134l7.71-1.351l4.696-1.044l-1.01-4.361L48.834,1.655z M44.243,12.998l0.073,0.423l-2.605,0.403l-5.567,1.019l-0.079-0.463l-0.113-0.472l2.204-0.486l0.03-0.005l3.516-0.531l2.488-0.343L44.243,12.998z M36,12.321v-0.36l2.67-0.582l2.711-0.494L42.66,10.6l1.12-0.211l0.087,0.769l-1.402,0.317l-3.99,0.682l-2.521,0.56L36,12.321z M43.418,8.727l0.096,0.434L40.75,9.694l-2.992,0.457l-2.437,0.434l-0.22-0.808l5.709-1.049l2.569-0.423L43.418,8.727z M48.141,5.422l-2.325,0.365l-0.326-1.106l-0.15-1.333l1.067-0.134l1.337-0.275l0.319,1.245L48.141,5.422z"/>
</svg>
</div>
<div class="logo-name">
<svg version="1.1" id="svg_logo_name" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px" width="116.926px" height="29.117px" viewBox="0 0 116.926 29.117" enable-background="new 0 0 116.926 29.117" xml:space="preserve">
<g>
<path fill="#4E4E4E" d="M1.984,10.559c0-0.48-0.257-0.704-0.704-0.704H0V6.399h3.744c1.439,0,2.144,0.672,2.144,1.824v0.48c0,0.352-0.032,0.704-0.032,0.704H5.92c0.768-1.6,2.72-3.392,5.279-3.392c2.464,0,4.063,1.152,4.768,3.359h0.064c0.863-1.76,2.976-3.359,5.567-3.359c3.392,0,5.344,1.92,5.344,6.208v6.367c0,0.449,0.256,0.705,0.704,0.705h1.247v3.424h-3.839c-1.536,0-2.176-0.641-2.176-2.176v-7.552c0-1.856-0.353-3.264-2.24-3.264c-2.016,0-3.456,1.696-3.904,3.744c-0.191,0.641-0.256,1.312-0.256,2.08v7.168h-4.063v-9.728c0-1.76-0.256-3.264-2.208-3.264c-2.048,0-3.424,1.696-3.936,3.776c-0.16,0.64-0.256,1.312-0.256,2.048v7.168H1.984V10.559z"/>
<path fill="#4E4E4E" d="M40.255,12.479h0.513v-0.128c0-2.336-0.929-3.2-3.008-3.2c-0.736,0-2.177,0.192-2.177,1.088v0.864h-3.775V9.375c0-3.04,4.288-3.359,5.983-3.359c5.439,0,7.04,2.848,7.04,6.496v6.079c0,0.449,0.256,0.705,0.704,0.705h1.279v3.424h-3.647c-1.504,0-2.08-0.832-2.08-1.793c0-0.416,0.032-0.703,0.032-0.703h-0.064c0,0-1.247,2.879-4.928,2.879c-2.911,0-5.567-1.823-5.567-5.087C30.56,12.895,37.6,12.479,40.255,12.479z M37.119,19.935c2.176,0,3.712-2.304,3.712-4.288v-0.384h-0.704c-2.111,0-5.472,0.288-5.472,2.56C34.655,18.91,35.455,19.935,37.119,19.935z"/>
<path fill="#4E4E4E" d="M50.208,10.559c0-0.48-0.257-0.704-0.704-0.704h-1.28V6.399h3.872c1.504,0,2.144,0.672,2.144,2.176V18.59c0,0.449,0.256,0.705,0.704,0.705h1.28v3.424h-3.872c-1.504,0-2.144-0.641-2.144-2.176V10.559z M50.399,0h3.52v3.744h-3.52V0z"/>
<path fill="#4E4E4E" d="M59.552,4.16c0-0.48-0.256-0.704-0.704-0.704h-1.279V0h3.871c1.504,0,2.176,0.672,2.176,2.176V18.59c0,0.449,0.257,0.705,0.704,0.705h1.248v3.424h-3.84c-1.535,0-2.176-0.641-2.176-2.176V4.16z"/>
<path fill="#4E4E4E" d="M69.087,9.215c0-0.448-0.257-0.704-0.704-0.704h-1.344V6.624h2.207c1.376,0,1.92,0.576,1.92,1.696c0,0.64-0.031,1.088-0.031,1.088h0.063c0,0,1.28-3.168,5.536-3.168c4.319,0,7.007,3.456,7.007,8.448c0,5.087-3.039,8.414-7.199,8.414c-3.936,0-5.279-3.039-5.279-3.039h-0.064c0,0,0.064,0.576,0.064,1.408v7.646h-2.176V9.215zM76.318,21.183c2.848,0,5.184-2.399,5.184-6.495c0-3.937-2.08-6.464-5.088-6.464c-2.688,0-5.216,1.92-5.216,6.496C71.198,17.951,72.958,21.183,76.318,21.183z"/>
<path fill="#4E4E4E" d="M88.03,9.215c0-0.448-0.256-0.704-0.703-0.704h-1.345V6.624h2.272c1.376,0,1.952,0.576,1.952,1.952v11.552c0,0.479,0.256,0.703,0.703,0.703h1.344v1.889h-2.271c-1.376,0-1.952-0.576-1.952-1.952V9.215z M87.967,0.224h2.111v2.751h-2.111V0.224z"/>
<path fill="#4E4E4E" d="M95.871,2.816c0-0.448-0.256-0.704-0.704-0.704h-1.344V0.224h2.271c1.376,0,1.952,0.576,1.952,1.952v17.951c0,0.479,0.256,0.703,0.704,0.703h1.344v1.889h-2.271c-1.376,0-1.952-0.576-1.952-1.952V2.816z"/>
<path fill="#4E4E4E" d="M110.174,6.239c4.448,0,6.752,3.424,6.752,7.424c0,0.384-0.063,1.088-0.063,1.088h-12.352c0.064,4.063,2.912,6.399,6.239,6.399c2.944,0,4.832-1.984,4.832-1.984l1.056,1.633c0,0-2.336,2.303-5.983,2.303c-4.768,0-8.415-3.455-8.415-8.414C102.239,9.407,105.854,6.239,110.174,6.239z M114.686,13.023c-0.128-3.328-2.176-4.959-4.543-4.959c-2.656,0-4.992,1.728-5.536,4.959H114.686z"/>
</g>
</svg>
</div>
<div>
<hr />
<div id="thread-title">
<h1>{{result.metadata.subject}}</h1>
</div>
<hr />
<p>
{% for hdr, val in result.message.header_list %}
{% if hdr in ('From', 'To', 'Cc', 'Date') %}
<strong>{{hdr}}:</strong> {{val}} <br />
{% endif %}
{% endfor %}
</p>
<p id="message"><tt style="font-size: 12px; line-height: 100%;">
{%- set message = result.message %}
{%- set last_enc_context = message.crypto.encryption.context %}
{%- set last_sig_context = message.crypto.signature.context %}
{%- if not message.text_parts %}
{%- for part in message.html_parts %}
{{- part.data|replace("\\n", "\n")|safe }}
{%- endfor %}
{%- endif %}
{%- for part in message.text_parts %}
{%- if (part.data != "") %}
{%- if part.type in ("text", "pgpsignedtext") %}
{{- part.data|urlize }}
{%- elif part.type == "quote" %}
<br />····<br />
{{- part.data|urlize }}
{%- elif part.type == "signature" %}
{{- part.data|urlize }}
{%- endif %}
{%- endif %}
{%- endfor %}
</tt></p>
</div>
</body>
<script>window.print();</script>
</html>