From ddfab312f73a3f3e15ceb6fec7d350500adb53d6 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Thu, 14 Apr 2022 00:18:01 -0600 Subject: Update UI --- .../templates/layout/_user_menu.html.heex | 21 ++++--- lib/aggiedit_web/templates/layout/root.html.heex | 47 ++++++++++----- lib/aggiedit_web/templates/page/index.html.heex | 67 +++++++++------------- .../templates/user_confirmation/edit.html.heex | 6 +- .../templates/user_confirmation/new.html.heex | 12 ++-- .../templates/user_registration/new.html.heex | 30 ++++++---- .../templates/user_reset_password/edit.html.heex | 22 ++++--- .../templates/user_session/new.html.heex | 27 +++++---- .../templates/user_settings/edit.html.heex | 50 ++++++++++------ 9 files changed, 160 insertions(+), 122 deletions(-) (limited to 'lib/aggiedit_web/templates') diff --git a/lib/aggiedit_web/templates/layout/_user_menu.html.heex b/lib/aggiedit_web/templates/layout/_user_menu.html.heex index f281cfc..4ab3b78 100644 --- a/lib/aggiedit_web/templates/layout/_user_menu.html.heex +++ b/lib/aggiedit_web/templates/layout/_user_menu.html.heex @@ -1,10 +1,15 @@ - + + +<% end %> \ No newline at end of file diff --git a/lib/aggiedit_web/templates/layout/root.html.heex b/lib/aggiedit_web/templates/layout/root.html.heex index 014c44a..3fb7d93 100644 --- a/lib/aggiedit_web/templates/layout/root.html.heex +++ b/lib/aggiedit_web/templates/layout/root.html.heex @@ -5,24 +5,43 @@ <%= csrf_meta_tag() %> - <%= live_title_tag assigns[:page_title] || "Aggiedit", suffix: " ยท Phoenix Framework" %> + <%= live_title_tag assigns[:page_title] || "Aggiedit" %> + + + - +
-
- -
+
- <%= @inner_content %> +
+ <%= @inner_content %> +
diff --git a/lib/aggiedit_web/templates/page/index.html.heex b/lib/aggiedit_web/templates/page/index.html.heex index f844bd8..f2d2128 100644 --- a/lib/aggiedit_web/templates/page/index.html.heex +++ b/lib/aggiedit_web/templates/page/index.html.heex @@ -1,41 +1,26 @@ -
-

<%= gettext "Welcome to %{name}!", name: "Phoenix" %>

-

Peace of mind from prototype to production

-
- -
- - -
+
+

+ Welcome to AggiEdit! +

+
+
+

+ How does it work? +

+

+ AggiEdit is a Reddit clone, but "sub-aggies" are only available to other users that share the same domain name in the email as yourself. + For example, if you sign up with your email address "joe@mailinator.com" you are assigned to the sub-aggie "mailinator.com". +
+ In a sub-aggie, you can create posts with a title, a body, and an attachment. Posts are visible to everyone in your sub-aggie, and a realtime + chat-room is created for each post in the sub-aggie to discuss that post. +

+ <%= if !@current_user do %> +

+ Get started by <%= link "registering", to: Routes.user_registration_path(@conn, :new) %> to be able to view posts in your sub-aggie! +

+ <% else %> +

+ You are signed in! <%= link "Visit your sub-aggie!", to: "/room/#{@current_user.room_id}" %> +

+ <% end %> +
\ No newline at end of file diff --git a/lib/aggiedit_web/templates/user_confirmation/edit.html.heex b/lib/aggiedit_web/templates/user_confirmation/edit.html.heex index e9bf443..efc4739 100644 --- a/lib/aggiedit_web/templates/user_confirmation/edit.html.heex +++ b/lib/aggiedit_web/templates/user_confirmation/edit.html.heex @@ -1,11 +1,11 @@

Confirm account

<.form let={_f} for={:user} action={Routes.user_confirmation_path(@conn, :update, @token)}> -
- <%= submit "Confirm my account" %> +
+ <%= submit "Confirm my account", class: "btn btn-primary" %>
- +

<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> diff --git a/lib/aggiedit_web/templates/user_confirmation/new.html.heex b/lib/aggiedit_web/templates/user_confirmation/new.html.heex index 4d9bee3..7cabce3 100644 --- a/lib/aggiedit_web/templates/user_confirmation/new.html.heex +++ b/lib/aggiedit_web/templates/user_confirmation/new.html.heex @@ -1,14 +1,16 @@

Resend confirmation instructions

<.form let={f} for={:user} action={Routes.user_confirmation_path(@conn, :create)}> - <%= label f, :email %> - <%= email_input f, :email, required: true %> +
+ <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> +
-
- <%= submit "Resend confirmation instructions" %> +
+ <%= submit "Resend confirmation instructions", class: "btn btn-primary" %>
- +

<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> diff --git a/lib/aggiedit_web/templates/user_registration/new.html.heex b/lib/aggiedit_web/templates/user_registration/new.html.heex index 6ff00fc..6aa8df1 100644 --- a/lib/aggiedit_web/templates/user_registration/new.html.heex +++ b/lib/aggiedit_web/templates/user_registration/new.html.heex @@ -7,23 +7,29 @@

<% end %> - <%= label f, :email %> - <%= email_input f, :email, required: true %> - <%= error_tag f, :email %> +
+ <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + <%= error_tag f, :email %> +
- <%= label f, :username %> - <%= text_input f, :username, required: true %> - <%= error_tag f, :username %> +
+ <%= label f, :username %> + <%= text_input f, :username, required: true, class: "form-control" %> + <%= error_tag f, :username %> +
- <%= label f, :password %> - <%= password_input f, :password, required: true %> - <%= error_tag f, :password %> +
+ <%= label f, :password %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= error_tag f, :password %> +
-
- <%= submit "Register" %> +
+ <%= submit "Register", class: "btn btn-primary" %>
- +

<%= link "Log in", to: Routes.user_session_path(@conn, :new) %> | <%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %> diff --git a/lib/aggiedit_web/templates/user_reset_password/edit.html.heex b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex index d8efb4b..cac89e5 100644 --- a/lib/aggiedit_web/templates/user_reset_password/edit.html.heex +++ b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex @@ -7,19 +7,23 @@

<% end %> - <%= label f, :password, "New password" %> - <%= password_input f, :password, required: true %> - <%= error_tag f, :password %> +
+ <%= label f, :password, "New Password" %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= 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, :password_confirmation, "Confirm new password" %> + <%= password_input f, :password_confirmation, required: true, class: "form-control" %> + <%= error_tag f, :password_confirmation %> +
-
- <%= submit "Reset password" %> +
+ <%= submit "Reset password", class: "btn btn-primary" %>
- +

<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> diff --git a/lib/aggiedit_web/templates/user_session/new.html.heex b/lib/aggiedit_web/templates/user_session/new.html.heex index 49a7d79..46287e3 100644 --- a/lib/aggiedit_web/templates/user_session/new.html.heex +++ b/lib/aggiedit_web/templates/user_session/new.html.heex @@ -7,20 +7,25 @@

<% 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 %> + <%= email_input f, :email, required: true, class: "form-control" %> +
+
+ <%= label f, :password %> + <%= password_input f, :password, required: true, class: "form-control" %> +
+
+ <%= label f, :remember_me, "Keep me logged in for 60 days" %> + <%= checkbox f, :remember_me, class: "form-check-input" %> +
+
+ <%= submit "Log in", class: "btn btn-primary" %>
+
+

<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | <%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %> diff --git a/lib/aggiedit_web/templates/user_settings/edit.html.heex b/lib/aggiedit_web/templates/user_settings/edit.html.heex index 9863bc5..f414e0b 100644 --- a/lib/aggiedit_web/templates/user_settings/edit.html.heex +++ b/lib/aggiedit_web/templates/user_settings/edit.html.heex @@ -11,19 +11,25 @@ <%= hidden_input f, :action, name: "action", value: "update_email" %> - <%= label f, :email %> - <%= email_input f, :email, required: true %> - <%= error_tag f, :email %> +

+ <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + <%= error_tag f, :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, :current_password, for: "current_password_for_email" %> + <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email", class: "form-control" %> + <%= error_tag f, :current_password %> +
-
- <%= submit "Change email" %> +
+ <%= submit "Change email", class: "btn btn-primary" %>
+
+

Change password

<.form let={f} for={@password_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_password"> @@ -35,19 +41,25 @@ <%= 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, "New password" %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= 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, :password_confirmation, "Confirm new password" %> + <%= password_input f, :password_confirmation, required: true, class: "form-control" %> + <%= 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 %> +
+ <%= label f, :current_password, for: "current_password_for_password" %> + <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password", class: "form-control" %> + <%= error_tag f, :current_password %> +
-
- <%= submit "Change password" %> +
+ <%= submit "Change password", class: "btn btn-primary" %>
-- cgit v1.2.3-70-g09d2