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 755e75d..d64f770 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 ec74955..a1b1603 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 031e381..da71ee8 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 f1252ab..88a6993 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 b42c539..896e3c2 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 a6ac5a0..1cdcbc3 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 4d4dc55..68ad924 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 bd5c9a3..27c2fa2 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 d865622..1f6f00a 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 7aec53a..6f51cea 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 2c0b22e..b2a8552 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 08d1525..ddc9cb8 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 32374f4..8e56648 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 a9f1509..aae2fa4 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 b362367..15c77cd 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 749c825..c0f500d 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 a59d6cb..012af7d 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(),