analytics/lib/plausible_web/templates/stats/referrer_drilldown.html.eex

23 lines
1.0 KiB
Elixir
Raw Normal View History

2019-09-02 14:29:19 +03:00
<header class="modal__header">
<%= link("← All referrers", to: "/#{@site.domain}/referrers" <> query_params(@query), "data-pushstate": true, class: "font-bold text-grey-darker hover:underline") %>
<button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
</header>
<div class="my-4 border-b border-grey-light"></div>
<main class="modal__content mt-0">
<h1><%= @total_visitors %> new visitors from <%= @referrer %></h1>
<h1 class="text-grey-darker" style="transform: translateY(-1rem);"><%= timeframe_to_human(@query) %></h1>
<div class="mt-4">
<%= for {one_referrer, count} <- @referrers do %>
<div class="flex items-center justify-between my-2">
<%= if one_referrer do %>
<span><%= link(one_referrer, to: "//" <> one_referrer, target: "_blank", class: "hover:underline") %></span>
<% else %>
<span>unknown</span>
<% end %>
<span title="<%= count %>"><%= large_number_format(count) %></span>
</div>
<%= bar(count, @referrers) %>
<% end %>
</div>
</main>