make app responsive
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
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"
|
||||
>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
<div class="invalid-feedback col-span-3 text-center">
|
||||
|
@ -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("Ammo") %>
|
||||
</h1>
|
||||
|
||||
<%= if @ammo_groups |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-500">
|
||||
<%= gettext("No Ammo") %> <%= display_emoji("😔") %>
|
||||
<%= gettext("No Ammo") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
|
||||
<%= live_patch(dgettext("actions", "Add your first box!"),
|
||||
@ -35,7 +36,7 @@
|
||||
<%= gettext("Notes") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Staging") %>
|
||||
<%= gettext("Staged for Range") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Container") %>
|
||||
@ -75,7 +76,7 @@
|
||||
phx-click="toggle_staged"
|
||||
phx-value-ammo_group_id={ammo_group.id}
|
||||
>
|
||||
<%= if ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
|
||||
<%= if ammo_group.staged, do: gettext("Unstage"), else: gettext("Stage") %>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
@ -88,7 +89,7 @@
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
|
||||
<td class="p-2">
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<%= live_redirect to: Routes.ammo_group_show_path(@socket, :show, ammo_group),
|
||||
class: "text-primary-500 link" do %>
|
||||
|
@ -24,25 +24,25 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex space-x-4 justify-center items-center text-primary-500">
|
||||
<div class="flex flex-wrap justify-center items-center text-primary-500">
|
||||
<%= live_patch(dgettext("actions", "Ammo Details"),
|
||||
to: Routes.ammo_type_show_path(Endpoint, :show, @ammo_group.ammo_type),
|
||||
class: "btn btn-primary"
|
||||
class: "mx-4 my-2 btn btn-primary"
|
||||
) %>
|
||||
|
||||
<%= live_patch to: Routes.ammo_group_show_path(Endpoint, :edit, @ammo_group),
|
||||
class: "text-primary-500 link" do %>
|
||||
class: "mx-4 my-2 text-primary-500 link" do %>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
<% end %>
|
||||
|
||||
<%= link to: "#",
|
||||
class: "text-primary-500 link",
|
||||
class: "mx-4 my-2 text-primary-500 link",
|
||||
phx_click: "delete",
|
||||
data: [confirm: dgettext("prompts", "Are you sure you want to delete this ammo?")] do %>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
<% end %>
|
||||
|
||||
<button type="button" class="btn btn-primary" phx-click="toggle_staged">
|
||||
<button type="button" class="mx-4 my-2 btn btn-primary" phx-click="toggle_staged">
|
||||
<%= if @ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
|
||||
</button>
|
||||
|
||||
|
Reference in New Issue
Block a user