docbrown/app/views/dashboards/_analytics.html.erb
Ben Halpern 9eaff67318
Update styling and refine features for analytics page (#20410)
* Update styling and refine features for analytics page

* Remove follower reference from js

* Update html

* Adjust test
2023-11-30 16:07:16 -05:00

25 lines
1.3 KiB
Text

<% num_views = @page_views_count %>
<div class="grid grid-cols-2 m:grid-cols-3 gap-2 m:gap-4 pt-3">
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= number_with_delimiter(@reactions_count, delimiter: ",") %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.reactions") %></span>
</div>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= number_with_delimiter(@comments_count, delimiter: ",") %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.comments") %></span>
</div>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= num_views > 500 ? number_with_delimiter(num_views, delimiter: ",") : t("views.dashboard.summary.lt_500") %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.views") %></span>
</div>
<%- if Listing.feature_enabled? %>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.listings.size %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.listings") %></span>
</div>
<%- end %>
</div>