-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdigest.html.erb
92 lines (67 loc) · 1.68 KB
/
digest.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='generator' content='<%= Pluto.generator %>'>
<title><%= site.title %></title>
<%= stylesheet_link_tag 'css/digest' %>
</head>
<body>
<div class='container'>
<div class='masthead'>
<h1><%= site.title %></h1>
the unofficial digest
</div>
<!-- 1) list headlines w/ inline links -->
<div class='contents'>
<p><b>Contents</b></p>
<ol>
<% site.items.latest.limit(17).each_with_index do |item,index| %>
<li>
<%= link_to item.title, '#'+"#{index+1}" %>
<span class='item-feed-title'>
• <%= link_to item.feed.title, item.feed.url %>
</span>
<span class='item-published'>
• <%= time_ago_in_words( item.published ) %>
</span>
</li>
<% end %><!-- each item -->
</ol>
</div>
<!-- 2) list full articles -->
<% site.items.latest.limit(17).each_with_index do |item,index| %>
<a name='<%= "#{index+1}" %>'></a>
<div class='item'>
<div class='item-header'>
<h2>
<!-- <%= index+1 %>. -->
<%= link_to item.title, item.url %>
</h2>
<span class='item-feed-title'>
<%= link_to item.feed.title, item.feed.url %> •
</span>
<span class='item-published'>
<%= item.published.strftime('%A %B %d, %Y @ %H:%M') %> •
<%= time_ago_in_words( item.published ) %>
</span>
</div>
<div class='item-body'>
<div class='item-content item-summary'>
<!--
note: content goes first; than try summary
-->
<% if item.content %>
<%= item.content %>
<% elsif item.summary %>
<%= item.summary %>
<% else %>
-/-
<% end %>
</div>
</div><!-- item-body -->
</div><!-- item -->
<% end %><!-- each item -->
</div><!-- container -->
</body>
</html>