diff options
author | 2020-03-09 18:34:21 +0100 | |
---|---|---|
committer | 2020-03-09 18:34:21 +0100 | |
commit | c80c0a2182c5c1b1e9986acb75430e2d53f997ff (patch) | |
tree | c50939b6f9f53d3296e19c1c0164fe82c3723ed3 | |
parent | Fix the atom feeds so that they are valid (diff) | |
download | planet-tyrian-c80c0a2182c5c1b1e9986acb75430e2d53f997ff.tar.gz planet-tyrian-c80c0a2182c5c1b1e9986acb75430e2d53f997ff.tar.bz2 planet-tyrian-c80c0a2182c5c1b1e9986acb75430e2d53f997ff.zip |
Correctly display universe feeds of gentoo devs
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | data.html.erb | 3 | ||||
-rw-r--r-- | data.json.erb | 4 | ||||
-rw-r--r-- | tyrian-contributors.html.erb | 8 | ||||
-rw-r--r-- | tyrian.html.erb | 6 |
4 files changed, 11 insertions, 10 deletions
diff --git a/data.html.erb b/data.html.erb index ac87b78..2e20a70 100644 --- a/data.html.erb +++ b/data.html.erb @@ -70,8 +70,7 @@ </div> <div class="col-sm-12" style="padding-left:15px;"> <span style="margin-right:2px;"> - <a style="color:#505050; font-weight: normal;" href="#c0"> <%= item.feed.title %> (<%= item.feed.key %> - )</a> + <a style="color:#505050; font-weight: normal;" href="#c0"> <%= item.feed.author %> (<%= item.feed.title %>)</a> </span> <span style="color:#505050;">•</span> <span style="color:#505050; font-weight: normal;margin-left:2px;"> diff --git a/data.json.erb b/data.json.erb index beb6d2a..8105b0b 100644 --- a/data.json.erb +++ b/data.json.erb @@ -7,8 +7,8 @@ %> { "title": <%= item.title.dump %>, - "author": <%= item.feed.title.dump %>, - "nickname": <%= item.feed.key.dump %>, + "author": <%= item.feed.author.dump %>, + "nickname": <%= item.feed.title.dump %>, "date": <%= item.published.strftime('%Y-%m-%d').dump %>, "scope": <%= item.feed.location.dump %>, "content": <% if item.content %><%= Loofah.fragment(item.content).scrub!(:prune).to_text.dump %><% elsif item.summary %><%= Loofah.fragment(item.summary).scrub!(:prune).to_text.dump %><% else %>"-/-"<% end %> diff --git a/tyrian-contributors.html.erb b/tyrian-contributors.html.erb index 71d6d7f..d73d19b 100644 --- a/tyrian-contributors.html.erb +++ b/tyrian-contributors.html.erb @@ -112,14 +112,14 @@ <div class="page-header mb-4" style="border-bottom: none!important;padding-bottom: 10px!important;margin-top:0px!important;"> <h1>Contributors <br> - <small> the gentoo universe aggregates feeds from <%= site.items.map { |i| i.feed }.uniq.length() %> + <small> the gentoo universe aggregates feeds from <%= site.items.map { |i| i.feed }.uniq { |feed| feed.author }.length() %> sources</small> </h1> </div> <div class="row equal"> - <% site.items.map { |i| i.feed }.uniq.each do |feed| %> + <% site.items.map { |i| i.feed }.uniq { |feed| feed.author }.each do |feed| %> <div class="col-sm-4"> <div class="card" style="height:90%;"> @@ -129,13 +129,13 @@ <img src="https://www.gravatar.com/avatar/<%= feed.avatar %>" style="border-radius: 6px;"/> </div> <div class="col-sm-8"> - <p class="mb-1"><b><%= feed.title %> (<%= feed.key %>)</b></p> + <p class="mb-1"><b><%= feed.author %> (<%= feed.title %>)</b></p> <div style="color:#777;"> <p style="margin-bottom:5px;"><%= feed.auto_url.gsub('https://', '').gsub('http://', '') %> </p> <% if !feed.updated.nil? %> <p style="margin-bottom:5px;">Last update: <%= feed.updated.strftime('%B %d') %></p> <% end %> - <p style="margin-bottom:5px;">Posts: <%= site.items.select { |i| i.feed.key == feed.key }.length() %></p> + <p style="margin-bottom:5px;">Posts: <%= site.items.select { |i| i.feed.author == feed.author }.length() %></p> </div> </div> diff --git a/tyrian.html.erb b/tyrian.html.erb index 90c0fce..8be15a5 100644 --- a/tyrian.html.erb +++ b/tyrian.html.erb @@ -134,6 +134,7 @@ ItemCursor.new(items).each do |item, new_date, new_feed| %> + <% if item.feed.location == "planet" %> <% if new_date %> <div class="page-header article-view mt-5" data-date="<%= item.published.strftime('%Y-%m-%d') %>" data-location="<%= item.feed.location %>" style="border-bottom: none!important;padding-bottom: 0px!important;"> <h1><%= item.published.strftime('%B %d') %> @@ -152,7 +153,7 @@ </div> <div class="mb-1 text-muted" style=""> <span style="margin-right:2px;"> - <%= item.feed.title %> (<%= item.feed.key %>) + <%= item.feed.author %> (<%= item.feed.title %>) </span> <span style="">•</span> <span style="font-weight: normal;margin-left:2px;"> @@ -176,7 +177,7 @@ </div> <div class="row"> - <div class="col-sm-11"> + <div class="col-sm-12"> <div class="card article-view mt-2" data-date="<%= item.published.strftime('%Y-%m-%d') %>" data-location="<%= item.feed.location %>" style="margin-top:20px;"> <div class="card-body px-5"> <div class="row mb-3 mt-3"> @@ -234,6 +235,7 @@ </div> <% end %><!-- each item --> + <% end %><!-- each item --> </div> |