<header class="header-Base">

  <nav class="header-Nav clearfix" role="navigation">

    <a href="#!" title="show small screen nav" class="small-Nav">
      <img src="/img/nav-Icon.png" alt="navigation icon" />
    </a>

    <ul class="h-Nav constant-Nav">
      <%== erb :'_header_links', layout: false %>
    </ul>

    <ul class="status-Nav">
      <% if !signed_in? %>
        <li>
          <a href="/#new" class="create-New">Sign up for Free</a>
        </li>
        <li>
          <a href="/signin" class="sign-In">Sign In</a>
        </li>
      <% else %>
        <li class="dropdown">
          <a href="#" data-toggle="dropdown" class="dropdown-toggle">
            <%= current_site.username %>
            <span class="info">
              <% if current_site.unseen_notifications_count > 0 %>
                <span class="notification-value"><%= current_site.unseen_notifications_count %></span>
              <% end %>
              <i class="fa fa-caret-down"></i>
            </span>
          </a>
          <ul class="dropdown-menu">
            <% unless is_education? %>
              <li><a href="/site/<%= current_site.username %>">Profile</a></li>
              <li>
                <a href="/?activity=mine"><span class="float-Left">Activity</span>
                  <% if current_site.unseen_notifications_count > 0 %>
                    <span class="notification-value"><%= current_site.unseen_notifications_count %></span>
                  <% end %>
                </a>
              </li>
              <li class="divider"></li>
            <% end %>
            <% unless current_site.tutorial_required %>
              <li><a href="/dashboard">Edit</a></li>
            <% end %>
            <li><a href="<%= current_site.uri %>" target="_blank">View</a></li>
            <li><a href="/site/<%= current_site.username %>/stats">Stats</a></li>
            <li class="divider"></li>
            <li><a href="/settings">Settings</a></li>

            <% if current_site.other_sites_dataset.count > 0 %>
              <li class="dropdown-submenu pull-left">
                <a tabindex="-1" href="#" onclick="return false">Switch Site</a>
                <ul class="dropdown-menu">
                  <% current_site.other_sites_dataset.select(:username).all.each do |site| %>
                    <li>
                      <a href="/signin/<%= site.username %>"><%= site.username %></a>
                    </li>
                  <% end %>
                </ul>
              </li>
            <% end %>

            <% if current_site.is_admin %>
              <li><a href="/admin">Admin</a></li>
            <% end %>

            <li><a href="#" onclick="$('#signoutForm').submit()">Sign Out</a></li>
            <form id="signoutForm" method="POST" action="/signout" style="display: none">
              <%== csrf_token_input_html %>
            </form>
          </ul>
        </li>

      <% end %>
      </ul>
  </nav>

  <div class="logo int-Logo">
    <a href="/" title="back to home">
      <span class="hidden">FemslashCity</span>
      <img src="https://file.garden/Zw17vw8ctXTQw7PV/emslash.png" alt="FemslashCity" />
    </a>
  </div>
</header>
