fix table alignment

This commit is contained in:
shibao 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,7 @@
# v0.7.0
# v0.7.1
- Fix table component alignment and styling
# v0.7.1
- Add shading to table component
- Fix chart to sum by day
- Fix whitespace when copying invite url

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>

View File

@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
def project do
[
app: :cannery,
version: "0.7.0",
version: "0.7.1",
elixir: "1.14.1",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),