make app responsive

This commit is contained in:
2022-02-15 23:52:44 -05:00
parent 669afd5dcb
commit d6e4090650
35 changed files with 470 additions and 422 deletions

View File

@ -7,7 +7,7 @@
let={f}
for={@changeset}
id="shot-group-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -1,11 +1,12 @@
<div class="mx-8 flex flex-col space-y-8 justify-center items-center">
<div class="flex flex-col space-y-8 justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= gettext("Range day") %>
</h1>
<%= if @ammo_groups |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-500">
<%= gettext("No ammo staged") %> <%= display_emoji("😔") %>
<%= gettext("No ammo staged") %>
<%= display_emoji("😔") %>
</h1>
<%= live_patch(dgettext("actions", "Why not get some ready to shoot?"),
@ -42,7 +43,8 @@
<%= if @shot_groups |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-500">
<%= gettext("No shots recorded") %> <%= display_emoji("😔") %>
<%= gettext("No shots recorded") %>
<%= display_emoji("😔") %>
</h1>
<% else %>
<h1 class="title text-2xl text-primary-500">
@ -89,18 +91,20 @@
</td>
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-500 link" do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-500 link" do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [confirm: dgettext("prompts", "Are you sure you want to delete this shot record?")] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [confirm: dgettext("prompts", "Are you sure you want to delete this shot record?")] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
</td>
</tr>
<% end %>