-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforty.html.erb
63 lines (47 loc) · 1.27 KB
/
forty.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='generator' content='<%= Pluto.generator %>'>
<title><%= site.title %></title>
<%= stylesheet_link_tag 'css/o/forty' %>
</head>
<body>
<h1 class='site-title'><%= site.title %></h1>
<div class='timeline'>
<% site.items.latest.limit(24).each do |item| %>
<article class='item'>
<div class='item-header'>
<span class='feed-title'>
<%= link_to item.feed.title, item.feed.url %>
</span>
<span class='feed-handle'>
<%= link_to "@#{item.feed.key}", item.feed.url %>
</span>
<span class='item-timestamp'>
<%= item.published.strftime('%B %e, %Y - %H:%M') %> •
<%= time_ago_in_words( item.published ) %>
</span>
</div>
<div class='item-body'>
<span class='item-title'>
<%= link_to item.title, item.url %>
</span>
<span>•</span>
<span class='item-content'>
<!-- use 'smarter' algorithm for cutoff snippet text
note: summary goes first; than try content -->
<% if item.summary %>
<%= strip_tags(textify( item.summary ))[0..140] %>
<% elsif item.content %>
<%= strip_tags(textify( item.content ))[0..140] %>
<% else %>
-/-
<% end %>
</span>
</div>
</article><!-- item -->
<% end %><!-- each item -->
</div>
</body>
</html>