gitlin/views/dir.html

45 行
1.7 KiB
HTML
Raw パーマリンク 通常表示 履歴

2023-03-16 18:28:53 +09:00
{{ template "header" .}}
<main>
{{ if .dir }} {{ range $key, $value := .dir}}
<div class="button-parent">
<a rel="noreferrer" href="https://github.com/{{.Username}}/{{.Reponame}}/tree/{{.Branch}}/{{.DirName}}" class="button">GitHubで確認</a>
<a href="/{{.Username}}/{{.Reponame}}/tree/{{.Branch}}/{{.Branch}}" class="button">{{.Username}}/{{.Reponame}}へ戻る</a>
2023-03-16 18:28:53 +09:00
</div>
<div class="user-profile">
<h1><a href="/{{.Username}}">{{.Username}}</a>/<a href="/{{.Username}}/{{.Reponame}}">{{.Reponame}}</a> | {{.DirName}}</h1>
2023-03-16 18:28:53 +09:00
</div>
{{end}} {{ if .files}}
<div class="user-readme">
2023-06-07 11:03:32 +09:00
<h3>ファイル</h3>
<table class="user-readme-text file-table">
<tbody>
{{ range $key, $value := .files}}
<tr class="file-u-list">
{{ if eq .Type "dir" }}
<td class="file-list">📁 <a href="/{{.Username}}/{{.Reponame}}/tree/{{.Branch}}/{{.DirName}}/{{.Path}}" class="filesA">{{.Path}}</a></td>
{{ else }}
<td class="file-list">🗒️ <a href="/{{.Username}}/{{.Reponame}}/blob/{{.Branch}}/{{.DirName}}/{{.Path}}">{{.Path}}</a></td>
{{ end }}
<td class="file-list">{{.Commit}}</td>
<td class="file-list" style="text-align: right;">{{.Date}}</td>
</tr>
{{ end }}
</tbody>
</table>
2023-03-16 18:28:53 +09:00
</div>
{{ end }} {{ if .readme}}
<div class="user-readme">
2023-03-16 18:28:53 +09:00
{{ if .dir }} {{ range $key, $value := .dir }}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
<div class="user-readme-text">{{ unescape .readme}}</div>
2023-03-16 18:28:53 +09:00
</div>
{{ end }} {{ else }}
2023-06-07 11:03:32 +09:00
<h2>フォルダを見つけられません</h2>
<p>このフォルダが存在しないようです。</p>
2023-03-16 18:28:53 +09:00
{{ end }}
</main>
{{ template "footer" .}}