-
Notifications
You must be signed in to change notification settings - Fork 2
/
blank.html.erb
159 lines (121 loc) · 3.67 KB
/
blank.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='generator' content='<%= Pluto.generator %>'>
<title><%= site.title %></title>
<%= stylesheet_link_tag 'css/font-awesome' %>
<%= stylesheet_link_tag 'css/blank' %>
<!-- fix: use script_tag rails-style ??? -->
<script src='js/jquery-2.0.3.min.js'></script>
<script src='js/blank.js'></script>
<%# = javascript_include_tag 'js/jquery-2.0.3.min.js' %>
<%# = javascript_include_tag 'js/blank.js' %>
</head>
<body>
<div id='navwrap'>
<div id='nav'>
<p>
Last Update
</p>
<p class='small'>
<% if site.updated %>
<%= site.updated.strftime('%A, %d. %B %Y %H:%M') %>
<% end %>
</p>
<p>Subscriptions</p>
<ul class='subscriptions small' >
<% site.feeds.each do |feed| %>
<li>
<%= link_to( image_tag('i/feed-icon-10x10.png'), feed.feed_url ) %>
<%= link_to feed.title, feed.url %>
</li>
<% end %>
</ul>
<p>Planetarium</p>
<ul class='planetarium small'>
<li><a href='http://plutolive.herokuapp.com'>Planet Ruby</a></li>
<li><a href='http://viennarb.herokuapp.com'>Planet vienna.rb</a></li>
</ul>
<p>Meta</p>
<p class='small'>Powered by <a href='https://github.com/feedreader'>Pluto</a>;
Questions? Comments?
Send them along to the <a href='https://groups.google.com/group/wwwmake'>forum/mailing list</a>. Thanks!
</p>
</div>
</div>
<div id='opts'>
<div style='width: 100%; text-align: right;'>
<img src='i/view-headlines.png' id='show-headlines' title='Show Headlines Only' width='24' height='24'>
<img src='i/view-snippets.png' id='show-snippets' title='Show Snippets' width='24' height='24'>
<img src='i/view-standard.png' id='show-fulltext' title='Show Full Text' width='24' height='24'>
</div>
<div style='width: 100%; text-align: right;'>
Style |
<%= link_to 'Standard', "#{site.key}.html" %> •
<%= link_to 'Cards', "#{site.key}.cards.html" %>
</div>
</div>
<h1><%= site.title %></h1>
<%
items = site.items.latest.limit(24)
ItemCursor.new( items ).each do |item, new_date, new_feed|
%>
<% if new_date %>
<h2 class='new-date'>
<%= item.updated.strftime('%A, %d. %B %Y') %>
</h2>
<% else %>
<hr class='item-seperator'>
<% 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'>
<i class='icon-caret-down item-collapse item-close item-opened'></i>
<i class='icon-caret-right item-expand item-open item-closed'></i>
<%= link_to item.title, item.url %>
</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 %>
<%= whitelist( item.summary, [] )[0..400] %>
<% elsif item.content %>
<%= whitelist( item.content, [] )[0..400] %>
<% else %>
-/-
<% end %>
</div>
<div class='item-content item-summary'>
<!-- todo: use sanitize or simplify or whitelist
- todo/fix: check why summary can be nil/null
note: content goes first; than try summary
-->
<% if item.content %>
<%= textify( item.content ) %>
<% elsif item.summary %>
<%= textify( item.summary ) %>
<% else %>
-/-
<% end %>
</div>
<div class='item-footer'>
Published
<%= item.published.strftime('%H:%M') %> •
<%= time_ago_in_words( item.published ) %>
<% if item.updated != item.published %>
| Updated
<%= item.updated.strftime('%A, %d. %B %Y %H:%M') %> •
<%= time_ago_in_words( item.updated ) %>
<% end %>
</div>
</div><!-- item-body -->
</article><!-- item -->
<% end %><!-- each item -->
</body>
</html>