improve container card style

This commit is contained in:
shibao 2022-12-03 21:56:14 -05:00
parent 7a7754767f
commit faacf80b51
14 changed files with 77 additions and 79 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 my-2 px-8 py-4 flex flex-col justify-center items-center space-y-4
class="overflow-hidden max-w-full mx-4 mb-2 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

@ -42,7 +42,6 @@
</div>
<% end %>
<div class="w-full flex flex-row flex-wrap justify-center items-center">
<%= if @containers |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-600">
<%= gettext("No containers") %>
@ -90,9 +89,7 @@
phx-click="delete"
phx-value-id={container.id}
data-confirm={
dgettext("prompts", "Are you sure you want to delete %{name}?",
name: container.name
)
dgettext("prompts", "Are you sure you want to delete %{name}?", name: container.name)
}
data-qa={"delete-#{container.id}"}
>
@ -101,6 +98,7 @@
</:actions>
</.live_component>
<% else %>
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
<%= for container <- @containers do %>
<.container_card container={container}>
<:tag_actions>
@ -145,9 +143,9 @@
</.link>
</.container_card>
<% end %>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
</div>
<%= if @live_action in [:new, :edit, :clone] do %>

View File

@ -294,7 +294,7 @@ msgid "No ammo for this type"
msgstr "Keine Munition dieser Art"
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr "Kein Behälter"

View File

@ -82,8 +82,8 @@ msgstr ""
"Sind Sie sicher, dass sie %{email} löschen möchten? Dies kann nicht "
"zurückgenommen werden!"
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format

View File

@ -279,7 +279,7 @@ msgid "No ammo for this type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr ""

View File

@ -280,7 +280,7 @@ msgid "No ammo for this type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr ""

View File

@ -68,8 +68,8 @@ msgstr ""
msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format

View File

@ -294,7 +294,7 @@ msgid "No ammo for this type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr ""

View File

@ -82,8 +82,8 @@ msgstr ""
msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr "Está seguro que desea eliminar %{email}? Esta acción es permanente!"
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format

View File

@ -294,7 +294,7 @@ msgid "No ammo for this type"
msgstr "Aucune munition pour ce type"
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr "Aucun conteneur"

View File

@ -83,8 +83,8 @@ msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
"Êtes-vous certain·e de supprimer %{email}? Cette action est définitive!"
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format

View File

@ -290,7 +290,7 @@ msgid "No ammo for this type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:8
#: lib/cannery_web/live/container_live/index.html.heex:48
#: lib/cannery_web/live/container_live/index.html.heex:47
#, elixir-autogen, elixir-format
msgid "No containers"
msgstr ""

View File

@ -78,8 +78,8 @@ msgstr ""
msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format

View File

@ -67,8 +67,8 @@ msgstr ""
msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:93
#: lib/cannery_web/live/container_live/index.html.heex:138
#: lib/cannery_web/live/container_live/index.html.heex:92
#: lib/cannery_web/live/container_live/index.html.heex:136
#: lib/cannery_web/live/container_live/show.html.heex:59
#: lib/cannery_web/live/tag_live/index.html.heex:64
#, elixir-autogen, elixir-format