gitlin/views/repo.html

74 行
2.4 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="/{{.Username}}/{{.Reponame}}/archive/{{.DefaultBranch}}.zip" class="button">Download (zip)</a>
<a rel="noreferrer" href="https://github.com/{{.Username}}/{{.Reponame}}" class="button">View on GitHub</a>
2023-03-08 01:58:55 +09:00
</div>
<div class="user-profile">
<h1><a href="/{{.Username}}">{{.Username}}</a>/<a href="/{{.Username}}/{{.Reponame}}">{{.Reponame}}</a></h1>
2023-03-08 01:58:55 +09:00
{{ 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 }}
2023-06-06 20:21:01 +09:00
<p>
{{range $o := .Language}}{{$o.Name}} {{$o.Percent}}, {{end}}
<div class="ui segment">{{range $i, $o := .Language}}
<span style="width: {{$o.Percent}}; background-color: {{$o.Color}}">
&nbsp;
</span>
{{end}}
</div>
</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
📁
<a href="/{{.Username}}/{{.Reponame}}/tree/{{.DefaultBranch}}/{{.Path}}" class="filesA">{{.Path}}</a>
2023-03-08 01:58:55 +09:00
</li>
{{ else }}
<li class="file-list">
2023-03-21 18:41:34 +09:00
🗒️
<a href="/{{.Username}}/{{.Reponame}}/blob/{{.DefaultBranch}}/{{.Path}}">{{.Path}}</a>
2023-03-08 01:58:55 +09:00
</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" .}}