diff options
Diffstat (limited to 'templates/repo.html')
-rw-r--r-- | templates/repo.html | 56 |
1 files changed, 20 insertions, 36 deletions
diff --git a/templates/repo.html b/templates/repo.html index ddc3f01..d4e3e46 100644 --- a/templates/repo.html +++ b/templates/repo.html @@ -1,50 +1,34 @@ {{ define "repo" }} <html> + <title>{{ .name }} + {{ if .parent }} + — {{ .parent }} + {{ end }} + </title> {{ template "head" . }} <header> - <h1>{{ .meta.Title }}</h1> - <h2>{{ .meta.Description }}</h2> + <h2> + <a href="/">all repos</a> + — {{ .name }} + </h2> + <h3 class="desc">{{ .desc }}</h3> </header> <body> {{ template "nav" . }} <main> {{ $repo := .name }} - {{ $ref := .ref }} - {{ $parent := .parent }} - - <table> - <tr> - <td></td> - <td><a href="../">..</a> - </tr> - {{ range .files }} - {{ if .IsFile }} - <tr> - <td><code>{{ .Mode }}</code></td> - <td> - {{ if $parent }} - <a href="/{{ $repo }}/blob/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}</a> - {{ else }} - <a href="/{{ $repo }}/blob/{{ $ref }}/{{ .Name }}">{{ .Name }}</a> - {{ end }} - </td> - </tr> - {{ else }} - <tr> - <td><code>{{ .Mode }}</code></td> - <td> - {{ if $parent }} - <a href="/{{ $repo }}/tree/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}/</a> - {{ else }} - <a href="/{{ $repo }}/tree/{{ $ref }}/{{ .Name }}">{{ .Name }}/</a> - {{ end }} - </td> - </tr> + <div class="log"> + {{ range .commits }} + <div> + <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div> + <div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div> + <pre>{{ .Message }}</pre> + </div> + <div class="commit-info">{{ .Author.Name }} <span style="color: var(--gray);">{{ .Author.Email }}</span></div> {{ end }} - {{ end }} - </table> - <article> + </div> + <article class="readme"> <pre> {{- if .readme }}{{ .readme }}{{- end -}} </pre> |