summaryrefslogtreecommitdiff
path: root/lib/aggiedit_web/templates
diff options
context:
space:
mode:
Diffstat (limited to 'lib/aggiedit_web/templates')
-rw-r--r--lib/aggiedit_web/templates/layout/_user_menu.html.heex10
-rw-r--r--lib/aggiedit_web/templates/layout/app.html.heex5
-rw-r--r--lib/aggiedit_web/templates/layout/live.html.heex11
-rw-r--r--lib/aggiedit_web/templates/layout/root.html.heex31
-rw-r--r--lib/aggiedit_web/templates/page/index.html.heex41
-rw-r--r--lib/aggiedit_web/templates/user_confirmation/edit.html.heex12
-rw-r--r--lib/aggiedit_web/templates/user_confirmation/new.html.heex15
-rw-r--r--lib/aggiedit_web/templates/user_registration/new.html.heex30
-rw-r--r--lib/aggiedit_web/templates/user_reset_password/edit.html.heex26
-rw-r--r--lib/aggiedit_web/templates/user_reset_password/new.html.heex15
-rw-r--r--lib/aggiedit_web/templates/user_session/new.html.heex27
-rw-r--r--lib/aggiedit_web/templates/user_settings/edit.html.heex53
12 files changed, 276 insertions, 0 deletions
diff --git a/lib/aggiedit_web/templates/layout/_user_menu.html.heex b/lib/aggiedit_web/templates/layout/_user_menu.html.heex
new file mode 100644
index 0000000..f281cfc
--- /dev/null
+++ b/lib/aggiedit_web/templates/layout/_user_menu.html.heex
@@ -0,0 +1,10 @@
+<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>
+<% 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>
diff --git a/lib/aggiedit_web/templates/layout/app.html.heex b/lib/aggiedit_web/templates/layout/app.html.heex
new file mode 100644
index 0000000..169aed9
--- /dev/null
+++ b/lib/aggiedit_web/templates/layout/app.html.heex
@@ -0,0 +1,5 @@
+<main class="container">
+ <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
+ <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
+ <%= @inner_content %>
+</main>
diff --git a/lib/aggiedit_web/templates/layout/live.html.heex b/lib/aggiedit_web/templates/layout/live.html.heex
new file mode 100644
index 0000000..a29d604
--- /dev/null
+++ b/lib/aggiedit_web/templates/layout/live.html.heex
@@ -0,0 +1,11 @@
+<main class="container">
+ <p class="alert alert-info" role="alert"
+ phx-click="lv:clear-flash"
+ phx-value-key="info"><%= live_flash(@flash, :info) %></p>
+
+ <p class="alert alert-danger" role="alert"
+ phx-click="lv:clear-flash"
+ phx-value-key="error"><%= live_flash(@flash, :error) %></p>
+
+ <%= @inner_content %>
+</main>
diff --git a/lib/aggiedit_web/templates/layout/root.html.heex b/lib/aggiedit_web/templates/layout/root.html.heex
new file mode 100644
index 0000000..f653fd8
--- /dev/null
+++ b/lib/aggiedit_web/templates/layout/root.html.heex
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8"/>
+ <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" %>
+ <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>
+ </head>
+ <body>
+ <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>
+ <a href="https://phoenixframework.org/" class="phx-logo">
+ <img src={Routes.static_path(@conn, "/images/phoenix.png")} alt="Phoenix Framework Logo"/>
+ </a>
+ </section>
+ </header>
+ <%= @inner_content %>
+ </body>
+</html>
diff --git a/lib/aggiedit_web/templates/page/index.html.heex b/lib/aggiedit_web/templates/page/index.html.heex
new file mode 100644
index 0000000..f844bd8
--- /dev/null
+++ b/lib/aggiedit_web/templates/page/index.html.heex
@@ -0,0 +1,41 @@
+<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 &amp; 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>
diff --git a/lib/aggiedit_web/templates/user_confirmation/edit.html.heex b/lib/aggiedit_web/templates/user_confirmation/edit.html.heex
new file mode 100644
index 0000000..e9bf443
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_confirmation/edit.html.heex
@@ -0,0 +1,12 @@
+<h1>Confirm account</h1>
+
+<.form let={_f} for={:user} action={Routes.user_confirmation_path(@conn, :update, @token)}>
+ <div>
+ <%= submit "Confirm my account" %>
+ </div>
+</.form>
+
+<p>
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_confirmation/new.html.heex b/lib/aggiedit_web/templates/user_confirmation/new.html.heex
new file mode 100644
index 0000000..4d9bee3
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_confirmation/new.html.heex
@@ -0,0 +1,15 @@
+<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>
+ <%= submit "Resend confirmation instructions" %>
+ </div>
+</.form>
+
+<p>
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_registration/new.html.heex b/lib/aggiedit_web/templates/user_registration/new.html.heex
new file mode 100644
index 0000000..6ff00fc
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_registration/new.html.heex
@@ -0,0 +1,30 @@
+<h1>Register</h1>
+
+<.form let={f} for={@changeset} action={Routes.user_registration_path(@conn, :create)}>
+ <%= if @changeset.action do %>
+ <div class="alert alert-danger">
+ <p>Oops, something went wrong! Please check the errors below.</p>
+ </div>
+ <% end %>
+
+ <%= label f, :email %>
+ <%= email_input f, :email, required: true %>
+ <%= error_tag f, :email %>
+
+ <%= label f, :username %>
+ <%= text_input f, :username, required: true %>
+ <%= error_tag f, :username %>
+
+ <%= label f, :password %>
+ <%= password_input f, :password, required: true %>
+ <%= error_tag f, :password %>
+
+ <div>
+ <%= submit "Register" %>
+ </div>
+</.form>
+
+<p>
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> |
+ <%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_reset_password/edit.html.heex b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex
new file mode 100644
index 0000000..d8efb4b
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex
@@ -0,0 +1,26 @@
+<h1>Reset password</h1>
+
+<.form let={f} for={@changeset} action={Routes.user_reset_password_path(@conn, :update, @token)}>
+ <%= if @changeset.action do %>
+ <div class="alert alert-danger">
+ <p>Oops, something went wrong! Please check the errors below.</p>
+ </div>
+ <% end %>
+
+ <%= 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 %>
+
+ <div>
+ <%= submit "Reset password" %>
+ </div>
+</.form>
+
+<p>
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_reset_password/new.html.heex b/lib/aggiedit_web/templates/user_reset_password/new.html.heex
new file mode 100644
index 0000000..126cdba
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_reset_password/new.html.heex
@@ -0,0 +1,15 @@
+<h1>Forgot your password?</h1>
+
+<.form let={f} for={:user} action={Routes.user_reset_password_path(@conn, :create)}>
+ <%= label f, :email %>
+ <%= email_input f, :email, required: true %>
+
+ <div>
+ <%= submit "Send instructions to reset password" %>
+ </div>
+</.form>
+
+<p>
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_session/new.html.heex b/lib/aggiedit_web/templates/user_session/new.html.heex
new file mode 100644
index 0000000..49a7d79
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_session/new.html.heex
@@ -0,0 +1,27 @@
+<h1>Log in</h1>
+
+<.form let={f} for={@conn} action={Routes.user_session_path(@conn, :create)} as={:user}>
+ <%= if @error_message do %>
+ <div class="alert alert-danger">
+ <p><%= @error_message %></p>
+ </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>
+</.form>
+
+<p>
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
+ <%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
+</p>
diff --git a/lib/aggiedit_web/templates/user_settings/edit.html.heex b/lib/aggiedit_web/templates/user_settings/edit.html.heex
new file mode 100644
index 0000000..9863bc5
--- /dev/null
+++ b/lib/aggiedit_web/templates/user_settings/edit.html.heex
@@ -0,0 +1,53 @@
+<h1>Settings</h1>
+
+<h3>Change email</h3>
+
+<.form let={f} for={@email_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_email">
+ <%= if @email_changeset.action do %>
+ <div class="alert alert-danger">
+ <p>Oops, something went wrong! Please check the errors below.</p>
+ </div>
+ <% end %>
+
+ <%= hidden_input f, :action, name: "action", value: "update_email" %>
+
+ <%= label f, :email %>
+ <%= email_input f, :email, required: true %>
+ <%= 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 %>
+
+ <div>
+ <%= submit "Change email" %>
+ </div>
+</.form>
+
+<h3>Change password</h3>
+
+<.form let={f} for={@password_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_password">
+ <%= if @password_changeset.action do %>
+ <div class="alert alert-danger">
+ <p>Oops, something went wrong! Please check the errors below.</p>
+ </div>
+ <% 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 %>
+
+ <div>
+ <%= submit "Change password" %>
+ </div>
+</.form>