[feat] Allow embedding user-defined logo and user-defined text in email template
This commit is contained in:
parent
a45008640f
commit
55f56495f4
3 changed files with 165 additions and 70 deletions
73
app/views/mailbot/email_template.erb
Normal file
73
app/views/mailbot/email_template.erb
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
|
||||
color: #000;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
p {
|
||||
color: #0B3559;
|
||||
font-weight: 400;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
#border {
|
||||
background-color: #0B3559;
|
||||
padding: 25px;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #fff;
|
||||
padding: 100px;
|
||||
color: #0B3559;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Email</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="border">
|
||||
<div class="row">
|
||||
<!-- Uncomment below to get logo -->
|
||||
<div class="col-md-2"><%= image_tag(@logo, style: "display:block") %></div>
|
||||
<div class="col-md-10"><h1></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
<%= @email_body %>
|
||||
</span>
|
||||
</div>
|
||||
<div id="border">
|
||||
<h1></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue