e_paper/app/views/admin/e_papers/emailer.html.erb

175 lines
4.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% paper = @data["paper"] %>
<% page = @data["page"] %>
<!DOCTYPE html>
<html>
<head>
<title><%= paper.title %></title>
<style type="text/css">
.epaper-show .epaper-show-title {
border-bottom: 2px solid #ddd;
padding: 0 0 10px;
margin: 10px 0 20px;
color: #881f05;
}
.epaper-show .ep-info {
background: #fff;
border-radius: 3px;
padding: 10px;
margin: 0 0 15px;
}
.epaper-show .ep-info-title {
border-bottom: 1px solid #eee;
padding: 0 0 5px;
margin: 0 0 8px;
font-size: 18px;
}
.epaper-show .ep-info-date {
float: left;
width: 50%;
margin: 0 0 5px;
color: #888;
}
.epaper-show .ep-info-period {
float: right;
width: 50%;
margin: 0 0 5px;
text-align: right;
padding: 0 10px 0 0;
color: #888;
}
.epaper-show .ep-info-description {
clear: both;
padding: 10px 0 0;
overflow: hidden;
border-top: 1px solid #eee;
}
.epaper-show .ep-info-description span {
float: right;
width: calc(100% - 90px);
line-height: 1.5;
}
.epaper-show .ep-content-item {
float: left;
width: calc(50% - 20px);
border: 1px solid #ccc;
vertical-align: top;
min-height: 200px;
padding: 20px;
margin: 10px;
}
.epaper-show .ep-content-title {
color: #881f05;
font-size: 20px;
border-left: 4px solid #881f05;
display: block;
padding: 0 0 0 10px;
margin: 0 0 10px;
}
.epaper-show p.ep-content-text {
color: #666;
font-size: 15px;
}
.epaper-show a.ep-content-more {
background: #881f05;
color: #fff;
padding: 2px 10px;
border-radius: 5px;
font-size: 12px;
}
.ep-topic-show .ep-topic-title {
margin: 10px 0;
color: #881f05;
}
.ep-topic-show .ep-topic-date {
background: #fff;
padding: 10px;
border-radius: 3px;
margin: 0 0 10px;
}
.ep-topic-show .ep-topic-content {
font-size: 15px;
line-height: 2;
}
.epaper-form {
background: #fff;
padding: 20px;
width: 100%;
max-width: 300px;
margin: auto;
border-radius: 5px;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}
.epaper-form input.input-mail {
display: block;
width: 100%;
margin: 0 0 20px;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 5px;
color: #333;
}
.epaper-form .btn-primary {
width: 50%;
float: left;
display: block;
}
.epaper-form .btn-white {
background: none;
width: 50%;
outline: none;
float: right;
color: #888;
}
.epaper-form .btn-white:active {
outline: none;
box-shadow: none;
}
.epaper-form .btn-white:hover {
text-decoration: underline;
}
.epaper-form .ep-form-title {
font-size: 20px;
margin: 0 0 15px;
}
.epaper-form h3.ep-form-title .en {
display: none;
}
.epaper-form form {
overflow: hidden;
}
.school-heading{
padding: 20px;
text-align: center;
border-bottom: 1px solid #c8c8c8;
}
</style>
</head>
<body>
<div class="school-heading">
<img src="http://hps.pending.rulingcom.com/uploads/site/site_logo/589d279202dcf06d74000018/title.png" alt="Health Promoting School">
</div>
<div class="epaper-show">
<h3 class="epaper-show-title"><%= t('e_paper.intro') %></h3>
<div class="ep-info">
<div class="ep-info-title"><%= t('e_paper.title') %><span><%= paper.title %></span></div>
<div class="ep-info-date"><%= t('e_paper.date') %><span><%= paper.created_at.strftime("%Y-%m-%d") %></span></div>
<div class="ep-info-period"><%= t('e_paper.period') %><span><%= paper.period.strftime("%Y-%m-%d") %></span></div>
<div class="ep-info-description"><%= t('e_paper.description') %><span><%= paper.description %></span></div>
</div>
<div class="ep-content">
<% paper.topics.desc(:created_at).each do |topic| %>
<div class="ep-content-item">
<a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=showtopic" %>" target="_blank"><%= topic.episode %></a>
<% t = strip_tags(topic.content) %>
<p class="ep-content-text"><%= t[0..100] %></p>
<a class="ep-content-more" href="<%= page + "/" + paper.to_param + "?method=showtopic" %>" target="_blank">more</a>
</div>
<% end %>
</div>
</div>
</body>
</html>