<div class="row topbar">
  <h1 id="logo" class="logo">{{#link-to "main"}}Travis{{/link-to}}</h1>
  <div class="burger">
    <button type="button" id="burger" class="burger-btn" {{action 'toggleBurgerMenu'}}>&equiv;</button>
  </div>

  <ul id="navigation" class="navigation {{if is-open 'is-open'}}">
    <li><a href="http://blog.travis-ci.com">Blog</a></li>
    <li><a href="http://www.traviscistatus.com/">Status</a></li>

    {{#unless config.pro}}
      <li class="navigation-sub navigation--community">
        <p class="handle navigation-handle">
          <span>Help</span>
        </p>
        <ul class="navigation-nested">
          <li><a href="http://docs.travis-ci.com">Docs</a></li>
          <li><a href="http://stackoverflow.com/questions/ask?tags=travis-ci">Ask a Question</a></li>
          <li><a href="http://docs.travis-ci.com/imprint.html" alt="Imprint">Imprint</a></li>
        </ul>
      </li>
    {{/unless}}

    {{#if config.pro}}
      <li><a href="http://docs.travis-ci.com">Docs</a></li>
      <li class="navigation-sub navigation--legal">
        <p class="handle navigation-handle">
          <span>Legal</span>
        </p>
        <ul class="navigation-nested">
          <li>
            <a href={{config.urls.imprint}}>Imprint</a>
          </li>
          <li>
            <a href={{config.urls.security}}>Security</a>
          </li>
          <li>
            <a href={{config.urls.terms}}>Terms</a>
          </li>
        </ul>
      </li>
    {{/if}}

    <li class="{{view.classProfile}} navigation-sub">
      <p class="handle navigation-handle">
        {{#if auth.signedOut}}
          <button class="signed-out button--signin" {{action "signIn" target="auth"}}>Sign in with GitHub</button>
        {{/if}}
        {{#if auth.signedIn}}
          {{#link-to "profile" class="signed-in"}}{{userName}}
            <img src={{gravatarUrl}} />
          {{/link-to}}
        {{/if}}
        {{#if auth.signingIn}}
          <button class="signing-in button--signingin">Signing In <span class="loading-indicator--white"><i></i><i></i><i></i></span></button>
        {{/if}}
      </p>
      {{#if auth.signedIn}}
        <ul class="navigation-nested">
          <li>
            {{#link-to "profile" class="signed-in"}}Accounts{{/link-to}}
          </li>
          {{#if config.billingEndpoint}}
            <li>
              <a href={{config.billingEndpoint}}>Billing</a>
            </li>
          {{/if}}
          <li>
            <a href="/" {{action "signOut" target="auth"}}>Sign Out</a>
          </li>
        </ul>
      {{/if}}
    </li>
  </ul>
</div>

{{#if showCta}}
  <div class="cta">
    <p class="row">
      <span class="arrow"></span>
      Help make Open Source a better place and start building better software today!
    </p>
  </div>
{{/if}}
