From 43b2ee8c95ca4582b6b3c592133e671a2321f4fd Mon Sep 17 00:00:00 2001 From: Adam Piontek Date: Tue, 9 Mar 2021 11:06:23 -0500 Subject: [PATCH] refining login nav --- assets/js/app.js | 5 +- .../layout/navbar/_user_menu.html.eex | 73 +++++++++---------- 2 files changed, 35 insertions(+), 43 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 407470af..bf8c80aa 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -9,8 +9,8 @@ import "../node_modules/bootstrap-icons/icons/calendar3-week.svg"; // brand // menus etc import "../node_modules/bootstrap-icons/icons/person-circle.svg"; // accounts menu import "../node_modules/bootstrap-icons/icons/person-plus.svg"; // new user / register -import "../node_modules/bootstrap-icons/icons/box-arrow-in-left.svg"; // log in -import "../node_modules/bootstrap-icons/icons/box-arrow-right.svg"; // log out +import "../node_modules/bootstrap-icons/icons/door-open.svg"; // log in +import "../node_modules/bootstrap-icons/icons/door-closed.svg"; // log out import "../node_modules/bootstrap-icons/icons/sliders.svg"; // new user / register // forms etc import "../node_modules/bootstrap-icons/icons/at.svg"; // email field @@ -31,7 +31,6 @@ import "../node_modules/bootstrap-icons/icons/trash.svg"; // page headers import "../node_modules/bootstrap-icons/icons/shield-lock.svg"; // reset password import "../node_modules/bootstrap-icons/icons/arrow-repeat.svg"; // resend confirmation -import "../node_modules/bootstrap-icons/icons/door-open.svg"; // log in header import "../node_modules/@mdi/svg/svg/head-question-outline.svg"; // forgot password import "../node_modules/bootstrap-icons/icons/people.svg"; // users management // calendar/event icons diff --git a/lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex b/lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex index d6e593ad..42de3449 100644 --- a/lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex +++ b/lib/shift73k_web/templates/layout/navbar/_user_menu.html.eex @@ -1,3 +1,12 @@ +<%= if !@current_user do %> + + <%= link nav_link_opts(@conn, to: Routes.user_session_path(@conn, :new), class: "btn btn-outline-light") do %> + <%= icon_div @conn, "bi-door-open", [class: "icon baseline", style: "margin-right:0.125rem;"] %> + Log in + <% end %> + +<% else %> +