fix table alignment

This commit is contained in:
2022-11-17 22:16:46 -05:00
parent ba36b4e4c5
commit ba5a4e69b2
4 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,4 @@
<div id={@id} class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-black">
<div id={@id} class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-white">
<table class="min-w-full table-auto text-center bg-white">
<thead class="border-b border-primary-600">
<tr>
@ -11,21 +11,22 @@
phx-value-sort-key={key}
phx-target={@myself}
>
<span class="underline"><%= label %></span>
<i class="w-0 float-right fas fa-sm fa-chevron-up opacity-0"></i>
<span class={if @last_sort_key == key, do: "underline"}><%= label %></span>
<%= if @last_sort_key == key do %>
<%= case @sort_mode do %>
<% :asc -> %>
<i class="fas fa-sm fa-chevron-down"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-down"></i>
<% :desc -> %>
<i class="fas fa-sm fa-chevron-up"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-up"></i>
<% end %>
<% else %>
<i class="fas fa-sm fa-chevron-up opacity-0"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-up opacity-0"></i>
<% end %>
</span>
</th>
<% else %>
<th class={"p-2 #{column[:class]}"}>
<th class={"p-2 cursor-not-allowed #{column[:class]}"}>
<%= label %>
</th>
<% end %>

View File

@ -138,7 +138,7 @@ defmodule CanneryWeb.HomeLive do
target="_blank"
rel="noopener noreferrer"
>
<p>0.7.0</p>
<p>0.7.1</p>
<i class="fas fa-md fa-info-circle"></i>
</.link>
</li>