refactored for new project name
This commit is contained in:
parent
0039146cd4
commit
82ab1d1ea5
113 changed files with 417 additions and 412 deletions
lib/shift73k_web/templates
layout
other
user_confirmation
user_reset_password
user_session
57
lib/shift73k_web/templates/layout/_navbar.html.eex
Normal file
57
lib/shift73k_web/templates/layout/_navbar.html.eex
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<nav class="navbar navbar-expand-lg navbar-light bg-light mb-4">
|
||||
<div class="container">
|
||||
|
||||
<h1 class="fs-4 my-0 py-0 lh-base">
|
||||
<%= link to: Routes.page_path(@conn, :index), class: "navbar-brand fs-4" do %>
|
||||
<%= icon_div @conn, "mdi-skull-crossbones", [class: "icon baseline fs-3"] %>
|
||||
<span class="fw-light">Shift73k</span>
|
||||
<% end %>
|
||||
</h1>
|
||||
|
||||
<button class="hamburger hamburger--squeeze collapsed navbar-toggler" id="navbarSupportedContentToggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="hamburger-box d-flex">
|
||||
<span class="hamburger-inner"></span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
|
||||
<%# nav LEFT items %>
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
|
||||
<li class="nav-item">
|
||||
<%= link "Properties", nav_link_opts(@conn, to: Routes.property_index_path(@conn, :index), class: "nav-link") %>
|
||||
</li>
|
||||
|
||||
<%# ACTIVE page link example %>
|
||||
<%# <li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Home</a>
|
||||
</li> %>
|
||||
|
||||
<%# DISABLED page link example %>
|
||||
<%# <li class="nav-item">
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li> %>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownExample" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdownExample">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<%# nav RIGHT items %>
|
||||
<ul class="navbar-nav">
|
||||
|
||||
<%= render "navbar/_user_menu.html", assigns %>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
19
lib/shift73k_web/templates/layout/app.html.eex
Normal file
19
lib/shift73k_web/templates/layout/app.html.eex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<main role="main" class="container">
|
||||
|
||||
<%# phoenix flash alerts: %>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-9 ">
|
||||
<%= for {kind, class} <- alert_kinds() do %>
|
||||
<%= if flash_content = get_flash(@conn, kind) do %>
|
||||
<div class="alert <%= class %> alert-dismissible fade show" role="alert">
|
||||
<%= flash_content %>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
|
||||
</main>
|
||||
19
lib/shift73k_web/templates/layout/live.html.leex
Normal file
19
lib/shift73k_web/templates/layout/live.html.leex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<main role="main" class="container">
|
||||
|
||||
<%# liveview flash alerts: %>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-9 ">
|
||||
<%= for {kind, class} <- alert_kinds() do %>
|
||||
<%= if flash_content = live_flash(@flash, kind) do %>
|
||||
<div class="alert <%= class %> alert-dismissible fade show" role="alert" id="lv-alert-<%= kind %>" phx-hook="AlertRemover" data-key="<%= kind %>">
|
||||
<%= flash_content %>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
|
||||
</main>
|
||||
54
lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex
Normal file
54
lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<li class="nav-item dropdown">
|
||||
|
||||
<a href="#" class="nav-link dropdown-toggle" id="navbarDropdownUserMenu" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<%= icon_div @conn, "bi-person-circle", [class: "icon baseline me-1"] %>
|
||||
<%= @current_user && "Hello!" || "Hello?" %>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownUserMenu">
|
||||
|
||||
<%= if @current_user do %>
|
||||
|
||||
<li><%= content_tag :span, @current_user.email, class: "dropdown-item-text" %></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<%= if Roles.can?(@current_user, %User{}, :index) do %>
|
||||
<li>
|
||||
<%= link nav_link_opts(@conn, to: Routes.user_management_index_path(@conn, :index), class: "dropdown-item") do %>
|
||||
<%= icon_div @conn, "bi-people", [class: "icon baseline me-1"] %>
|
||||
Users
|
||||
<% end %>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link nav_link_opts(@conn, to: Routes.user_settings_path(@conn, :edit), class: "dropdown-item") do %>
|
||||
<%= icon_div @conn, "bi-sliders", [class: "icon baseline me-1"] %>
|
||||
Settings
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :delete), method: :delete, class: "dropdown-item") do %>
|
||||
<%= icon_div @conn, "bi-box-arrow-right", [class: "icon baseline me-1"] %>
|
||||
Log out
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% else %>
|
||||
|
||||
<li>
|
||||
<%= link nav_link_opts(@conn, to: Routes.user_registration_path(@conn, :new), class: "dropdown-item") do %>
|
||||
<%= icon_div @conn, "bi-person-plus", [class: "icon baseline me-1"] %>
|
||||
Register
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "dropdown-item") do %>
|
||||
<%= icon_div @conn, "bi-box-arrow-in-left", [class: "icon baseline me-1"] %>
|
||||
Log in
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
19
lib/shift73k_web/templates/layout/root.html.leex
Normal file
19
lib/shift73k_web/templates/layout/root.html.leex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!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] || "Shift73k", suffix: " · Phoenix Framework" %>
|
||||
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
||||
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<%= render "_navbar.html", assigns %>
|
||||
|
||||
<%= @inner_content %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
41
lib/shift73k_web/templates/other/index.html.eex
Normal file
41
lib/shift73k_web/templates/other/index.html.eex
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<h1 class="text-3xl font-bold leading-tight text-gunmetal-200">
|
||||
Other Page
|
||||
</h1>
|
||||
<h2 class="text-xl leading-tight text-gunmetal-400">
|
||||
With a subtitle no less!
|
||||
</h2>
|
||||
|
||||
<div class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
|
||||
<!-- Replace with your content -->
|
||||
<%# <div class="px-4 py-6 sm:px-0">
|
||||
<div class="border-4 border-dashed border-gray-200 rounded-lg h-96"></div>
|
||||
</div> %>
|
||||
<p>
|
||||
Praesent velit justo, auctor ut nibh id, fermentum eleifend nunc. Cras sed purus dignissim, ornare elit et, ultrices elit. Sed quis neque consequat, laoreet ante a, hendrerit elit. Maecenas dapibus sed nulla vitae consectetur. Duis sollicitudin augue nisl, et rhoncus enim tempor at. Fusce scelerisque sollicitudin purus sit amet iaculis. Phasellus lacinia mi ut laoreet accumsan. Sed sagittis erat nec sem placerat, ut volutpat neque porttitor. Suspendisse tempor mauris vel mollis sagittis. In ut laoreet arcu. Duis sed felis in dui imperdiet luctus nec faucibus sem. Donec commodo urna ut enim fringilla, quis lacinia ligula malesuada. Quisque feugiat fermentum pretium. Integer sed porttitor lacus, sed bibendum diam. Aliquam dapibus neque et pharetra interdum.
|
||||
</p>
|
||||
<!-- /End replace -->
|
||||
</div>
|
||||
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Aliquam ultrices elit purus, eget dignissim orci pulvinar id. Curabitur tincidunt, ligula eu condimentum porttitor, nibh sapien scelerisque urna, nec cursus nisi nisi a neque. Mauris hendrerit orci blandit, suscipit ante nec, porttitor neque. Nunc.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
40
lib/shift73k_web/templates/user_confirmation/new.html.eex
Normal file
40
lib/shift73k_web/templates/user_confirmation/new.html.eex
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-sm-9 col-md-7 col-lg-5 col-xl-4 ">
|
||||
|
||||
<h2>
|
||||
<%= icon_div @conn, "bi-arrow-repeat", [class: "icon baseline"] %>
|
||||
Resend confirmation instructions
|
||||
</h2>
|
||||
<p class="lead">We'll send you another email with instructions to confirm your email address.</p>
|
||||
|
||||
<%= form_for :user, Routes.user_confirmation_path(@conn, :create), [class: "needs-validation", novalidate: true], fn f -> %>
|
||||
|
||||
<%= label f, :email, class: "form-label" %>
|
||||
<div class="input-group has-validation mb-3">
|
||||
<span class="input-group-text">
|
||||
<%= icon_div @conn, "bi-at", [class: "icon fs-5"] %>
|
||||
</span>
|
||||
<%= email_input f, :email,
|
||||
value: @current_user && @current_user.email || "",
|
||||
placeholder: "e.g., babka@73k.us",
|
||||
class: "form-control",
|
||||
maxlength: User.max_email,
|
||||
required: true,
|
||||
autofocus: !@current_user
|
||||
%>
|
||||
<span class="invalid-feedback">must be a valid email address</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<%= submit "Resend confirmation instructions", class: "btn btn-primary" %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
||||
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
38
lib/shift73k_web/templates/user_reset_password/new.html.eex
Normal file
38
lib/shift73k_web/templates/user_reset_password/new.html.eex
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-sm-9 col-md-7 col-lg-5 col-xl-4 ">
|
||||
|
||||
<h2>
|
||||
<%= icon_div @conn, "mdi-head-question-outline", [class: "icon baseline"] %>
|
||||
Forgot your password?
|
||||
</h2>
|
||||
<p class="lead">We'll send you an email with instructions to reset your password.</p>
|
||||
|
||||
<%= form_for :user, Routes.user_reset_password_path(@conn, :create), [class: "needs-validation", novalidate: true], fn f -> %>
|
||||
|
||||
<%= label f, :email, class: "form-label" %>
|
||||
<div class="input-group has-validation mb-3">
|
||||
<span class="input-group-text">
|
||||
<%= icon_div @conn, "bi-at", [class: "icon"] %>
|
||||
</span>
|
||||
<%= email_input f, :email,
|
||||
placeholder: "e.g., babka@73k.us",
|
||||
class: "form-control",
|
||||
maxlength: User.max_email,
|
||||
required: true,
|
||||
autofocus: true
|
||||
%>
|
||||
<span class="invalid-feedback">must be a valid email address</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<%= submit "Send instructions to reset password", class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
||||
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
61
lib/shift73k_web/templates/user_session/new.html.eex
Normal file
61
lib/shift73k_web/templates/user_session/new.html.eex
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-sm-9 col-md-7 col-lg-5 col-xl-4 ">
|
||||
|
||||
<h2>
|
||||
<%= icon_div @conn, "bi-door-open", [class: "icon baseline"] %>
|
||||
Log in
|
||||
</h2>
|
||||
<p class="lead">Who goes there?</p>
|
||||
|
||||
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user, class: "needs-validation", novalidate: true], fn f -> %>
|
||||
<%= if @error_message do %>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<%= @error_message %>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= label f, :email, class: "form-label" %>
|
||||
<div class="input-group has-validation mb-3">
|
||||
<span class="input-group-text">
|
||||
<%= icon_div @conn, "bi-at", [class: "icon"] %>
|
||||
</span>
|
||||
<%= email_input f, :email,
|
||||
class: "form-control",
|
||||
placeholder: "e.g., babka@73k.us",
|
||||
maxlength: User.max_email,
|
||||
required: true
|
||||
%>
|
||||
<span class="invalid-feedback">must be a valid email address</span>
|
||||
</div>
|
||||
|
||||
<%= label f, :password, class: "form-label" %>
|
||||
<div class="input-group has-validation mb-3">
|
||||
<span class="input-group-text">
|
||||
<%= icon_div @conn, "bi-lock", [class: "icon"] %>
|
||||
</span>
|
||||
<%= password_input f, :password,
|
||||
class: "form-control",
|
||||
required: true
|
||||
%>
|
||||
<span class="invalid-feedback">password is required</span>
|
||||
</div>
|
||||
|
||||
<div class="form-check mb-3 no-valid-style">
|
||||
<%= checkbox f, :remember_me, class: "form-check-input" %>
|
||||
<%= label f, :remember_me, "Keep me logged in for 60 days", class: "form-check-label" %>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<%= submit "Log in", class: "btn btn-primary" %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
||||
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue