-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrief.html
118 lines (98 loc) · 5.24 KB
/
brief.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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Email Brief</title>
<link href="images/favion.png" rel="icon" type="image/x-icon" />
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
<link rel='stylesheet' href='https://kit-pro.fontawesome.com/releases/v5.13.1/css/pro.min.css'>
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/v-dashbaord.css">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/0.7.4/tailwind.min.css'>
<style>
.size-22 { font-size: 22px; line-height: 31px; }
.size-32 { font-size: 32px; line-height: 31px; }
textarea, [type=text] {
width: 550px;
background: transparent;
border: none;
}
</style>
</head>
<body>
<button onclick="Export2Doc('content-to-pdf');">Export as .doc</button>
<div id="content-to-pdf">
<!-- ### START: INTRO BLOCK ### -->
<div class="layout one-col fixed-width stack" style="Margin: 0 auto;max-width: 600px;min-width: 320px; width: 320px;width: calc(28000% - 167400px);overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;">
<div class="layout__inner" style="border-collapse: collapse;display: table;width: 100%;background-color: #f3f3f4;">
<!--[if (mso)|(IE)]><table align="center" cellpadding="0" cellspacing="0" role="presentation"><tr class="layout-fixed-width" style="background-color: #f3f3f4;"><td style="width: 600px" class="w560"><![endif]-->
<div class="column" style="text-align: left;color: #454545;font-size: 18px;line-height: 26px;font-family: Hind,Calibri,Arial,sans-serif;">
<!-- Member number -->
<div class="m-id" style="Margin-left: 40px;Margin-right: 40px;Margin-bottom: 40px;">
<p class="size-16 mso-body-text" style="Margin-top: 0;Margin-bottom: 20px;font-size: 16px;line-height: 24px;text-align: right;" lang="x-size-16">
<strong>Member number:</strong><br/> 123456789
</p>
</div>
<!-- Text -->
<div style="Margin-left: 40px;Margin-right: 40px;Margin-bottom: 4px;">
<textarea class="size-32 font-bold">Super that works smart & hard</textarea>
<textarea class="size-22" rows="7" cols="60">{{profile.person.name.firstName}}, when it comes to superannuation, we've got everything you need to invest wisely for retirement.We offer a history of strong, long-term performance, smart ways to boost your super and insurance policies to keep you covered. We’ll help get your super really working for you.
</textarea>
</div>
<!-- Button -->
<div style="Margin-left: 40px;Margin-right: 40px;Margin-bottom: 10px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tbody>
<tr>
<td valign="top" align="left">
<div class="btn" style="text-align:center;color: #ffffff;">
<table cellpadding="0" cellspacing="0" align="left">
<tbody><tr>
<td style="width: 206px;height: 55px;background: #0F8045;border-radius: 4px;">
<input class="size-22 font-bold text-center" type="text" name="title" value="Learn more" style="width: 206px;height: 55px;">
</td>
</tr>
</tbody>
</table>
</div>
</td>
<!--[if (mso)|(IE)]><td style="width: 30px;color:white;"> </td><![endif]-->
</tr>
</tbody>
</table>
</div>
<!-- inner spacer -->
<div style="Margin-left: 10px;Margin-right: 10px;Margin-bottom: 20px;">
<div style="mso-line-height-rule: exactly;line-height: 20px;font-size: 1px;"> </div>
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
</div>
</div>
<!-- ### END: INTRO BLOCK ### -->
</div>
<button onclick="Export2Doc('content-to-pdf');">Export as .doc</button>
<script type="text/javascript">
function Export2Doc(element, filename = ''){
var html = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns='http://www.w3.org/TR/REC-html40'><head><meta><title>Export HTML To Doc</title></head><body>";
var footer = "</body></html>";
var html = html+document.getElementById(element).innerHTML+footer;
//link url
var url = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(html);
//file name
filename = filename?filename+'.doc':'document.doc';
// Creates the download link element dynamically
var downloadLink = document.createElement("a");
document.body.appendChild(downloadLink);
//Link to the file
downloadLink.href = url;
//Setting up file name
downloadLink.download = filename;
//triggering the function
downloadLink.click();
//Remove the a tag after donwload starts.
document.body.removeChild(downloadLink);
}
</script>
</body>
</html>