<%= link_to Rails.application.config.app_name, current_user ? "/dashboard" : "/", class: "text-xl font-bold text-white" %>
<%= link_to "Soirées et afterworks" , parties_path, class: "text-white hover:text-purple-200 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200" %> <%= link_to "Concerts" , "#" , class: "text-white hover:text-purple-200 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200" %>
<% if user_signed_in? %>
<%= link_to "Mon profil" , edit_user_registration_path, class: "block w-full px-4 py-2 text-start text-sm leading-5 text-white hover:bg-purple-700" %> <%= link_to "Mes réservations" , "#" , class: "block w-full px-4 py-2 text-start text-sm leading-5 text-white hover:bg-purple-700" %> <%= link_to "Déconnexion" , destroy_user_session_path, data: { controller: "logout" , action: "click->logout#signOut" , logout_url_value: destroy_user_session_path, login_url_value: new_user_session_path, turbo: false }, class: "block w-full px-4 py-2 text-start text-sm leading-5 text-white hover:bg-purple-700" %>
<% else %>
<%= link_to "Se connecter" , new_user_session_path, class: "text-white hover:text-purple-200 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200" %> <%= link_to "S'inscrire" , new_user_registration_path, class: "bg-white text-purple-600 font-medium py-2 px-4 rounded-lg shadow-sm hover:bg-purple-100 transition-all duration-200" %>
<% end %>
<%= link_to "Soirées et afterworks" , "#" , class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %> <%= link_to "Concerts" , "#" , class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %>
<% if user_signed_in? %>
<% if current_user.first_name %>
<%= current_user.first_name %>
<% else %>
<%= current_user.email.length> 20 ? current_user.email[0,20] + "..." : current_user.email %>
<%#
<%= current_user.email.length> 20 ? current_user.email[0,20] + "..." : current_user.email %>
%> <% end %>
<%= link_to "Mon profil" , edit_user_registration_path, class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %> <%= link_to "Mes réservations" , "#" , class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %> <%= link_to "Déconnexion" , destroy_user_session_path, data: { controller: "logout" , action: "click->logout#signOut", logout_url_value: destroy_user_session_path, login_url_value: new_user_session_path, turbo: false }, class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %>
<% else %>
<%= link_to "S'inscrire" , new_user_registration_path, class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %> <%= link_to "Se connecter" , new_user_session_path, class: "block px-3 py-2 rounded-md text-base font-medium text-white hover:text-purple-200 hover:bg-purple-700" %>
<% end %>