login

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>{{$title}}</title>
  <style>
    #nav-bar { float: left; }
    #auth-bar { float: right; }
    table {
      border-collapse: collapse;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    th { background-color: #EEEEEE; }
    th, td {
      padding: 3px 12px;
      border: 1px solid #006;
    }
    .private { background-color: #FFFF90; }
  </style>
</head>
<body>
  <div id="nav-bar">home</div>
  <div id="auth-bar">
    % if $is_admin then
    <strong>Admin</strong>
    <a href="/logout">(logout)</a>
    % else
    <a href="/login">login</a>
    % end
  </div>
  <br>
  % if #$repos == 0 then
  <p><em>no repos found</em></p>
  % else
  <br>
  <table>
    <tr>
      <th>repo</th>
      <th>description</th>
    </tr>
    % for repo in $repos do
    % if $repo.private then
    %   set td_class = 'class="private"'
    % else
    %   set td_class = ''
    % end
    <tr>
      <td {{!$td_class}}><a href="/repo/{{$repo.name}}">{{$repo.name}}</a></td>
      % if #$repo.desc > 0 then
      <td {{!$td_class}}>{{$repo.desc}}</td>
      % else
      <td {{!$td_class}}><em>no description</em></td>
      % end
    </tr>
    % end
  </table>
  % end
</body>
</html>