From 44fbdd5a69e8a3bf2bdb169347fdb1e83f50ab6c Mon Sep 17 00:00:00 2001 From: Josh Brown Date: Mon, 29 Apr 2024 16:39:33 +0100 Subject: [PATCH] Refactor centering of component --- app/helpers/signups_helper.rb | 4 ++-- app/views/layouts/application.html.erb | 4 +++- app/views/pages/index.html.erb | 4 +++- app/views/signups/_form.html.erb | 5 ++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/helpers/signups_helper.rb b/app/helpers/signups_helper.rb index 1ac5d0ab..5eea6a0f 100644 --- a/app/helpers/signups_helper.rb +++ b/app/helpers/signups_helper.rb @@ -1,7 +1,7 @@ module SignupsHelper - def render_signup_form(centered: false) + def render_signup_form turbo_frame_tag "signup_form" do - render "signups/form", centered: centered + render "signups/form" end end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a33861be..5c614b04 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -42,7 +42,9 @@ <%= yield %> diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb index a0902266..40d25677 100644 --- a/app/views/pages/index.html.erb +++ b/app/views/pages/index.html.erb @@ -9,5 +9,7 @@ OS for your personal finances <%= image_tag("icon-chart.svg", alt: "Chart", class: "inline") %> built by a small team <%= image_tag("icon-team.png", alt: "Maybe Team", class: "inline h-9") %> alongside an incredible community <%= image_tag("icon-discord.svg", alt: "Discord", class: "inline") %> - <%= render_signup_form(centered: true) %> +
+ <%= render_signup_form %> +
diff --git a/app/views/signups/_form.html.erb b/app/views/signups/_form.html.erb index 38305b99..1bbc70bd 100644 --- a/app/views/signups/_form.html.erb +++ b/app/views/signups/_form.html.erb @@ -1,9 +1,8 @@ -<%# locals: (centered: false) -%> <%= form_with( url: signups_path ) do |f| %> -
+
<%= f.email_field :email, placeholder: "Enter your email address", class: "flex-1 border-0 px-2 focus:ring-0 text-sm" %> <%= f.submit "Join waitlist", class: "py-2 px-3 font-medium text-white bg-neutral-900 rounded-lg hover:bg-neutral-800 border border-neutral-900 text-sm" %>
-

">This waitlist is for a hosted version of the app. Don't want to wait? Self-host an early version of Maybe.

+

This waitlist is for a hosted version of the app. Don't want to wait? Self-host an early version of Maybe.

<% end %>