<%= link_to t("brand.name"), root_path(locale: I18n.locale), class: "text-lg font-bold text-slate-800 hover:text-indigo-600 transition" %>
<%= link_to t("nav.home"), root_path(locale: I18n.locale), class: "text-sm text-slate-600 hover:text-indigo-600 transition" %> <%= link_to t("nav.posts"), posts_path(locale: I18n.locale), class: "text-sm text-slate-600 hover:text-indigo-600 transition" %> <%= link_to t("nav.categories"), categories_path(locale: I18n.locale), class: "text-sm text-slate-600 hover:text-indigo-600 transition" %> <%= link_to t("nav.tags"), tags_path(locale: I18n.locale), class: "text-sm text-slate-600 hover:text-indigo-600 transition" %> <% if user_signed_in? && current_user.admin? %> <%= link_to t("nav.admin"), admin_root_path(locale: I18n.locale), class: "text-sm text-slate-600 hover:text-indigo-600 transition" %> <% end %>
<% available_locales.each do |locale_code, _| %> <% is_current = I18n.locale.to_sym == locale_code %> <%= link_to switch_locale_url(locale_code), class: "flex items-center justify-between px-4 py-2 text-sm #{is_current ? 'text-indigo-600 bg-indigo-50 font-medium' : 'text-slate-600 hover:bg-slate-50'}" do %> <%= locale_name(locale_code) %> <%= locale_flag_code(locale_code) %> <% end %> <% end %>
<% if user_signed_in? %>
<%= current_user.email %> <%= button_to t("shared.sign_out"), destroy_user_session_path, method: :delete, class: "text-sm text-slate-600 hover:text-indigo-600 transition" %>
<% else %> <%= link_to t("shared.sign_in"), new_user_session_path(locale: I18n.locale), class: "text-sm text-indigo-600 hover:text-indigo-700 font-medium" %> <% end %>