Skip to content

Commit 8a3774b

Browse files
authored
feat: add email invitation template and kustomization files (#78)
Introduced a new email invitation template for user invitations, along with the necessary kustomization files for notification resources. This includes the HTML and text body formats for the email, ensuring a structured and styled invitation experience. > [!NOTE] > > This template should be replace for a branded one
2 parents 6c7485e + f186db5 commit 8a3774b

File tree

2 files changed

+358
-0
lines changed

2 files changed

+358
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- userinvitation-emailtemplate.yaml
Lines changed: 353 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,353 @@
1+
apiVersion: notification.miloapis.com/v1alpha1
2+
kind: EmailTemplate
3+
metadata:
4+
name: emailtemplates.notification.miloapis.com-userinvitationemailtemplate
5+
spec:
6+
subject: "Join your friends on Datum"
7+
htmlBody: |
8+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
9+
<html dir="ltr" lang="en">
10+
<head>
11+
<link
12+
rel="preload"
13+
as="image"
14+
href="https://www.datum.net/download/eng/logo-datum-light.png" />
15+
<link
16+
rel="preload"
17+
as="image"
18+
href="https://www.datum.net/download/eng/social-gh.png" />
19+
<link
20+
rel="preload"
21+
as="image"
22+
href="https://www.datum.net/download/eng/social-li.png" />
23+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
24+
<meta name="x-apple-disable-message-reformatting" />
25+
<style>
26+
@font-face {
27+
font-family: 'Alliance No1';
28+
font-style: normal;
29+
font-weight: 600;
30+
mso-font-alt: 'sans-serif';
31+
src: url(https://www.datum.net/fonts/datum/allianceno1-semibold-webfont.woff2) format('woff2');
32+
}
33+
34+
* {
35+
font-family: 'Alliance No1', sans-serif;
36+
}
37+
</style>
38+
<style>
39+
@font-face {
40+
font-family: 'Alliance No1';
41+
font-style: normal;
42+
font-weight: 500;
43+
mso-font-alt: 'sans-serif';
44+
src: url(https://www.datum.net/fonts/datum/allianceno1-medium-webfont.woff2) format('woff2');
45+
}
46+
47+
* {
48+
font-family: 'Alliance No1', sans-serif;
49+
}
50+
</style>
51+
<style>
52+
@font-face {
53+
font-family: 'Alliance No1';
54+
font-style: normal;
55+
font-weight: 400;
56+
mso-font-alt: 'sans-serif';
57+
src: url(https://www.datum.net/fonts/datum/allianceno1-regular-webfont.woff2) format('woff2');
58+
}
59+
60+
* {
61+
font-family: 'Alliance No1', sans-serif;
62+
}
63+
</style>
64+
</head>
65+
<body
66+
style="margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;background-color:rgb(255,255,255);font-family:&#x27;Alliance No1&#x27;, ui-sans-serif, system-ui, sans-serif, &#x27;Apple Color Emoji&#x27;, &#x27;Segoe UI Emoji&#x27;, &#x27;Segoe UI Symbol&#x27;, &#x27;Noto Color Emoji&#x27;">
67+
<!--$--><!--html--><!--head-->
68+
<div
69+
style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0"
70+
data-skip-in-text="true">
71+
{{.InviterDisplayName}} invited you to join {{.OrganizationDisplayName}}
72+
</div>
73+
<!--body-->
74+
<table
75+
border="0"
76+
width="100%"
77+
cellpadding="0"
78+
cellspacing="0"
79+
role="presentation"
80+
align="center">
81+
<tbody>
82+
<tr>
83+
<td
84+
style="margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;background-color:rgb(255,255,255);font-family:&#x27;Alliance No1&#x27;, ui-sans-serif, system-ui, sans-serif, &#x27;Apple Color Emoji&#x27;, &#x27;Segoe UI Emoji&#x27;, &#x27;Segoe UI Symbol&#x27;, &#x27;Noto Color Emoji&#x27;">
85+
<table
86+
align="center"
87+
width="100%"
88+
border="0"
89+
cellpadding="0"
90+
cellspacing="0"
91+
role="presentation"
92+
style="margin-left:auto;margin-right:auto;margin-top:80px;margin-bottom:80px;border-radius:0.5rem;border-width:1px;border-style:solid;border-color:rgb(232,231,228);padding-top:36px;padding-bottom:36px;padding-left:40px;padding-right:40px;background-color:rgb(255,255,255);max-width:37.5em">
93+
<tbody>
94+
<tr style="width:100%">
95+
<td>
96+
<table
97+
align="center"
98+
width="100%"
99+
border="0"
100+
cellpadding="0"
101+
cellspacing="0"
102+
role="presentation"
103+
class="">
104+
<tbody>
105+
<tr>
106+
<td>
107+
<img
108+
alt="Datum"
109+
height="70"
110+
src="https://www.datum.net/download/eng/logo-datum-light.png"
111+
style="margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;display:block;outline:none;border:none;text-decoration:none" />
112+
<hr
113+
style="margin-left:0;margin-right:0;margin-top:32px;margin-bottom:0;display:block;border-width:1px;border-color:rgb(232,231,228);border-style:solid;width:100%;border:none;border-top:1px solid #eaeaea" />
114+
</td>
115+
</tr>
116+
</tbody>
117+
</table>
118+
<table
119+
align="center"
120+
width="100%"
121+
border="0"
122+
cellpadding="0"
123+
cellspacing="0"
124+
role="presentation"
125+
style="margin-top:32px;margin-bottom:32px">
126+
<tbody>
127+
<tr>
128+
<td>
129+
<table
130+
align="center"
131+
width="100%"
132+
border="0"
133+
cellpadding="0"
134+
cellspacing="0"
135+
role="presentation"
136+
style="margin-bottom:32px">
137+
<tbody style="width:100%">
138+
<tr style="width:100%">
139+
<h2
140+
style="font-size:24px;line-height:32px;margin-top:0;font-weight:500;margin-bottom:16px">
141+
Join your friends on Datum
142+
</h2>
143+
<p
144+
style="font-size:14px;line-height:20px;margin:0;font-weight:300;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">
145+
{{.InviterDisplayName}}<!-- -->
146+
has invited you to join &quot;<!-- -->{{.OrganizationDisplayName}}<!-- -->&quot; organization to
147+
collaborate with them. Use the button below
148+
to set up your account and get started:
149+
</p>
150+
<a
151+
href="https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept"
152+
style="border-radius:0.25rem;font-weight:600;text-align:center;text-decoration-line:none;border-width:1px;border-style:solid;display:block;background-color:rgb(191,149,149);color:rgb(255,255,255);border-color:rgb(191,149,149);padding-left:20px;padding-right:20px;padding-top:12px;padding-bottom:12px;font-size:14px;line-height:20px;margin-top:24px;margin-bottom:24px;text-decoration:none;max-width:100%;mso-padding-alt:0px"
153+
target="_blank"
154+
><span
155+
><!--[if mso]><i style="mso-font-width:500%;mso-text-raise:18" hidden>&#8202;&#8202;</i><![endif]--></span
156+
><span
157+
style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px"
158+
>Accept invitation</span
159+
><span
160+
><!--[if mso]><i style="mso-font-width:500%" hidden>&#8202;&#8202;&#8203;</i><![endif]--></span
161+
></a
162+
>
163+
<p
164+
style="font-size:14px;line-height:20px;margin:0;font-weight:300;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">
165+
Or you can copy and paste the following URL
166+
into your browser:<!-- -->
167+
<a
168+
href="https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept"
169+
style="color:rgb(191,149,149);text-decoration-line:none"
170+
target="_blank"
171+
>https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept</a
172+
>
173+
</p>
174+
</tr>
175+
</tbody>
176+
</table>
177+
<table
178+
align="center"
179+
width="100%"
180+
border="0"
181+
cellpadding="0"
182+
cellspacing="0"
183+
role="presentation"
184+
class="">
185+
<tbody>
186+
<tr>
187+
<td>
188+
<hr
189+
style="margin-left:0;margin-right:0;margin-bottom:32px;margin-top:0;display:block;border-width:1px;border-color:rgb(232,231,228);border-style:solid;width:100%;border:none;border-top:1px solid #eaeaea" />
190+
<table
191+
align="center"
192+
width="100%"
193+
border="0"
194+
cellpadding="0"
195+
cellspacing="0"
196+
role="presentation">
197+
<tbody style="width:100%">
198+
<tr style="width:100%">
199+
<h3
200+
style="font-size:20px;line-height:28px;margin-top:0;margin-bottom:16px;font-weight:500">
201+
We&#x27;re here to help
202+
</h3>
203+
<p
204+
style="font-size:14px;line-height:20px;margin-bottom:8px;margin-top:0;font-weight:300">
205+
If you have any questions reach out
206+
and we&#x27;ll do our best to help
207+
</p>
208+
<a
209+
href="mailto:support@datum.net"
210+
style="font-size:14px;line-height:20px;font-weight:300;text-decoration-line:underline;color:rgb(191,149,149)"
211+
target="_blank"
212+
>support@datum.net</a
213+
>
214+
</tr>
215+
</tbody>
216+
</table>
217+
</td>
218+
</tr>
219+
</tbody>
220+
</table>
221+
</td>
222+
</tr>
223+
</tbody>
224+
</table>
225+
<table
226+
align="center"
227+
width="100%"
228+
border="0"
229+
cellpadding="0"
230+
cellspacing="0"
231+
role="presentation"
232+
class="">
233+
<tbody>
234+
<tr>
235+
<td>
236+
<hr
237+
style="margin-left:0;margin-right:0;margin-bottom:32px;margin-top:0;display:block;border-width:1px;border-color:rgb(232,231,228);border-style:solid;width:100%;border:none;border-top:1px solid #eaeaea" />
238+
<p
239+
style="font-size:14px;line-height:20px;margin:0;font-weight:300;margin-bottom:24px;margin-top:0;margin-left:0;margin-right:0">
240+
Datum unlocks cloud superpowers, without getting
241+
in the way. Find out more about Datum at<!-- -->
242+
<a
243+
href="https://www.datum.net"
244+
style="font-size:14px;line-height:20px;font-weight:300;text-decoration-line:underline;color:rgb(191,149,149)"
245+
target="_blank"
246+
>datum.net</a
247+
>
248+
</p>
249+
<table
250+
align="center"
251+
width="100%"
252+
border="0"
253+
cellpadding="0"
254+
cellspacing="0"
255+
role="presentation"
256+
style="margin-top:24px;margin-bottom:24px;display:table-cell;height:44px;width:56px">
257+
<tbody style="width:100%">
258+
<tr style="width:100%">
259+
<td
260+
data-id="__react-email-column"
261+
style="padding-right:8px">
262+
<a
263+
href="https://github.com/datum-cloud"
264+
style="color:#067df7;text-decoration-line:none"
265+
target="_blank"
266+
><img
267+
alt="GitHub"
268+
height="18"
269+
src="https://www.datum.net/download/eng/social-gh.png"
270+
style="display:block;outline:none;border:none;text-decoration:none"
271+
width="18"
272+
/></a>
273+
</td>
274+
<td data-id="__react-email-column">
275+
<a
276+
href="https://www.linkedin.com/company/datum-cloud"
277+
style="color:#067df7;text-decoration-line:none"
278+
target="_blank"
279+
><img
280+
alt="LinkedIn"
281+
height="18"
282+
src="https://www.datum.net/download/eng/social-li.png"
283+
style="display:block;outline:none;border:none;text-decoration:none"
284+
width="18"
285+
/></a>
286+
</td>
287+
</tr>
288+
</tbody>
289+
</table>
290+
<p
291+
style="font-size:14px;line-height:20px;margin:0;font-weight:300;margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">
292+
Datum Technology Inc. <br />29 Broadway <br />New
293+
York City <br />NY, 10006
294+
</p>
295+
</td>
296+
</tr>
297+
</tbody>
298+
</table>
299+
</td>
300+
</tr>
301+
</tbody>
302+
</table>
303+
</td>
304+
</tr>
305+
</tbody>
306+
</table>
307+
<!--/$-->
308+
</body>
309+
</html>
310+
311+
textBody: |
312+
--------------------------------------------------------------------------------
313+
314+
JOIN YOUR FRIENDS ON DATUM
315+
316+
{{.InviterDisplayName}} has invited you to join "{{.OrganizationDisplayName}}" organization to collaborate
317+
with them. Use the button below to set up your account and get started:
318+
319+
Accept invitation https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept
320+
321+
Or you can copy and paste the following URL into your browser:
322+
https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept
323+
324+
--------------------------------------------------------------------------------
325+
326+
327+
WE'RE HERE TO HELP
328+
329+
If you have any questions reach out and we'll do our best to help
330+
331+
support@datum.net
332+
333+
--------------------------------------------------------------------------------
334+
335+
Datum unlocks cloud superpowers, without getting in the way. Find out more about
336+
Datum at datum.net https://www.datum.net
337+
338+
https://github.com/datum-cloud https://www.linkedin.com/company/datum-cloud
339+
340+
Datum Technology Inc.
341+
29 Broadway
342+
New York City
343+
NY, 10006
344+
variables:
345+
- name: "InviterDisplayName"
346+
required: true
347+
type: "string"
348+
- name: "OrganizationDisplayName"
349+
required: true
350+
type: "string"
351+
- name: "UserInvitationName"
352+
required: true
353+
type: "string"

0 commit comments

Comments
 (0)