Skip to content

Commit 9e6af39

Browse files
committed
feat: render individual messages nicely
1 parent 847e25d commit 9e6af39

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

app/assets/stylesheets/application.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@
1313
*= require_tree .
1414
*= require_self
1515
*/
16+
17+
body {
18+
background: #fff;
19+
color: #333;
20+
margin: 0;
21+
padding: .5rem 1rem;
22+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
.headers {
3+
list-style: none;
4+
padding: 0 0 1rem 0;
5+
border-bottom: 1px solid #000;
6+
}
7+

app/views/layouts/application.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>BladeRubyLangOrg</title>
4+
<title><%=
5+
if yield(:title).empty?
6+
'blade.ruby-lang.org'
7+
else
8+
yield(:title)
9+
end
10+
%></title>
511
<meta name="viewport" content="width=device-width,initial-scale=1">
612
<%= csrf_meta_tags %>
713
<%= csp_meta_tag %>
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
<div id="<%= dom_id message %>">
2-
<p>
3-
<strong>Subject:</strong>
4-
<%= message.subject %>
5-
</p>
6-
7-
<p>
8-
<strong>From:</strong>
9-
<%= message.from %>
10-
</p>
1+
<% content_for :title, message.subject %>
112

3+
<div class="message" id="<%= dom_id message %>">
4+
<ul class="headers">
5+
<li>From: <%= message.from %></li>
6+
<li>Date: <%= message.published_at %></li>
7+
<li>Subject: <%= message.subject %></li>
8+
</ul>
129
<pre><%= message.body %></pre>
13-
1410
</div>

0 commit comments

Comments
 (0)