smithy

ref: 99838f41e22d337e5b5ac250c5f85d2563c828f3

include/tree.html


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{{ template "header" }}

{{ $repo := .RepoName }}
{{ $subtree := .SubTree }}
{{ $ref := .RefName }}
{{ $path := .Path }}


<h1>{{ .RepoName }}</h1>

<nav class="navbar navbar-expand navbar-light bg-light">
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}">About</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}/refs">Refs</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/{{ $repo }}/log">Log</a>
      </li>
      <li class="nav-item active">
        <a class="nav-link" href="/{{ $repo }}/tree">Tree</a>
      </li>
    </ul>
  </div>
</nav>

ref: {{ .RefName }}

<p>
    path: {{ .Path }}
</p>

<table>
    {{ range .Files }}
    <tr>
        <td>
            {{ .FileMode }}
        </td>
        <td>
            <a href="/{{ $repo }}/tree/{{ $ref }}/{{ if $path }}{{ $path }}/{{ end }}{{ .Name }}">
                {{ .Name }}{{ if not .Mode.IsFile }}/{{ end }}
            </a>
        </td>
    </tr>
    {{ end }}
</ul>

{{ template "footer" }}