improve more card styles

This commit is contained in:
2022-12-03 22:09:32 -05:00
parent faacf80b51
commit ef0d644ee3
31 changed files with 103 additions and 101 deletions

View File

@ -23,7 +23,7 @@ defmodule CanneryWeb.Components.ContainerCard do
~H"""
<div
id={"container-#{@container.id}"}
class="overflow-hidden max-w-full mx-4 mb-2 px-8 py-4 flex flex-col justify-center items-center space-y-4
class="overflow-hidden max-w-full mx-4 mb-4 px-8 py-4 flex flex-col justify-center items-center space-y-4
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
transition-all duration-300 ease-in-out"
>

View File

@ -13,7 +13,7 @@ defmodule CanneryWeb.Components.TagCard do
~H"""
<div
id={"tag-#{@tag.id}"}
class="mx-4 mb-2 px-8 py-4 space-x-4 flex justify-center items-center
class="mx-4 mb-4 px-8 py-4 space-x-4 flex justify-center items-center
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
transition-all duration-300 ease-in-out"
>

View File

@ -184,7 +184,7 @@
</:container>
</.live_component>
<% else %>
<div class="flex flex-wrap justify-center items-center">
<div class="flex flex-wrap justify-center items-stretch">
<%= for ammo_group <- @ammo_groups do %>
<.ammo_group_card ammo_group={ammo_group} show_container={true} />
<% end %>

View File

@ -133,7 +133,7 @@
</:ammo_type>
</.live_component>
<% else %>
<div class="flex flex-wrap justify-center items-center">
<div class="flex flex-wrap justify-center items-stretch">
<%= for ammo_group <- @ammo_groups do %>
<.ammo_group_card ammo_group={ammo_group} />
<% end %>

View File

@ -18,7 +18,7 @@
</.link>
<% end %>
<div class="w-full flex flex-row flex-wrap justify-center items-center">
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
<%= for invite <- @invites do %>
<.invite_card invite={invite}>
<:code_actions>
@ -91,7 +91,7 @@
<%= gettext("Admins") %>
</h1>
<div class="w-full flex flex-row flex-wrap justify-center items-center">
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
<%= for admin <- @admins do %>
<.user_card user={admin}>
<.link
@ -121,7 +121,7 @@
<%= gettext("Users") %>
</h1>
<div class="w-full flex flex-row flex-wrap justify-center items-center">
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
<%= for user <- @users do %>
<.user_card user={user}>
<.link

View File

@ -17,28 +17,30 @@
<%= dgettext("actions", "Stage ammo") %>
</.link>
<%= for ammo_group <- @ammo_groups do %>
<.ammo_group_card ammo_group={ammo_group}>
<button
type="button"
class="btn btn-primary"
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
data-confirm={"#{dgettext("prompts", "Are you sure you want to unstage this ammo?")}"}
>
<%= if ammo_group.staged,
do: dgettext("actions", "Unstage from range"),
else: dgettext("actions", "Stage for range") %>
</button>
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
<%= for ammo_group <- @ammo_groups do %>
<.ammo_group_card ammo_group={ammo_group}>
<button
type="button"
class="btn btn-primary"
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
data-confirm={"#{dgettext("prompts", "Are you sure you want to unstage this ammo?")}"}
>
<%= if ammo_group.staged,
do: dgettext("actions", "Unstage from range"),
else: dgettext("actions", "Stage for range") %>
</button>
<.link
patch={Routes.range_index_path(Endpoint, :add_shot_group, ammo_group)}
class="btn btn-primary"
>
<%= dgettext("actions", "Record shots") %>
</.link>
</.ammo_group_card>
<% end %>
<.link
patch={Routes.range_index_path(Endpoint, :add_shot_group, ammo_group)}
class="btn btn-primary"
>
<%= dgettext("actions", "Record shots") %>
</.link>
</.ammo_group_card>
<% end %>
</div>
<% end %>
<hr class="hr" />

View File

@ -44,7 +44,7 @@
<%= display_emoji("😔") %>
</h2>
<% else %>
<div class="flex flex-row flex-wrap justify-center items-center">
<div class="flex flex-row flex-wrap justify-center items-stretch">
<%= for tag <- @tags do %>
<.tag_card tag={tag}>
<.link