diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 4a628f9ad..fc5bc05fa 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -17,6 +17,7 @@ module IconHelper swatch: %(), settings: %(), log_in: %(), + user: %(), # Utility times: %(), diff --git a/app/javascript/src/styles/common/navigation.scss b/app/javascript/src/styles/common/navigation.scss index ea3bdc8d1..582caaa0b 100644 --- a/app/javascript/src/styles/common/navigation.scss +++ b/app/javascript/src/styles/common/navigation.scss @@ -187,6 +187,8 @@ nav.navigation { padding: 1rem 0.5rem; } li.current a { background-color: themed("color-foreground"); } + + li.nav-hidden { display: none; } } .nav-secondary { diff --git a/app/views/layouts/_main_links.html.erb b/app/views/layouts/_main_links.html.erb index 58373063a..47e689677 100644 --- a/app/views/layouts/_main_links.html.erb +++ b/app/views/layouts/_main_links.html.erb @@ -1,3 +1,8 @@ +<% if CurrentUser.is_anonymous? %> + <%= decorated_nav_link_to("Log In", :log_in, new_session_path, class: "nav-hidden") %> +<% else %> + <%= decorated_nav_link_to("Profile", :user, user_path(CurrentUser.user), class: "nav-hidden") %> +<% end %> <%= decorated_nav_link_to("Artists", :brush, artists_path) %> <%= decorated_nav_link_to("Posts", :images, posts_path) %> <%= decorated_nav_link_to("Pools", :library, gallery_pools_path) %>