<commit_before>.sidebar#sidebar-left
  %ul.nav.nav-list
    - if current_project
      %li.nav-header= link_to current_project.title, current_project
      = nav_to t("navigation.project_show"), current_project
      = nav_to t("navigation.project_todo_lists"), todo_lists_path(:project_id => current_project), :todo_lists
      = nav_to t("navigation.project_notes"), notes_path(:project_id => current_project), :notes
      = nav_to t("navigation.project_links"), links_path(:project_id => current_project), :links
      %li.divider
        %hr
      =# nav_to t("navigation.project_settings"), edit_project_path(current_project)

      - if pages = current_project.pages.presence
        %li.nav-header= link_to t("shared.sidebar.pages_in_project"), pages_path(:project_id => current_project)
        - pages.each do |page|
          %li{:class => current_page?(page) ? :active : nil}= link_to page.title, page

    - else
      %li.nav-header Navigation
      =# nav_to t("navigation.dashboard"), dashboard_path
      = nav_to t("navigation.activities"), :activities
      = nav_to t("navigation.projects"), :projects
      = nav_to t("navigation.pages"), :pages
      = nav_to t("navigation.todo_lists"), :todo_lists

  = yield(:navigation_sidebar)

  - unless current_project
    - if recent = favorite_projects.presence
      %ul.nav.nav-list
        %li.nav-header= t("shared.sidebar.favorite_projects")
        - recent.each do |item|
          %li= link_to item.title, item, :title => item.title

    - if recent = favorite_pages.presence
      %ul.nav.nav-list
        %li.nav-header= t("shared.sidebar.favorite_pages")
        - recent.each do |item|
          %li{:class => current_page?(item) || item == resource ? :active : nil}= link_to item.title, item, :title => item.title_with_context
<commit_msg>Always show pinned projects and pages in sidebar<commit_after>.sidebar#sidebar-left
  %ul.nav.nav-list
    - if current_project
      %li.nav-header= link_to current_project.title, current_project
      = nav_to t("navigation.project_show"), current_project
      = nav_to t("navigation.project_todo_lists"), todo_lists_path(:project_id => current_project), :todo_lists
      = nav_to t("navigation.project_notes"), notes_path(:project_id => current_project), :notes
      = nav_to t("navigation.project_links"), links_path(:project_id => current_project), :links
      %li.divider
        %hr
      =# nav_to t("navigation.project_settings"), edit_project_path(current_project)

      - if pages = current_project.pages.presence
        %li.nav-header= link_to t("shared.sidebar.pages_in_project"), pages_path(:project_id => current_project)
        - pages.each do |page|
          %li{:class => current_page?(page) ? :active : nil}= link_to page.title, page

    - else
      %li.nav-header Navigation
      =# nav_to t("navigation.dashboard"), dashboard_path
      = nav_to t("navigation.activities"), :activities
      = nav_to t("navigation.projects"), :projects
      = nav_to t("navigation.pages"), :pages
      = nav_to t("navigation.todo_lists"), :todo_lists

  = yield(:navigation_sidebar)

  - if recent = favorite_projects.presence
    %ul.nav.nav-list
      %li.nav-header= t("shared.sidebar.favorite_projects")
      - recent.each do |item|
        %li= link_to item.title, item, :title => item.title

  - if recent = favorite_pages.presence
    %ul.nav.nav-list
      %li.nav-header= t("shared.sidebar.favorite_pages")
      - recent.each do |item|
        %li{:class => current_page?(item) || item == resource ? :active : nil}= link_to item.title, item, :title => item.title_with_context

{'fraction_non_alphanumeric': 0.13335173937051353, 'fraction_numerical': 0.0, 'mean_word_length': 3.506218905472637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2977745', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1124, 'n_words': 215}