<%= if @current_user do %>
- - <%= @current_user.email %>
+ - <%= @current_user.email %>
- <%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %>
- <%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %>
<% else %>
diff --git a/friends/lib/friends_web/templates/user_session/new.html.heex b/friends/lib/friends_web/templates/user_session/new.html.heex
index 49a7d79..d36ae3f 100644
--- a/friends/lib/friends_web/templates/user_session/new.html.heex
+++ b/friends/lib/friends_web/templates/user_session/new.html.heex
@@ -6,19 +6,23 @@
<%= @error_message %>
<% end %>
-
- <%= label f, :email %>
- <%= email_input f, :email, required: true %>
-
- <%= label f, :password %>
- <%= password_input f, :password, required: true %>
-
- <%= label f, :remember_me, "Keep me logged in for 60 days" %>
- <%= checkbox f, :remember_me %>
-
-
- <%= submit "Log in" %>
-
+
+ -
+ <%= label f, :email, class: "w-1/3" %>
+ <%= email_input f, :email, required: true %>
+
+ -
+ <%= label f, :password, class: "w-1/3" %>
+ <%= password_input f, :password, required: true %>
+
+ -
+ <%= label f, :remember_me, "Keep me logged in for 60 days", class: "w-fit" %>
+ <%= checkbox f, :remember_me %>
+
+ -
+ <%= submit "Log in", class: "btn btn-primary" %>
+
+
diff --git a/friends/lib/friends_web/templates/user_settings/edit.html.heex b/friends/lib/friends_web/templates/user_settings/edit.html.heex
index 9863bc5..64fd4dc 100644
--- a/friends/lib/friends_web/templates/user_settings/edit.html.heex
+++ b/friends/lib/friends_web/templates/user_settings/edit.html.heex
@@ -1,53 +1,78 @@
Settings
-Change email
+
+ <.form
+ let={f}
+ for={@email_changeset}
+ action={Routes.user_settings_path(@conn, :update)}
+ id="update_email"
+ class="w-max"
+ >
+ <%= if @email_changeset.action do %>
+
+
Oops, something went wrong! Please check the errors below.
+
+ <% end %>
-<.form let={f} for={@email_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_email">
- <%= if @email_changeset.action do %>
-
-
Oops, something went wrong! Please check the errors below.
-
- <% end %>
+ <%= hidden_input f, :action, name: "action", value: "update_email" %>
- <%= hidden_input f, :action, name: "action", value: "update_email" %>
- <%= label f, :email %>
- <%= email_input f, :email, required: true %>
- <%= error_tag f, :email %>
+
Change email
+
- <%= label f, :current_password, for: "current_password_for_email" %>
- <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email" %>
- <%= error_tag f, :current_password %>
+ -
+ <%= label f, :email, class: "w-1/3" %>
+ <%= email_input f, :email, required: true %>
+ <%= error_tag f, :email %>
+
+ -
+ <%= label f, :current_password, for: "current_password_for_email", class: "w-1/3" %>
+ <%= password_input f, :password, required: true %>
+ <%= error_tag f, :current_password %>
+
+ -
+ <%= submit "Change email", class: "btn btn-primary" %>
+
+
+
-
- <%= submit "Change email" %>
-
-
+ <.form
+ let={f}
+ for={@password_changeset}
+ action={Routes.user_settings_path(@conn, :update)}
+ id="update_password"
+ class="w-max"
+ >
+
+
Change password
+
+
+ <%= if @password_changeset.action do %>
+
+
Oops, something went wrong! Please check the errors below.
+
+ <% end %>
-Change password
+ <%= hidden_input f, :action, name: "action", value: "update_password" %>
-<.form let={f} for={@password_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_password">
- <%= if @password_changeset.action do %>
-
-
Oops, something went wrong! Please check the errors below.
-
- <% end %>
-
- <%= hidden_input f, :action, name: "action", value: "update_password" %>
-
- <%= label f, :password, "New password" %>
- <%= password_input f, :password, required: true %>
- <%= error_tag f, :password %>
-
- <%= label f, :password_confirmation, "Confirm new password" %>
- <%= password_input f, :password_confirmation, required: true %>
- <%= error_tag f, :password_confirmation %>
-
- <%= label f, :current_password, for: "current_password_for_password" %>
- <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %>
- <%= error_tag f, :current_password %>
-
-
- <%= submit "Change password" %>
-
-
+ -
+ <%= label f, :current_password, for: "current_password_for_password", class: "w-1/3" %>
+ <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %>
+ <%= error_tag f, :current_password %>
+
+ -
+ <%= label f, :password, "New password", class: "w-1/3" %>
+ <%= password_input f, :password, required: true, class: "shrink-0" %>
+ <%= error_tag f, :password %>
+
+ -
+ <%= label f, :password_confirmation, "Confirm new password", class: "w-1/3" %>
+ <%= password_input f, :password_confirmation, required: true %>
+ <%= error_tag f, :password_confirmation %>
+
+ -
+ <%= submit "Change password", class: "btn btn-primary" %>
+
+
+
+
\ No newline at end of file