-
Notifications
You must be signed in to change notification settings - Fork 0
/
paper.html.erb
73 lines (52 loc) · 1.26 KB
/
paper.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='generator' content='<%= Pluto.generator %>'>
<title><%= site.title %></title>
<%= stylesheet_link_tag 'css/o/paper' %>
</head>
<body>
<h1 class='site-title'><%= site.title %></h1>
<%
items = site.items.latest.limit(24)
ItemCursor.new( items ).each do |item, new_date, new_feed|
%>
<% if new_date %>
<h4 class='new-date'>
<%= item.published.strftime('%A, %B %e, %Y') %>
</h4>
<% else %>
<div class='item-separator'></div>
<% end %>
<article class='item'>
<% if new_feed %>
<h4 class='feed-title'>
<%= link_to item.feed.title, item.feed.url %>
</h4>
<% end %>
<h3 class='item-title'>
<%= link_to item.title, item.url %>
<span class='item-timestamp'>
<%= item.published.strftime('%H:%M') %> •
<%= time_ago_in_words( item.published ) %>
</span>
</h3>
<div class='item-body'>
<div class='item-snippet'>
<!-- use 'smarter' algorithm for cutoff snippet text
note: summary goes first; than try content -->
<% if item.summary %>
<%= textify( item.summary )[0..800] %>
<% elsif item.content %>
<%= textify( item.content )[0..800] %>
<% else %>
-/-
<% end %>
</div>
</div>
</div><!-- item-body -->
</article><!-- item -->
<% end %><!-- each item -->
</body>
</html>