Remove stats from /mod (#7581)

This commit is contained in:
Andy Zhao 2020-04-28 18:03:08 -04:00 committed by GitHub
parent 566a3e30e9
commit dae409f1a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 23 deletions

View file

@ -1,9 +1,10 @@
@import 'variables';
@import 'mixins';
@import 'config/import';
.mod-index-hero {
margin: 0 auto;
padding: 90px 5px;
padding: $su-7 $su-1;
text-align: center;
background: var(--body-bg);
h1 {

View file

@ -16,28 +16,6 @@
<div class="mod-index-hero">
<h1><%= "#" + @tag.name.titleize if @tag %> Moderators</h1>
<h2>We build the <%= community_qualified_name %></h2>
<div class="mod-index-hero-data-pod">
<div class="mod-index-hero-data-pod-number">
<%= number_with_delimiter(@tag ? Article.cached_tagged_with(@tag).published.where("published_at > ?", 7.days.ago).size : Article.published.where("published_at > ?", 7.days.ago).size) %>
</div>
Posts This Week
</div>
<% plucked_article_ids = Article.cached_tagged_with(@tag).pluck(:id) if @tag %>
<div class="mod-index-hero-data-pod">
<div class="mod-index-hero-data-pod-number">
<%= number_with_delimiter(@tag ? Comment.where(commentable_id: plucked_article_ids).where("created_at > ?", 7.days.ago).size : Comment.where("created_at > ?", 7.days.ago).size) %>
</div>
Comments This Week
</div>
<div class="mod-index-hero-data-pod">
<div class="mod-index-hero-data-pod-number">
<%= number_with_delimiter(@tag ? Reaction.where(reactable_id: plucked_article_ids).where("created_at > ?", 7.days.ago).size : Reaction.where("created_at > ?", 7.days.ago).size) %>
</div>
Reactions This Week
</div>
<div class="mod-index-hero-sub">
<em>Data as of <%= Time.current %></em>
</div>
</div>
<% end %>
<div class="mod-index-header">