gitlin/views/repo.html

76 行
2.2 KiB
HTML
Raw 通常表示 履歴

{{ template "header" .}}
<main>
2023-03-08 01:58:55 +09:00
{{ if .repo }} {{ range $key, $value := .repo}}
<div class="button-parent">
<a href="/{{.Fullname}}/archive/{{.DefaultBranch}}.zip" class="button"
2023-03-08 01:58:55 +09:00
>Download (zip)</a
>
2023-03-28 22:22:38 +09:00
<a rel="noreferrer" href="https://github.com/{{.Fullname}}" class="button"
>View on GitHub</a
>
2023-03-08 01:58:55 +09:00
</div>
<div class="user-profile">
2023-03-08 01:58:55 +09:00
<h1>{{.Fullname}}</h1>
{{ if .Parent }}
<p>This repository is a fork of <a href="/{{.Parent}}">{{.Parent}}</a>.</p>
{{ end }} {{ if .Description }}
<p>{{.Description}}</p>
2023-03-16 18:55:17 +09:00
{{ end }} {{ if .Link }} <a href="{{.Link}}">{{.Link}}</a> {{end}} {{ if
.Tags }}
<p>Tags: {{range .Tags}} {{.}} {{end}}</p>
{{end}} {{ if .License }}
2023-03-08 01:58:55 +09:00
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ {{.License}} 🌿
{{.DefaultBranch}}
</p>
{{ else }}
2023-03-08 01:58:55 +09:00
<p>
⭐ {{.Stars}} 🍴 {{.Forks}} 👀 {{.Watchers}} ⚖️ No license 🌿
{{.DefaultBranch}}
</p>
{{ end }} {{ if .Language }}
<p>🗒️ {{range .Language}} {{.}} {{end}}</p>
2023-04-28 15:38:42 +09:00
{{end}} {{ if .CommitsBehind }} This repository is {{.CommitsBehind}}
commits behind its parent. {{end}}
2023-03-08 01:58:55 +09:00
</div>
{{end}} {{ if .files}}
<div class="user-readme">
2023-03-08 01:58:55 +09:00
<h3>Files</h3>
<div class="user-readme-text">
<ul class="file-u-list">
2023-03-08 01:58:55 +09:00
{{ range $key, $value := .files}} {{ if eq .Type "dir" }}
<li class="file-list">
2023-03-21 18:41:34 +09:00
📁
2023-03-16 18:55:17 +09:00
<a
href="/{{.Fullname}}/tree/{{.DefaultBranch}}/{{.Path}}"
class="filesA"
2023-03-21 18:41:34 +09:00
>{{.Path}}</a
2023-03-16 18:55:17 +09:00
>
2023-03-08 01:58:55 +09:00
</li>
{{ else }}
<li class="file-list">
2023-03-21 18:41:34 +09:00
🗒️
<a href="/{{.Fullname}}/blob/{{.DefaultBranch}}/{{.Path}}"
2023-03-08 01:58:55 +09:00
>{{.Path}}</a
>
</li>
{{ end }} {{ end }}
</ul>
</div>
</div>
{{ end }} {{ if .readme}}
<div class="user-readme">
2023-03-08 01:58:55 +09:00
{{ if .repo }} {{ range $key, $value := .repo}}
<h3>{{.Readme}}</h3>
{{end}} {{end}}
<div class="user-readme-text">{{ unescape .readme}}</div>
2023-03-08 01:58:55 +09:00
</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:58:55 +09:00
{{ template "footer" .}}