<div id="notification-bubbles"></div>
<div id="header" class="topbar">
  <div class="topbar-logo">
  <a href="/in/inbox/" title="{{_("%(name)s mailpile has %(size)s messages", name=name, size=mailpile_size)}}">
    {% include("../img/logo-color.svg") %}
  </a>
  </div>
  <div class="topbar-logo-name">
  <a href="/in/inbox/" title="{{_("%(name)s mailpile has %(size)s messages", name=name, size=mailpile_size)}}">
    {% include("../img/logo-name.svg") %}
  </a>
  </div>
  <div class="topbar-actions">
    <form id="form-search" class="form-search clearfix" action="/search/">
		  <input id="search-query" class="typeahead" type="text" name="q" placeholder="search" autocomplete="off" tabindex=1 alt="{{_("Search")}}" value="{% for t in result.search_terms %}{{ t }} {% endfor %}">
		  <button type="submit" class="submit"><span class="icon-search"></span></button>
	  </form>
    <nav class="topbar-nav">
      <ul>
        <li class="nav-search">
          <a href="#" title="{{_("Search")}}" alt="{{_("Search")}}"><span class="link-icon icon-search"></span></a>
        </li>
        <li class="{% if command == "edit" %} navigation-on{% endif %}">
          <a href="#" id="button-compose" title="{{_("Compose")}}" alt="{{_("Compose")}}"><span class="link-icon icon-compose"></span></a>
        </li>
        <li class="{% if command == "contacts" %} navigation-on{% endif %}">
          <a href="/contacts/" title="{{_("Contacts")}}" alt="{{_("Contacts")}}"><span class="link-icon icon-user"></span></a>
        </li>
        <li class="{% if state.command_url in ("/tags/", "/filter/list/") %}navigation-on{% endif %}">
          <a href="/tags/" title="{{_("Tags")}}" alt="{{_("Tags")}}"><span class="link-icon icon-tag"></span></a>
        </li>
        {%- for a in get_ui_elements('activities', state, '/') -%}
        <li class="{% if command == a.name %}navigation-on{% endif %}">
          <a href="{{ a.url }}" class="plugin-activity-{{ a.name }}" title="{{ a.description }}"><img alt="{{ a.text }}" class="icon-plugin-activity" src="{{ a.icon }}"></a>
        </li>
        {%- endfor -%}
        {% if config.web.donate_visibility %}
        <li class="{% if command == "page" %} navigation-on{% endif %}">
          <a class="donate" href="/page/donate/" title="{{_("Donate")}}" alt="{{_("Donate")}}"><span class="link-icon icon-donate"></span></a>
        </li>
        {% endif %}
        <li class="nav-dropdown {% if state.command_url in ("/setup/") %}navigation-on{% endif %}">
          <a id="button-settings" href="/setup/#" data-target="#" class="nav-icon dropdown-toggle" data-toggle="dropdown" alt="{{_("Settings")}}" aria-haspopup="true" aria-expanded="false"><span class="link-icon icon-settings"></span></a>
          <ul id="settings-menu" class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="button-settings">
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#profiles"><span class="icon-profiles"></span> {{_("Profiles")}}</a></li>
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#sources"><span class="icon-inbox"></span> {{_("Mail Sources")}}</a></li>
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#sending"><span class="icon-routes"></span> {{_("Sending Routes")}}</a></li>
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#language"><span class="icon-home"></span> {{_("Language")}}</a></li>
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/crypto/"><span class="icon-key"></span> {{_("Encryption Keys")}}</a></li>
            {# <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#passphrase"><span class="icon-lock-closed"></span> {{_("Password")}}</a></li> #}
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/setup/#security"><span class="icon-privacy"></span> {{_("Security")}}</a></li>
            <li role="presentation"><a role="menuitem" tabindex="-1" href="/settings/backup-keys.html"><span class="icon-list"></span> {{_("Backups")}}</a></li>
          </ul>
        </li>
        <li><a href="/auth/logout/" title="{{_("Logout")}}" alt="{{_("Logout")}}"><span class="link-icon icon-logout"></span></a></li>
      </ul>
    </nav>
  </div>
</div>
