gitlin/views/dir.html

55 行
1.4 KiB
HTML
Raw 通常表示 履歴

2023-03-16 18:28:53 +09:00
{{ template "header" .}}
<main>
{{ if .dir }} {{ range $key, $value := .dir}}
<div class="buttonParent">
<a rel="noreferrer" href="https://github.com/{{.Fullname}}/tree/{{.Branch}}/{{.DirName}}" class="button"
2023-03-16 18:55:17 +09:00
>View on GitHub</a
>
<a href="/{{.Fullname}}/tree/{{.Branch}}/{{.Branch}}" class="button"
>Back to {{.Fullname}}</a
>
2023-03-16 18:28:53 +09:00
</div>
<div class="userProfile">
2023-03-16 18:55:17 +09:00
<h1>{{.Fullname}} | {{.DirName}}</h1>
2023-03-16 18:28:53 +09:00
</div>
{{end}} {{ if .files}}
<div class="userReadme">
<h3>Files</h3>
<div class="userReadmeText">
<ul class="filesUList">
{{ range $key, $value := .files}} {{ if eq .Type "dir" }}
<li class="filesList">
2023-03-21 18:41:34 +09:00
📁
2023-03-16 18:55:17 +09:00
<a
href="/{{.Fullname}}/tree/{{.Branch}}/{{.DirName}}/{{.Path}}"
class="filesA"
2023-03-21 18:41:34 +09:00
>{{.Path}}</a
2023-03-16 18:55:17 +09:00
>
2023-03-16 18:28:53 +09:00
</li>
{{ else }}
<li class="filesList">
2023-03-21 18:41:34 +09:00
🗒️
2023-03-16 18:55:17 +09:00
<a href="/{{.Fullname}}/blob/{{.Branch}}/{{.DirName}}/{{.Path}}"
2023-03-16 18:28:53 +09:00
>{{.Path}}</a
>
</li>
{{ end }} {{ end }}
</ul>
</div>
</div>
{{ end }} {{ if .readme}}
<div class="userReadme">
{{ if .dir }} {{ range $key, $value := .dir }}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
<div class="userReadmeText">{{ unescape .readme}}</div>
</div>
{{ end }} {{ else }}
<h2>Directory not found</h2>
<p>That directory doesn't exist.</p>
{{ end }}
</main>
{{ template "footer" .}}