|
| 1 | +<%= page_header do %> |
| 2 | + <%= t(".dashboard") %> |
| 3 | +<% end %> |
| 4 | + |
| 5 | +<div class="grid grid-cols-2 gap-8 mb-8"> |
| 6 | + <div> |
| 7 | + <p class="my-4"> |
| 8 | + <%= link_to t(".trends"), main_app.content_trends_path, class: "text-xl underline text-blue-400 hover:text-blue-600" %> |
| 9 | + <br> |
| 10 | + <%= t(".trends_hint") %> |
| 11 | + </p> |
| 12 | + |
| 13 | + <p class="my-4"> |
| 14 | + <%= link_to t(".account_search"), main_app.account_search_path, class: "text-xl underline text-blue-400 hover:text-blue-600" %> |
| 15 | + <br> |
| 16 | + <%= t(".account_search_hint") %> |
| 17 | + </p> |
| 18 | + </div> |
| 19 | + |
| 20 | + <div class="border border-gray-100 shadow p-4"> |
| 21 | + <table class="w-full"> |
| 22 | + <tbody> |
| 23 | + <tr class="hover:bg-blue-100"> |
| 24 | + <th class="text-left"><%= t(".indexed_accounts") %></th> |
| 25 | + <td><%= Actor.count %> (<%= Actor.discoverable.count %>)</td> |
| 26 | + </tr> |
| 27 | + <tr class="bg-stone-100 hover:bg-blue-100"> |
| 28 | + <th class="text-left"><%= t(".indexed_content_objects") %></th> |
| 29 | + <td><%= ContentObject.count %></td> |
| 30 | + </tr> |
| 31 | + <tr class="hover:bg-blue-100"> |
| 32 | + <th class="text-left"><%= t(".known_hashtags") %></th> |
| 33 | + <td><%= Hashtag.count %></td> |
| 34 | + </tr> |
| 35 | + <tr class="bg-stone-100 hover:bg-blue-100"> |
| 36 | + <th class="text-left"><%= t(".known_links") %></th> |
| 37 | + <td><%= Link.count %></td> |
| 38 | + </tr> |
| 39 | + <tr class="hover:bg-blue-100"> |
| 40 | + <th class="text-left"><%= t(".available_trends_data") %></th> |
| 41 | + <td><%= time_ago_in_words(ContentActivity.minimum(:hour_of_activity)) %></td> |
| 42 | + <tr> |
| 43 | + </tbody> |
| 44 | + </table> |
| 45 | + </div> |
| 46 | +</div> |
| 47 | + |
| 48 | +<div class="grid grid-cols-3 gap-8"> |
| 49 | + <div class="border border-gray-100 shadow p-4"> |
| 50 | + <h3 class="font-bold mb-4"><%= t(".trending_hashtags") %></h3> |
| 51 | + <ol class="list-decimal list-inside"> |
| 52 | + <% Hashtag.trending(limit: 5).each do |hashtag| %> |
| 53 | + <li class="my-2 even:bg-stone-100"> |
| 54 | + <span class="text-blue-400">#</span><%= hashtag.name %> |
| 55 | + </li> |
| 56 | + <% end %> |
| 57 | + </ol> |
| 58 | + </div> |
| 59 | + |
| 60 | + <div class="border border-gray-100 shadow p-4"> |
| 61 | + <h3 class="font-bold mb-4"><%= t(".trending_links") %></h3> |
| 62 | + <ol class="list-decimal list-inside"> |
| 63 | + <% Link.trending(limit: 5).each do |link| %> |
| 64 | + <li class="my-2 even:bg-stone-100"> |
| 65 | + <%= link_to truncate(link.url), link, target: "_blank", class: "underline text-blue-400 hover:text-blue-600" %> |
| 66 | + </li> |
| 67 | + <% end %> |
| 68 | + </ol> |
| 69 | + </div> |
| 70 | + |
| 71 | + <div class="border border-gray-100 shadow p-4"> |
| 72 | + <h3 class="font-bold mb-4"><%= t(".trending_content") %></h3> |
| 73 | + <ol class="list-decimal list-inside"> |
| 74 | + <% ContentObject.trending(limit: 5).each do |content_object| %> |
| 75 | + <li class="my-2 even:bg-stone-100"> |
| 76 | + <%= link_to truncate(content_object.uri), content_object.uri, target: "_blank", class: "underline text-blue-400 hover:text-blue-600" %> |
| 77 | + </li> |
| 78 | + <% end %> |
| 79 | + </ol> |
| 80 | + </div> |
| 81 | +</div> |
0 commit comments