mirror of
https://github.com/plausible/analytics.git
synced 2024-12-20 16:11:49 +03:00
32 lines
1.4 KiB
Elixir
32 lines
1.4 KiB
Elixir
<div class="container pt-6">
|
|
<div class="pb-5 border-b border-gray-200 flex items-center justify-between">
|
|
<h2 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
|
|
My sites
|
|
</h2>
|
|
<a href="/sites/new" class="button w-full my-2 sm:my-0 sm:w-auto">+ Add a website</a>
|
|
</div>
|
|
|
|
<ul class="my-6 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
<%= for site <- @sites do %>
|
|
<%= link(to: "/" <> URI.encode_www_form(site.domain)) do %>
|
|
<li class="col-span-1 bg-white rounded-lg shadow p-4 hover:shadow-lg cursor-pointer">
|
|
<div class="w-full flex items-center justify-between space-x-4">
|
|
<img src="https://icons.duckduckgo.com/ip3/<%= site.domain %>.ico" referrerpolicy="no-referrer" class="w-4 h-4 flex-shrink-0 mt-px">
|
|
<div class="flex-1 truncate -mt-px">
|
|
<h3 class="text-gray-900 font-medium truncate"><%= site.domain %></h3>
|
|
</div>
|
|
</div>
|
|
<div class="pl-8 mt-2 flex items-center justify-between">
|
|
<span class="text-gray-600 text-sm truncate">
|
|
<span class="text-gray-800">
|
|
<b><%= PlausibleWeb.StatsView.large_number_format(Map.get(@visitors, site.domain, 0)) %></b>
|
|
visitors in last 24h
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|