diff --git a/app/views/content/display/_tailwind_foldered_index.html.erb b/app/views/content/display/_tailwind_foldered_index.html.erb index 00719833..a1d45ce6 100644 --- a/app/views/content/display/_tailwind_foldered_index.html.erb +++ b/app/views/content/display/_tailwind_foldered_index.html.erb @@ -90,7 +90,7 @@ <% else %> <%= link_to subscription_path do %> <% end %> <% end %> diff --git a/app/views/layouts/tailwind.html.erb b/app/views/layouts/tailwind.html.erb index e980a671..257c4415 100644 --- a/app/views/layouts/tailwind.html.erb +++ b/app/views/layouts/tailwind.html.erb @@ -51,16 +51,17 @@
<% @activated_content_types.each do |content_type| %> <% content_type_klass = content_class_from_name(content_type) %> - <%= link_to main_app.polymorphic_path(content_type_klass), class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <% is_current_page = current_page?(main_app.polymorphic_path(content_type_klass)) %> + <%= link_to main_app.polymorphic_path(content_type_klass), class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{is_current_page ? 'bg-notebook-blue text-white' : 'hover:text-notebook-blue'} hover:bg-notebook-blue/20 hover:border-r-2 hover:border-notebook-blue" do %> <%= content_type_klass.icon %> -
- <%= link_to main_app.prompts_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.prompts_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.prompts_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> lightbulb <% end %> - <%= link_to main_app.timelines_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.timelines_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.timelines_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> <%= Timeline.icon %> <% end %> - <%= link_to main_app.documents_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.documents_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.documents_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> <%= Document.icon %> <% end %> - <%= link_to '#new-analysis-onboarding', class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to '#new-analysis-onboarding', class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?('#new-analysis-onboarding')} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> <%= DocumentAnalysis.icon %>
- <%= link_to main_app.stream_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.stream_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.stream_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> ballot <% end %> - <%= link_to main_app.page_collections_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.page_collections_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.page_collections_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> <%= PageCollection.icon %> <% end %> - <%= link_to main_app.thredded_path, class: 'flex items-center px-2 sm:px-4 py-2 cursor-pointer group hover:bg-notebook-blue hover:text-white rounded-l-full' do %> + <%= link_to main_app.thredded_path, class: "flex items-center px-2 sm:px-4 py-2 cursor-pointer group rounded-l-full transition #{'bg-notebook-blue text-white' if current_page?(main_app.thredded_path)} hover:bg-notebook-blue/20 hover:text-notebook-blue hover:border-r-2 hover:border-notebook-blue" do %> forum