Sha256: 228f452ff4bf1abe4f9f93b48812243f8654e345cad386d8f11e14d7693f0061
Contents?: true
Size: 895 Bytes
Versions: 3
Compression:
Stored size: 895 Bytes
Contents
<div class="" data-controller="dashboard"> <%= render Panda::CMS::Admin::ContainerComponent.new do |container| %> <% container.with_heading(text: "Dashboard", level: 1) do |heading| %> <% heading.with_button(action: :add, text: "Add Page", link: new_admin_page_path) %> <% end %> <dl class="grid grid-cols-1 gap-5 mt-5 sm:grid-cols-3"> <%= render Panda::CMS::Admin::StatisticsComponent.new(metric: "Views Today", value: Panda::CMS::Visit.group_by_day(:visited_at, last: 1).count.values.first) %> <%= render Panda::CMS::Admin::StatisticsComponent.new(metric: "Views Last Week", value: Panda::CMS::Visit.group_by_week(:visited_at, last: 1).count.values.first) %> <%= render Panda::CMS::Admin::StatisticsComponent.new(metric: "Views Last Month", value: Panda::CMS::Visit.group_by_month(:visited_at, last: 1).count.values.first) %> </dl> <% end %> </div>
Version data entries
3 entries across 3 versions & 1 rubygems