summaryrefslogtreecommitdiffstats
path: root/templates/tree.html
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2024-02-20 00:24:38 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2024-02-20 00:24:38 +0000
commitf4ff8fe6eb20ab5b557d7beac095959890e126e8 (patch)
tree41e3c708a0c5c3cb4a318ebcd7739e3f2dc74552 /templates/tree.html
parentac0983a89692534daa3d36dba528461b5bb32dbc (diff)
downloadlegit-f4ff8fe6eb20ab5b557d7beac095959890e126e8.tar.gz
legit-f4ff8fe6eb20ab5b557d7beac095959890e126e8.tar.bz2
legit-f4ff8fe6eb20ab5b557d7beac095959890e126e8.zip
fix routes
Diffstat (limited to '')
-rw-r--r--templates/tree.html90
1 files changed, 46 insertions, 44 deletions
diff --git a/templates/tree.html b/templates/tree.html
index c4b7e4f..a4f0d1b 100644
--- a/templates/tree.html
+++ b/templates/tree.html
@@ -3,53 +3,55 @@
{{ template "head" . }}
- {{ template "repoheader" . }}
- <body>
- {{ template "nav" . }}
- <main>
- {{ $repo := .name }}
- {{ $ref := .ref }}
- {{ $parent := .parent }}
+{{ template "repoheader" . }}
- <div class="tree">
+<body>
+ {{ template "nav" . }}
+ <main>
+ {{ $repo := .repo }}
+ {{ $ref := .ref }}
+ {{ $parent := .parent }}
+
+ <div class="tree">
+ {{ if $parent }}
+ <div></div>
+ <div></div>
+ <div><a href="/{{ $repo }}/tree/{{ $ref }}/{{ .dotdot }}">..</a></div>
+ {{ end }}
+ {{ range .files }}
+ {{ if not .IsFile }}
+ <div class="mode">{{ .Mode }}</div>
+ <div class="size">{{ .Size }}</div>
+ <div>
{{ if $parent }}
- <div></div>
- <div></div>
- <div><a href="/{{ $repo }}/tree/{{ $ref }}/{{ .dotdot }}">..</a></div>
- {{ end }}
- {{ range .files }}
- {{ if not .IsFile }}
- <div class="mode">{{ .Mode }}</div>
- <div class="size">{{ .Size }}</div>
- <div>
- {{ if $parent }}
- <a href="/{{ $repo }}/tree/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}/</a>
- {{ else }}
- <a href="/{{ $repo }}/tree/{{ $ref }}/{{ .Name }}">{{ .Name }}/</a>
- {{ end }}
- </div>
- {{ end }}
- {{ end }}
- {{ range .files }}
- {{ if .IsFile }}
- <div class="mode">{{ .Mode }}</div>
- <div class="size">{{ .Size }}</div>
- <div>
- {{ if $parent }}
- <a href="/{{ $repo }}/blob/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}</a>
- {{ else }}
- <a href="/{{ $repo }}/blob/{{ $ref }}/{{ .Name }}">{{ .Name }}</a>
- {{ end }}
- </div>
+ <a href="/{{ $repo }}/tree/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}/</a>
+ {{ else }}
+ <a href="/{{ $repo }}/tree/{{ $ref }}/{{ .Name }}">{{ .Name }}/</a>
{{ end }}
+ </div>
+ {{ end }}
+ {{ end }}
+ {{ range .files }}
+ {{ if .IsFile }}
+ <div class="mode">{{ .Mode }}</div>
+ <div class="size">{{ .Size }}</div>
+ <div>
+ {{ if $parent }}
+ <a href="/{{ $repo }}/blob/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}</a>
+ {{ else }}
+ <a href="/{{ $repo }}/blob/{{ $ref }}/{{ .Name }}">{{ .Name }}</a>
{{ end }}
</div>
- <article>
- <pre>
- {{- if .readme }}{{ .readme }}{{- end -}}
- </pre>
- </article>
- </main>
- </body>
+ {{ end }}
+ {{ end }}
+ </div>
+ <article>
+ <pre>
+ {{- if .readme }}{{ .readme }}{{- end -}}
+ </pre>
+ </article>
+ </main>
+</body>
+
</html>
-{{ end }}
+{{ end }} \ No newline at end of file