gitlin/views/repo.html

68 行
2.3 KiB
HTML
Raw 通常表示 履歴

{{ template "header" .}}
<main>
{{ if .repo }}
{{ range $key, $value := .repo}}
<div class="buttonParent">
<a href="/download/{{.Fullname}}/{{.DefaultBranch}}" class="button">Download (zip)</a>
<a href="https://github.com/{{.Fullname}}" class="button">View on GitHub</a>
</div>
<div class="userProfile">
<h1>{{.Fullname}}</h1>
2023-02-14 23:54:33 +09:00
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }}
{{ if .Description }}
<p>{{.Description}}</p>
{{ end }}
{{ if .License }}
2023-02-15 00:21:44 +09:00
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿 {{.DefaultBranch}}</p>
{{ else }}
2023-02-15 00:21:44 +09:00
<p>⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿 {{.DefaultBranch}}</p>
{{ end }}
2023-02-15 00:21:44 +09:00
{{ if .Language }}
<p>🗒️
{{range .Language}}
{{.}}
{{end}}
</p>
{{end}}
</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"><a href="#" class="filesA">{{.Path}} (directory)</a></li>
{{ else }}
<li class="filesList"><a href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}">{{.Path}}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ if .readme}}
<div class="userReadme">
2023-02-14 23:54:33 +09:00
{{ if .repo }}
{{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}}
{{end}}
<div class="userReadmeText">
{{ unescape .readme}}
</div>
</div>
{{ end }}
{{ else }}
<h2>Repository not found</h2>
<p>That repository doesn't exist.</p>
{{ end }}
2023-02-14 23:54:33 +09:00
</main>
2023-03-08 01:00:33 +09:00
</body>
</html>