stylesheet, layout and rendering for email_template (test)
This commit is contained in:
parent
cfbb3bc36f
commit
e8013d8345
4 changed files with 72 additions and 77 deletions
40
app/assets/stylesheets/mailbot.css
Normal file
40
app/assets/stylesheets/mailbot.css
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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;
|
||||
}
|
||||
|
||||
9
app/views/layouts/_mailbot_footer.html.haml
Normal file
9
app/views/layouts/_mailbot_footer.html.haml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
%html{lang: 'en'}
|
||||
%head
|
||||
%meta{charset: 'utf-8'}
|
||||
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
|
||||
%meta{content: 'Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley.', name: 'description'}
|
||||
%meta{content: 'Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock', name: 'author'}
|
||||
= stylesheet_link_tag "mailbot"
|
||||
%body
|
||||
#border
|
||||
19
app/views/layouts/_mailbot_header.html.haml
Normal file
19
app/views/layouts/_mailbot_header.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
%html{lang: 'en'}
|
||||
%head
|
||||
%meta{charset: 'utf-8'}
|
||||
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
|
||||
%title= 'Email'
|
||||
%meta{content: 'Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley.', name: 'description'}
|
||||
%meta{content: 'Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock', name: 'author'}
|
||||
= stylesheet_link_tag "mailbot"
|
||||
%body
|
||||
#border
|
||||
.row
|
||||
.col-md-2
|
||||
- if !@logo.nil?
|
||||
= image_tag(@logo, style: "display:block")
|
||||
.col-md-10
|
||||
%h1
|
||||
#content
|
||||
%span{:style => "white-space: pre-line"}
|
||||
|
||||
|
|
@ -1,77 +1,4 @@
|
|||
<!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">
|
||||
<% if !@logo.nil? %>
|
||||
<%= image_tag(@logo, style: "display:block") %>
|
||||
<% end %>
|
||||
</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>
|
||||
= render "layouts/_mailbot_header"
|
||||
= @email_body
|
||||
= render "layouts/_mailbot_footer"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue