diff options
Diffstat (limited to 'lib/aggiedit_web/templates')
9 files changed, 160 insertions, 122 deletions
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 @@ -<ul> <%= if @current_user do %> - <li><%= @current_user.email %></li> - <li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li> - <li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li> + <li class="nav-item active"> + <%= link "Settings", to: Routes.user_settings_path(@conn, :edit), class: "nav-link" %> + </li> + <li class="nav-item active"> + <%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "nav-link" %> + </li> <% else %> - <li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li> - <li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li> -<% end %> -</ul> + <li class="nav-item active"> + <%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "nav-link" %> + </li> + <li class="nav-item active"> + <%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "nav-link" %> + </li> +<% 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 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <%= csrf_meta_tag() %> - <%= live_title_tag assigns[:page_title] || "Aggiedit", suffix: " ยท Phoenix Framework" %> + <%= live_title_tag assigns[:page_title] || "Aggiedit" %> <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/> <script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/assets/app.js")}></script> + + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> </head> - <body> + <body class="bg-secondary min-vh-100"> <header> - <section class="container"> - <nav> - <ul> - <li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li> - <%= if function_exported?(Routes, :live_dashboard_path, 2) do %> - <li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li> - <% end %> - </ul> - <%= render "_user_menu.html", assigns %> - </nav> - </section> + <nav class="navbar navbar-expand-md navbar-dark bg-dark"> + <div class="container"> + <a href="/" class="navbar-brand"> + AggiEdit + </a> + <button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" data-bs-target="#toggle"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="navbar-collapse collapse" id="toggle"> + <ul class="navbar-nav"> + <li class="nav-item active"> + <a class="nav-link" href="/">Home</a> + </li> + <%= if @current_user do %> + <li class="nav-item active"> + <%= link "My SubAggie", to: "/room/#{@current_user.room_id}", class: "nav-link" %> + </li> + <% end %> + </ul> + <ul class="navbar-nav ms-auto"> + <%= render "_user_menu.html", assigns %> + </ul> + </div> + </div> + </nav> </header> - <%= @inner_content %> + <div class="container mt-2 bg-light p-2 shadow rounded"> + <%= @inner_content %> + </div> </body> </html> 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 @@ -<section class="phx-hero"> - <h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1> - <p>Peace of mind from prototype to production</p> -</section> - -<section class="row"> - <article class="column"> - <h2>Resources</h2> - <ul> - <li> - <a href="https://hexdocs.pm/phoenix/overview.html">Guides & Docs</a> - </li> - <li> - <a href="https://github.com/phoenixframework/phoenix">Source</a> - </li> - <li> - <a href="https://github.com/phoenixframework/phoenix/blob/v1.6/CHANGELOG.md">v1.6 Changelog</a> - </li> - </ul> - </article> - <article class="column"> - <h2>Help</h2> - <ul> - <li> - <a href="https://elixirforum.com/c/phoenix-forum">Forum</a> - </li> - <li> - <a href="https://web.libera.chat/#elixir">#elixir on Libera Chat (IRC)</a> - </li> - <li> - <a href="https://twitter.com/elixirphoenix">Twitter @elixirphoenix</a> - </li> - <li> - <a href="https://elixir-slackin.herokuapp.com/">Elixir on Slack</a> - </li> - <li> - <a href="https://discord.gg/elixir">Elixir on Discord</a> - </li> - </ul> - </article> -</section> +<div> + <h1> + Welcome to AggiEdit! + </h1> +</div> +<div> + <h3> + How does it work? + </h3> + <p> + 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". + <br> + 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. + </p> + <%= if !@current_user do %> + <p> + Get started by <%= link "registering", to: Routes.user_registration_path(@conn, :new) %> to be able to view posts in your sub-aggie! + </p> + <% else %> + <p> + You are signed in! <%= link "Visit your sub-aggie!", to: "/room/#{@current_user.room_id}" %> + </p> + <% end %> +</div>
\ 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 @@ <h1>Confirm account</h1> <.form let={_f} for={:user} action={Routes.user_confirmation_path(@conn, :update, @token)}> - <div> - <%= submit "Confirm my account" %> + <div class="form-group"> + <%= submit "Confirm my account", class: "btn btn-primary" %> </div> </.form> - +<hr> <p> <%= 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 @@ <h1>Resend confirmation instructions</h1> <.form let={f} for={:user} action={Routes.user_confirmation_path(@conn, :create)}> - <%= label f, :email %> - <%= email_input f, :email, required: true %> + <div class="form-group"> + <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + </div> - <div> - <%= submit "Resend confirmation instructions" %> + <div class="mt-2"> + <%= submit "Resend confirmation instructions", class: "btn btn-primary" %> </div> </.form> - +<hr> <p> <%= 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 @@ </div> <% end %> - <%= label f, :email %> - <%= email_input f, :email, required: true %> - <%= error_tag f, :email %> + <div class="form-group mt-2"> + <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + <%= error_tag f, :email %> + </div> - <%= label f, :username %> - <%= text_input f, :username, required: true %> - <%= error_tag f, :username %> + <div class="form-group mt-2"> + <%= label f, :username %> + <%= text_input f, :username, required: true, class: "form-control" %> + <%= error_tag f, :username %> + </div> - <%= label f, :password %> - <%= password_input f, :password, required: true %> - <%= error_tag f, :password %> + <div class="form-group mt-2"> + <%= label f, :password %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= error_tag f, :password %> + </div> - <div> - <%= submit "Register" %> + <div class="mt-2"> + <%= submit "Register", class: "btn btn-primary" %> </div> </.form> - +<hr> <p> <%= 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 @@ </div> <% end %> - <%= label f, :password, "New password" %> - <%= password_input f, :password, required: true %> - <%= error_tag f, :password %> + <div class="form-group mt-2"> + <%= label f, :password, "New Password" %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= error_tag f, :password %> + </div> - <%= label f, :password_confirmation, "Confirm new password" %> - <%= password_input f, :password_confirmation, required: true %> - <%= error_tag f, :password_confirmation %> + <div class="form-group mt-2"> + <%= label f, :password_confirmation, "Confirm new password" %> + <%= password_input f, :password_confirmation, required: true, class: "form-control" %> + <%= error_tag f, :password_confirmation %> + </div> - <div> - <%= submit "Reset password" %> + <div class="form-group mt-2"> + <%= submit "Reset password", class: "btn btn-primary" %> </div> </.form> - +<hr> <p> <%= 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 @@ </div> <% 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 %> - - <div> - <%= submit "Log in" %> + <div class="form-group"> + <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + </div> + <div class="form-group mt-2"> + <%= label f, :password %> + <%= password_input f, :password, required: true, class: "form-control" %> + </div> + <div class="form-check mt-2"> + <%= label f, :remember_me, "Keep me logged in for 60 days" %> + <%= checkbox f, :remember_me, class: "form-check-input" %> + </div> + <div class="mt-2"> + <%= submit "Log in", class: "btn btn-primary" %> </div> </.form> +<hr> + <p> <%= 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 %> + <div class="form-group"> + <%= label f, :email %> + <%= email_input f, :email, required: true, class: "form-control" %> + <%= error_tag f, :email %> + </div> - <%= 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 %> + <div class="form-group mt-2"> + <%= 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 %> + </div> - <div> - <%= submit "Change email" %> + <div class="mt-2"> + <%= submit "Change email", class: "btn btn-primary" %> </div> </.form> +<hr> + <h3>Change password</h3> <.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 %> + <div class="form-group"> + <%= label f, :password, "New password" %> + <%= password_input f, :password, required: true, class: "form-control" %> + <%= error_tag f, :password %> + </div> - <%= label f, :password_confirmation, "Confirm new password" %> - <%= password_input f, :password_confirmation, required: true %> - <%= error_tag f, :password_confirmation %> + <div class="form-group mt-2"> + <%= label f, :password_confirmation, "Confirm new password" %> + <%= password_input f, :password_confirmation, required: true, class: "form-control" %> + <%= error_tag f, :password_confirmation %> + </div> - <%= 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 %> + <div class="form-group mt-2"> + <%= 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 %> + </div> - <div> - <%= submit "Change password" %> + <div class="mt-2"> + <%= submit "Change password", class: "btn btn-primary" %> </div> </.form> |