fix for global activity

This commit is contained in:
Kyle Drake 2023-05-21 10:19:03 -05:00
parent 10a6e1634f
commit 2bd0d8d35b

View file

@ -10,21 +10,23 @@
<script src="/js/news/event.js"></script> <script src="/js/news/event.js"></script>
<script src="/js/news/site.js"></script> <script src="/js/news/site.js"></script>
<% follow_events = site.newest_follows %> <% if defined?(site) %>
<% unless follow_events.empty? %> <% follow_events = site.newest_follows %>
<div class="news-item follow"> <% unless follow_events.empty? %>
<div class="icon"><a href="/site/<%= site.username %>" title="<%= site.username %>" class="avatar" style="background-image: url(<%= site.screenshot_url 'index.html', '50x50' %>);"></a></div> <div class="news-item follow">
<div class="icon"><a href="/site/<%= site.username %>" title="<%= site.username %>" class="avatar" style="background-image: url(<%= site.screenshot_url 'index.html', '50x50' %>);"></a></div>
<div class="text"> <div class="text">
<strong>New Followers</strong> <strong>New Followers</strong>
</div> </div>
<div class="content"> <div class="content">
<% follow_events.first.site.newest_follows.each_with_index do |event,i| %> <% follow_events.first.site.newest_follows.each_with_index do |event,i| %>
<a href="/site/<%= event.actioning_site.username %>" class="user" title="<%= event.actioning_site.title %>"><i class="fa fa-user"><% if event.actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event.actioning_site.username %></a><% unless follow_events.length == i+1 %>, <% end %> <a href="/site/<%= event.actioning_site.username %>" class="user" title="<%= event.actioning_site.title %>"><i class="fa fa-user"><% if event.actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event.actioning_site.username %></a><% unless follow_events.length == i+1 %>, <% end %>
<% end %> <% end %>
</div>
</div> </div>
</div> <% end %>
<% end %> <% end %>
<% events.each do |event| %> <% events.each do |event| %>