tools/module/gitea/pages/index.go.html

82 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gitea | Melon Tools</title>
<style>
html, body {
background-color: #2a2c2d;
color: #d8d4d0;
}
a {
color: #4699fa;
}
.page-content {
display: flex;
flex-direction: row;
align-items: flex-start;
flex-wrap: wrap;
}
</style>
</head>
<body>
<h1>Gitea | <a href="/">Melon Tools</a></h1>
<div class="page-content">
<div>
<p>Select repository source:</p>
<ul>
<li>
<a href="?org=!me">{{.Username}} (my user account)</a>
</li>
{{range .Orgs}}
<li>
<a href="?org={{.Name}}">{{.Name}}</a>
</li>
{{end}}
</ul>
</div>
{{if .ShowOrg}}
<div>
<p>Select repository:</p>
<ul>
{{range .Repos}}
<li>
<a href="?org={{$.SelOrg}}&repo={{.Name}}">
<span>{{$.MyOrg}}/{{.Name}}</span>
{{if .Private}}
<span> (private)</span>
{{end}}
</a>
</li>
{{end}}
</ul>
</div>
{{end}}
<div>
{{if .ShowGoMod}}
<p>Repository details:</p>
<p>Go import: go get {{.SelModule}}@v0.0.0-{{.CommitTime}}-{{.CommitHashShort}}</p>
{{end}}
{{if .ShowSpec}}
<div>
<p>OpenAPI specs:</p>
<ul>
{{range .Specs}}
<li>
{{if not (eq .Code 200)}}
{{.Name}} ({{.Code}})
{{else}}
<a href="/gitea/spec/{{$.SelOrg}}/{{$.SelRepo}}/{{$.CommitHash}}/{{.Name}}" target="_blank">{{.Name}}</a>
{{end}}
</li>
{{end}}
</ul>
</div>
{{end}}
</div>
</div>
</body>
</html>