fix grids having uneven margins in phone mode

This commit is contained in:
shibao 2022-02-20 20:28:42 -05:00
parent dc209fa192
commit 968abd04ee
2 changed files with 26 additions and 26 deletions

View File

@ -18,34 +18,34 @@
</div>
<% end %>
<%= label(f, :ammo_type_id, gettext("Ammo type"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :ammo_type_id, gettext("Ammo type"), class: "title text-lg text-primary-600") %>
<%= select(f, :ammo_type_id, ammo_type_options(@ammo_types),
class: "text-center col-span-2 input input-primary"
) %>
<%= error_tag(f, :ammo_type_id, "col-span-3 text-center") %>
<%= label(f, :count, gettext("Count"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count,
class: "text-center col-span-2 input input-primary",
min: 1
) %>
<%= error_tag(f, :count, "col-span-3 text-center") %>
<%= label(f, :price_paid, gettext("Price paid"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :price_paid, gettext("Price paid"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :price_paid,
step: "0.01",
class: "text-center col-span-2 input input-primary"
) %>
<%= error_tag(f, :price_paid, "col-span-3 text-center") %>
<%= label(f, :notes, gettext("Notes"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs"
) %>
<%= error_tag(f, :notes, "col-span-3 text-center") %>
<%= label(f, :container, gettext("Container"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :container, gettext("Container"), class: "title text-lg text-primary-600") %>
<%= select(f, :container_id, container_options(@containers),
class: "text-center col-span-2 input input-primary"
) %>

View File

@ -17,11 +17,11 @@
</div>
<% end %>
<%= label(f, :name, gettext("Name"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :name, class: "text-center col-span-2 input input-primary") %>
<%= error_tag(f, :name, "col-span-3 text-center") %>
<%= label(f, :desc, gettext("Description"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :desc,
class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs"
@ -35,7 +35,7 @@
<%= gettext("Example bullet type abbreviations") %>
</a>
<%= label(f, :bullet_type, gettext("Bullet type"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :bullet_type,
class: "text-center col-span-2 input input-primary",
@ -44,7 +44,7 @@
<%= error_tag(f, :bullet_type, "col-span-3 text-center") %>
<%= label(f, :bullet_core, gettext("Bullet core"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :bullet_core,
class: "text-center col-span-2 input input-primary",
@ -52,14 +52,14 @@
) %>
<%= error_tag(f, :bullet_core, "col-span-3 text-center") %>
<%= label(f, :cartridge, gettext("Cartridge"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :cartridge, gettext("Cartridge"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :cartridge,
class: "text-center col-span-2 input input-primary",
placeholder: "5.56x46mm NATO"
) %>
<%= error_tag(f, :cartridge, "col-span-3 text-center") %>
<%= label(f, :caliber, gettext("Caliber"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :caliber, gettext("Caliber"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :caliber,
class: "text-center col-span-2 input input-primary",
placeholder: ".223"
@ -67,7 +67,7 @@
<%= error_tag(f, :caliber, "col-span-3 text-center") %>
<%= label(f, :case_material, gettext("Case material"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :case_material,
class: "text-center col-span-2 input input-primary",
@ -76,7 +76,7 @@
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
<%= label(f, :jacket_type, gettext("Jacket type"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :jacket_type,
class: "text-center col-span-2 input input-primary",
@ -85,7 +85,7 @@
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
<%= label(f, :muzzle_velocity, gettext("Muzzle velocity"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= number_input(f, :muzzle_velocity,
step: "1",
@ -95,13 +95,13 @@
<%= error_tag(f, :muzzle_velocity, "col-span-3 text-center") %>
<%= label(f, :powder_type, gettext("Powder type"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :powder_type, class: "text-center col-span-2 input input-primary") %>
<%= error_tag(f, :powder_type, "col-span-3 text-center") %>
<%= label(f, :powder_grains_per_charge, gettext("Powder grains per charge"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= number_input(f, :powder_grains_per_charge,
step: "1",
@ -110,7 +110,7 @@
) %>
<%= error_tag(f, :powder_grains_per_charge, "col-span-3 text-center") %>
<%= label(f, :grains, gettext("Grains"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :grains, gettext("Grains"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :grains,
step: "1",
class: "text-center col-span-2 input input-primary",
@ -118,7 +118,7 @@
) %>
<%= error_tag(f, :grains, "col-span-3 text-center") %>
<%= label(f, :pressure, gettext("Pressure"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :pressure, gettext("Pressure"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :pressure,
class: "text-center col-span-2 input input-primary",
placeholder: "+P"
@ -126,7 +126,7 @@
<%= error_tag(f, :pressure, "col-span-3 text-center") %>
<%= label(f, :primer_type, gettext("Primer type"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :primer_type,
class: "text-center col-span-2 input input-primary",
@ -135,7 +135,7 @@
<%= error_tag(f, :primer_type, "col-span-3 text-center") %>
<%= label(f, :firing_type, gettext("Firing type"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :firing_type,
class: "text-center col-span-2 input input-primary",
@ -143,29 +143,29 @@
) %>
<%= error_tag(f, :firing_type, "col-span-3 text-center") %>
<%= label(f, :tracer, gettext("Tracer"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :tracer, gettext("Tracer"), class: "title text-lg text-primary-600") %>
<%= checkbox(f, :tracer, class: "text-center col-span-2 checkbox") %>
<%= error_tag(f, :tracer, "col-span-3 text-center") %>
<%= label(f, :incendiary, gettext("Incendiary"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :incendiary, gettext("Incendiary"), class: "title text-lg text-primary-600") %>
<%= checkbox(f, :incendiary, class: "text-center col-span-2 checkbox") %>
<%= error_tag(f, :incendiary, "col-span-3 text-center") %>
<%= label(f, :blank, gettext("Blank"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :blank, gettext("Blank"), class: "title text-lg text-primary-600") %>
<%= checkbox(f, :blank, class: "text-center col-span-2 checkbox") %>
<%= error_tag(f, :blank, "col-span-3 text-center") %>
<%= label(f, :corrosive, gettext("Corrosive"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :corrosive, gettext("Corrosive"), class: "title text-lg text-primary-600") %>
<%= checkbox(f, :corrosive, class: "text-center col-span-2 checkbox") %>
<%= error_tag(f, :corrosive, "col-span-3 text-center") %>
<%= label(f, :manufacturer, gettext("Manufacturer"),
class: "mr-4 title text-lg text-primary-600"
class: "title text-lg text-primary-600"
) %>
<%= text_input(f, :manufacturer, class: "text-center col-span-2 input input-primary") %>
<%= error_tag(f, :manufacturer, "col-span-3 text-center") %>
<%= label(f, :upc, gettext("UPC"), class: "mr-4 title text-lg text-primary-600") %>
<%= label(f, :upc, gettext("UPC"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :upc, class: "text-center col-span-2 input input-primary") %>
<%= error_tag(f, :upc, "col-span-3 text-center") %>