From 145115fb6f3635df670be95a6d860a8b0c09f822 Mon Sep 17 00:00:00 2001 From: Adam Piontek Date: Tue, 9 Mar 2021 11:06:32 -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 0925be3..cb9d066 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -9,8 +9,8 @@ import "../node_modules/@mdi/svg/svg/skull-crossbones.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 diff --git a/lib/bones73k_web/templates/layout/navbar/_user_menu.html.eex b/lib/bones73k_web/templates/layout/navbar/_user_menu.html.eex index d6e593a..42de344 100644 --- a/lib/bones73k_web/templates/layout/navbar/_user_menu.html.eex +++ b/lib/bones73k_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 %> +