{{define "content"}}
{{if .Data.LoggedIn}}
<div class="row">
  <div class="col-md-4">
    <p>
      Compare two references — branches, tags or commits — of any git repository
      on this instance, and review the diff file by file.
    </p>
    <form method="GET" action="/jump">
      <div class="form-group">
        <label class="sr-only" for="owner">Owner</label>
        <input class="form-control" type="text" id="owner" name="owner"
               placeholder="~owner" autocomplete="off">
      </div>
      <div class="form-group">
        <label class="sr-only" for="repo">Repository</label>
        <input class="form-control" type="text" id="repo" name="repo"
               placeholder="repo" autocomplete="off">
      </div>
      <button class="btn btn-primary btn-block" type="submit">Compare</button>
    </form>
  </div>
  <div class="col-md-8">
    <hr class="d-md-none" />
    {{template "srht-repo-list" .Data.Repos}}
  </div>
</div>
{{else}}
<div class="row">
  <div class="col-md-12">
    <h2>{{.SiteName}} <span class="text-danger">{{.SiteLabel}}</span></h2>
    <p>
      Compare two references — branches, tags or commits — of any git repository
      on this instance, and review the diff file by file.
    </p>
    <p>
      <a href="{{.LoginURL}}" rel="nofollow">Log in</a> to list your own
      repositories, or jump directly to any repository below.
    </p>
    <form method="GET" action="/jump" class="form-inline">
      <div class="form-group">
        <label class="sr-only" for="owner">Owner</label>
        <input class="form-control" type="text" id="owner" name="owner"
               placeholder="~owner" autocomplete="off">
      </div>
      <div class="form-group">
        <label class="sr-only" for="repo">Repository</label>
        <input class="form-control" type="text" id="repo" name="repo"
               placeholder="repo" autocomplete="off">
      </div>
      <button class="btn btn-primary" type="submit">Go</button>
    </form>
  </div>
</div>
{{end}}
{{end}}
