<commit_before>
%nav.navbar.navbar-expand-lg.navbar-dark.bg-dark.justify-content-between
  %a.navbar-brand{:href => "/"}= [current_tenant && current_tenant.name, Tenant.default_title].join(' ')
  %button.navbar-toggler{'data-toggle': "collapse", 'data-target': "#navbarSupportedContent", 'aria-controls': "navbarSupportedContent", 'aria-expanded': "false", 'aria-label': "Toggle navigation"}
    %span.navbar-toggler-icon

  - if user_signed_in?
    = form_tag searches_path, :method=>:get, class: 'form-inline' do
      = search_field_tag :q, "", class: 'form-control mr-sm-2'
      = button_tag class: "btn btn-outline-primary" do
        %i.fas.fa-search 
        search

    #navbarSupportedContent.collapse.navbar-collapse
      %ul.navbar-nav.ml-auto.pr-2
        %li.nav-item= link_to "Topics", topics_path, class:'nav-link'
        %li.nav-item= link_to "Questions", questions_path, class:'nav-link'
        %li.nav-item= link_to "Videos", videos_path, class:'nav-link'
        %li.nav-item= link_to "YARD Docs", docs_path, class:'nav-link'
        - if current_user && current_user.admin?
          %li.nav-item= link_to "Admin", admin_home_index_path, class:'nav-link'


      - if current_tenant && !@static_render
        %nav.navbar-nav.nav-item.ml-auto.px-1
          - if user_signed_in?
            = link_to "Sign Out", destroy_user_session_path, {:method=>:delete, :class=>'btn btn-info'}
          - else
            = link_to "Sign in/Sign up", new_user_session_path, {:class=>'btn btn-info '}
      - if user_signed_in? # no user if generating static docs from site
        .nav
          = current_user && link_to(account_path, :class=>'nav_avatar') do
            .navbar-nav.navbar-right.px-1
              %li.avatar
                = render_avatar(current_user, :size=>43)

      - if user_signed_in?
        %li.nav-item.dropdown
          %a#navbarDropdownMenuLink.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#"}
            = render_avatar(current_user, :size=>43)
          .dropdown-menu{"aria-labelledby" => "navbarDropdownMenuLink"}
            %a.dropdown-item{:href => account_path} Account
            %a.dropdown-item{:href => "#"} Another action
            %hr
            %a.dropdown-item{:href => "#"} Logout




= javascript_include_tag "autocomplete"<commit_msg>compress top nav using dropdown for user links including logout<commit_after>
%nav.navbar.navbar-expand-lg.navbar-dark.bg-dark.justify-content-between
  %a.navbar-brand{:href => "/"}= [current_tenant && current_tenant.name, Tenant.default_title].join(' ')
  %button.navbar-toggler{'data-toggle': "collapse", 'data-target': "#navbarSupportedContent", 'aria-controls': "navbarSupportedContent", 'aria-expanded': "false", 'aria-label': "Toggle navigation"}
    %span.navbar-toggler-icon

  - if user_signed_in?
    = form_tag searches_path, :method=>:get, class: 'form-inline' do
      = search_field_tag :q, "", class: 'form-control mr-sm-2'
      = button_tag class: "btn btn-outline-primary" do
        %i.fas.fa-search 
        search

    #navbarSupportedContent.collapse.navbar-collapse
      %ul.navbar-nav.ml-auto.pr-2
        %li.nav-item= link_to "Topics", topics_path, class:'nav-link'
        %li.nav-item= link_to "Questions", questions_path, class:'nav-link'
        %li.nav-item= link_to "Videos", videos_path, class:'nav-link'
        %li.nav-item= link_to "YARD", docs_path, class:'nav-link'


        - if current_tenant && !@static_render
          - if user_signed_in?
            %li.nav-item.dropdown
              %a#navbarDropdownMenuLink.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#"}
                = render_avatar(current_user, :size=>43)
              .dropdown-menu.dropdown-menu-right{"aria-labelledby" => "navbarDropdownMenuLink"}
                %a.dropdown-item{:href => account_path} Your Account
                -# %a.dropdown-item{:href => "#"} Another action
                - if current_user && current_user.admin?
                  = link_to "#{f_icon 'user-shield'} Admin".html_safe, admin_home_index_path, class:'dropdown-item mt-3'
                = link_to "Sign Out", destroy_user_session_path, {:method=>:delete, :class=>'btn btn-info m-3'}
          - else
            = link_to "Sign in/Sign up", new_user_session_path, {:class=>'btn btn-info '}
        
      -# - if user_signed_in? # no user if generating static docs from site
      -#   .nav
      -#     = current_user && link_to(account_path, :class=>'nav_avatar') do
      -#       .navbar-nav.navbar-right.px-1
      -#         %li.avatar
      -#           = render_avatar(current_user, :size=>43)

= javascript_include_tag "autocomplete"

{'fraction_non_alphanumeric': 0.15375, 'fraction_numerical': 0.0035416666666666665, 'mean_word_length': 2.8748991121872476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 34, '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': '5983923', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1562, 'n_words': 273}