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

82 lines
2.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
2022-03-28 21:22:34 +01:00
<html lang="en-GB">
<head>
2022-04-04 22:07:15 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gitea | Melon Tools</title>
2022-03-26 00:26:20 +00:00
<style>
2022-04-05 09:15:50 +01:00
html, body {
background-color: #2a2c2d;
color: #d8d4d0;
}
a {
color: #4699fa;
}
2022-03-26 00:26:20 +00:00
.page-content {
display: flex;
flex-direction: row;
align-items: flex-start;
2022-04-04 22:07:15 +01:00
flex-wrap: wrap;
2022-03-26 00:26:20 +00:00
}
</style>
</head>
<body>
2022-05-16 12:54:08 +01:00
<h1>Gitea | <a href="/">Melon Tools</a></h1>
2022-03-26 00:26:20 +00:00
<div class="page-content">
<div>
<p>Select repository source:</p>
<ul>
<li>
2022-09-08 17:22:22 +01:00
<a href="?org=!me">{{.Username}} (my user account)</a>
2022-03-26 00:26:20 +00:00
</li>
{{range .Orgs}}
2022-09-08 17:22:22 +01:00
<li>
<a href="?org={{.Name}}">{{.Name}}</a>
</li>
2022-03-26 00:26:20 +00:00
{{end}}
</ul>
</div>
{{if .ShowOrg}}
2022-09-08 17:22:22 +01:00
<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>
2022-03-26 00:26:20 +00:00
{{end}}
2022-09-09 16:05:46 +01:00
<div>
{{if .ShowGoMod}}
2022-09-08 17:22:22 +01:00
<p>Repository details:</p>
<p>Go import: go get {{.SelModule}}@v0.0.0-{{.CommitTime}}-{{.CommitHash}}</p>
2022-09-09 16:05:46 +01:00
{{end}}
{{if .ShowSpec}}
<div>
<p>OpenAPI specs:</p>
<ul>
{{range .Specs}}
<li>
{{if not (eq .Code 200)}}
{{.Name}} ({{.Code}})
{{else}}
<a href="?org={{$.SelOrg}}&repo={{$.SelRepo}}&spec={{.Name}}" target="_blank">{{.Name}}</a>
{{end}}
</li>
{{end}}
</ul>
</div>
{{end}}
</div>
</div>
</body>
</html>