{{/* Copyright 2024 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. */}}

{{define "content"}}
{{$outdirRevBaseURL:=.outdirRevBaseURL}}
{{$currentURL:=.currentURL}}
{{$currentRev:=.currentRev}}
{{$allowedFiles:=.allowedFiles}}
<aside id="page-sidebar">
  <ul class="revs-timeline">
    {{range $r := .revs}}
    <li{{if eq $r.Rev $currentRev}} class="selected"{{end}}>
      <a class="rev-label" href="{{$outdirRevBaseURL}}/../{{.Rev}}/logs/">
        <span class="rev-label-note">Logs in</span>
        {{buildTimeHumanReadable $r}}
        <md-ripple></md-ripple>
      </a>
      <div class="rev-info">
        <relative-time datetime="{{timeRFC3339 .Mtime}}"></relative-time>
        {{if eq $r.Rev $currentRev}}
        <ul class="rev-sublinks">
          {{range $allowedFile := $allowedFiles}}
            {{$logURL := printf "%s/logs/%s" $outdirRevBaseURL $allowedFile}}
            <li{{if (urlPathEq $currentURL $logURL)}} class="selected"{{end}}>
              <a href="{{$logURL}}">
                {{$allowedFile}}
              </a>
            </li>
          {{end}}
        </ul>
        {{end}}
      </div>
    </li>
    {{end}}
  </ul>
</aside>
<pre><code>{{.fileContents}}</code></pre>
{{end}}
