From 61829fc04291856b5e4f11cb76fc1001276d18ca Mon Sep 17 00:00:00 2001 From: shibao Date: Sat, 19 Feb 2022 18:06:50 -0500 Subject: [PATCH] fix grid spacing in mobile mode --- CHANGELOG.md | 5 +++-- .../components/add_shot_group_component.html.heex | 2 +- .../live/ammo_group_live/form_component.html.heex | 2 +- lib/cannery_web/live/ammo_type_live/form_component.html.heex | 2 +- .../live/container_live/edit_tags_component.html.heex | 2 +- lib/cannery_web/live/container_live/form_component.html.heex | 2 +- lib/cannery_web/live/home_live.ex | 2 +- lib/cannery_web/live/invite_live/form_component.html.heex | 2 +- lib/cannery_web/live/range_live/form_component.html.heex | 2 +- lib/cannery_web/live/tag_live/form_component.ex | 2 +- lib/cannery_web/templates/user_confirmation/new.html.heex | 2 +- lib/cannery_web/templates/user_registration/new.html.heex | 2 +- lib/cannery_web/templates/user_reset_password/edit.html.heex | 2 +- lib/cannery_web/templates/user_reset_password/new.html.heex | 2 +- lib/cannery_web/templates/user_session/new.html.heex | 2 +- lib/cannery_web/templates/user_settings/edit.html.heex | 4 ++-- mix.exs | 2 +- 17 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 755e75de..d64f7709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -# 0.3.0 -- +# 0.2.1 +- Fix checkbox spacing for mobile view +- Fix spacing with form elements in mobile view # 0.2.0 - Add or remove tags from containers list and details page diff --git a/lib/cannery_web/components/add_shot_group_component.html.heex b/lib/cannery_web/components/add_shot_group_component.html.heex index ec749558..a1b16032 100644 --- a/lib/cannery_web/components/add_shot_group_component.html.heex +++ b/lib/cannery_web/components/add_shot_group_component.html.heex @@ -7,7 +7,7 @@ let={f} for={@changeset} id="shot-group-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" phx-submit="save" diff --git a/lib/cannery_web/live/ammo_group_live/form_component.html.heex b/lib/cannery_web/live/ammo_group_live/form_component.html.heex index 031e3815..da71ee89 100644 --- a/lib/cannery_web/live/ammo_group_live/form_component.html.heex +++ b/lib/cannery_web/live/ammo_group_live/form_component.html.heex @@ -10,7 +10,7 @@ phx-target={@myself} phx-change="validate" phx-submit="save" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" > <%= if @changeset.action && not @changeset.valid? do %>
diff --git a/lib/cannery_web/live/ammo_type_live/form_component.html.heex b/lib/cannery_web/live/ammo_type_live/form_component.html.heex index f1252aba..88a6993d 100644 --- a/lib/cannery_web/live/ammo_type_live/form_component.html.heex +++ b/lib/cannery_web/live/ammo_type_live/form_component.html.heex @@ -9,7 +9,7 @@ phx-target={@myself} phx-change="validate" phx-submit="save" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" > <%= if @changeset.action && not @changeset.valid? do %>
diff --git a/lib/cannery_web/live/container_live/edit_tags_component.html.heex b/lib/cannery_web/live/container_live/edit_tags_component.html.heex index b42c5393..896e3c23 100644 --- a/lib/cannery_web/live/container_live/edit_tags_component.html.heex +++ b/lib/cannery_web/live/container_live/edit_tags_component.html.heex @@ -40,7 +40,7 @@ let={f} for={:tag} id="add-tag-to-container-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-submit="save" > diff --git a/lib/cannery_web/live/container_live/form_component.html.heex b/lib/cannery_web/live/container_live/form_component.html.heex index a6ac5a07..1cdcbc3e 100644 --- a/lib/cannery_web/live/container_live/form_component.html.heex +++ b/lib/cannery_web/live/container_live/form_component.html.heex @@ -6,7 +6,7 @@ let={f} for={@changeset} id="container-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" phx-submit="save" diff --git a/lib/cannery_web/live/home_live.ex b/lib/cannery_web/live/home_live.ex index 4d4dc55c..68ad9242 100644 --- a/lib/cannery_web/live/home_live.ex +++ b/lib/cannery_web/live/home_live.ex @@ -130,7 +130,7 @@ defmodule CanneryWeb.HomeLive do
  • Version:

    - 0.2.0 + 0.2.1

  • diff --git a/lib/cannery_web/live/invite_live/form_component.html.heex b/lib/cannery_web/live/invite_live/form_component.html.heex index bd5c9a38..27c2fa24 100644 --- a/lib/cannery_web/live/invite_live/form_component.html.heex +++ b/lib/cannery_web/live/invite_live/form_component.html.heex @@ -6,7 +6,7 @@ let={f} for={@changeset} id="invite-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" phx-submit="save" diff --git a/lib/cannery_web/live/range_live/form_component.html.heex b/lib/cannery_web/live/range_live/form_component.html.heex index d8656225..1f6f00a1 100644 --- a/lib/cannery_web/live/range_live/form_component.html.heex +++ b/lib/cannery_web/live/range_live/form_component.html.heex @@ -7,7 +7,7 @@ let={f} for={@changeset} id="shot-group-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" phx-submit="save" diff --git a/lib/cannery_web/live/tag_live/form_component.ex b/lib/cannery_web/live/tag_live/form_component.ex index 7aec53a6..6f51ceaa 100644 --- a/lib/cannery_web/live/tag_live/form_component.ex +++ b/lib/cannery_web/live/tag_live/form_component.ex @@ -36,7 +36,7 @@ defmodule CanneryWeb.TagLive.FormComponent do let={f} for={@changeset} id="tag-form" - class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-change="validate" phx-submit="save" diff --git a/lib/cannery_web/templates/user_confirmation/new.html.heex b/lib/cannery_web/templates/user_confirmation/new.html.heex index 2c0b22ef..b2a85529 100644 --- a/lib/cannery_web/templates/user_confirmation/new.html.heex +++ b/lib/cannery_web/templates/user_confirmation/new.html.heex @@ -7,7 +7,7 @@ Routes.user_confirmation_path(@conn, :create), [ class: - "flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %> <%= label(f, :email, class: "title text-lg text-primary-600") %> diff --git a/lib/cannery_web/templates/user_registration/new.html.heex b/lib/cannery_web/templates/user_registration/new.html.heex index 08d15258..ddc9cb81 100644 --- a/lib/cannery_web/templates/user_registration/new.html.heex +++ b/lib/cannery_web/templates/user_registration/new.html.heex @@ -7,7 +7,7 @@ Routes.user_registration_path(@conn, :create), [ class: - "flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %> <%= if @changeset.action && not @changeset.valid? do %> diff --git a/lib/cannery_web/templates/user_reset_password/edit.html.heex b/lib/cannery_web/templates/user_reset_password/edit.html.heex index 32374f4a..8e56648d 100644 --- a/lib/cannery_web/templates/user_reset_password/edit.html.heex +++ b/lib/cannery_web/templates/user_reset_password/edit.html.heex @@ -7,7 +7,7 @@ Routes.user_reset_password_path(@conn, :update, @token), [ class: - "flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %> <%= if @changeset.action && not @changeset.valid? do %> diff --git a/lib/cannery_web/templates/user_reset_password/new.html.heex b/lib/cannery_web/templates/user_reset_password/new.html.heex index a9f1509b..aae2fa4f 100644 --- a/lib/cannery_web/templates/user_reset_password/new.html.heex +++ b/lib/cannery_web/templates/user_reset_password/new.html.heex @@ -7,7 +7,7 @@ Routes.user_reset_password_path(@conn, :create), [ class: - "flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %> <%= label(f, :email, class: "title text-lg text-primary-600") %> diff --git a/lib/cannery_web/templates/user_session/new.html.heex b/lib/cannery_web/templates/user_session/new.html.heex index b3623676..15c77cd8 100644 --- a/lib/cannery_web/templates/user_session/new.html.heex +++ b/lib/cannery_web/templates/user_session/new.html.heex @@ -8,7 +8,7 @@ [ as: :user, class: - "flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %> <%= if @error_message do %> diff --git a/lib/cannery_web/templates/user_settings/edit.html.heex b/lib/cannery_web/templates/user_settings/edit.html.heex index 749c8258..c0f500db 100644 --- a/lib/cannery_web/templates/user_settings/edit.html.heex +++ b/lib/cannery_web/templates/user_settings/edit.html.heex @@ -9,7 +9,7 @@ Routes.user_settings_path(@conn, :update), [ class: - "pb-4 text-center flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %>

    @@ -53,7 +53,7 @@ Routes.user_settings_path(@conn, :update), [ class: - "pb-4 text-center flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" + "flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" ], fn f -> %>

    diff --git a/mix.exs b/mix.exs index a59d6cb8..012af7d9 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Cannery.MixProject do def project do [ app: :cannery, - version: "0.2.0", + version: "0.2.1", elixir: "~> 1.12", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:gettext] ++ Mix.compilers(),