forked from Identosphere/identity-blogcatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview.html.erb
More file actions
126 lines (111 loc) · 4.61 KB
/
overview.html.erb
File metadata and controls
126 lines (111 loc) · 4.61 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='generator' content='<%= Pluto.generator %>'>
<title>Identosphere Blog Catcher | Planet Identity Reboot</title>
<%= stylesheet_link_tag 'css/et-book' %>
<%= stylesheet_link_tag 'css/planetid.overview' %>
<!-- fix: use script_tag rails-style ??? -->
<script src='js/jquery-2.0.3.min.js'></script>
<script src='js/planetid.js'></script>
<%# = javascript_include_tag 'js/jquery-2.0.3.min.js' %>
<%# = javascript_include_tag 'js/planetid.js' %>
<!-- Favicon-->
<link rel="apple-touch-icon" sizes="57x57" href="/assets/icon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/icon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/icon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/icon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/icon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/icon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/icon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/icon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/icon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/icon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/icon/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/assets/icon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<script data-goatcounter="https://identosphere.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>
</head>
<body>
<div class='banner'>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td>
<!-- left/1st column -->
<a href="https://identosphere.net">Identosphere</a> • <a href="https://github.com/identosphere/planetid-reboot/">on Github</a> | <a href="/blogcatcher/"><b>Blogcatcher</b></a> | <a href="/blogcatcher/organizations/">Organizations</a> | <a href="/blogcatcher/companies/">Companies</a> | <a href="/blogcatcher/media/">Media</a>
</td>
<td style='text-align:right;'>
<!-- right/2nd column -->
Style | <%= link_to 'Full', "/blogcatcher/" %> • <%= link_to '<b>Overview</b>', "overview.html" %>
</td>
</tr>
</table>
</div>
<sup>Last Update <%= site.updated.strftime('%-I:%M %p %B %d, %Y') %> (UTC)</sup>
<h1>Identosphere Blog Catcher - Latest Headlines</h1>
<!-- use a table w/ three colums -->
<table>
<colgroup>
<col width='33%'>
<col width='33%'>
<col width='33%'>
</colgroup>
<tr>
<!-- check/fix: check if it will work w/o .all. - depreciated in rails 4+ -->
<% site.feeds.latest.to_a.in_columns(3).each do |feeds| %>
<td valign='top'>
<!-- start new column -->
<% feeds.each do |feed| %>
<div class='feed'>
<h3><%= link_to feed.title, feed.url %></h3>
<table>
<!-- todo:
include latest 11 (more than 4 add hidden
plus add a more toggle button to show all 11!! )
-->
<% feed.items.latest.limit(4).each do |item|
## todo: use markdownify in future version
## todo: unescape all &xx; entities -html and unicode - how?
if item.summary
item_snippet_plain_text = whitelist( item.summary, [] )[0..500]
elsif item.content
item_snippet_plain_text = whitelist( item.content, [] )[0..500]
else
item_snippet_plain_text = '-/-'
end
if item.title.blank?
item.title = item_snippet_plain_text[0..60]
end
%>
<tr>
<td valign='top'>
<span class='item-published'>
<!-- fix/todo: show year if not current year
e.g. use "%b %d, '%y"
-->
<%= item.published.strftime("%b %d") %>
</span>
</td>
<td>
<span class='item-title'>
<%= link_to item.title, item.url, title: item_snippet_plain_text.strip %>
</span>
<span class='item-time-ago-in-words'><%= time_ago_in_words( item.published ) %></span>
</td>
</tr>
<% end %><!-- each item -->
</table>
</div>
<% end %><!-- each feed (inside column) -->
</td>
<% end %><!-- each column-->
</tr>
</table>
</body>
</html>