mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
New github design changes
This commit is contained in:
parent
b42fc1f84d
commit
cf007f8006
4 changed files with 148 additions and 79 deletions
|
@ -12,58 +12,69 @@
|
|||
package github
|
||||
|
||||
const commitsTemplate = `
|
||||
<h3>Contributor activity since {{.Config.Since}}{{.Config.DateMessage}}</h3>
|
||||
<div class="section-github-render">
|
||||
<table style="width:80%">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Author</th>
|
||||
<th>Open Issues</th>
|
||||
<th>Closed Issues</th>
|
||||
<th>#commits</th>
|
||||
<th>Branches</th>
|
||||
</tr>
|
||||
|
||||
{{if .HasAuthorStats}}
|
||||
|
||||
<h3>Contributor activity since {{.Config.Since}}{{.Config.DateMessage}}</h3>
|
||||
<table class="contributor-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title">Contributor</th>
|
||||
<th class="title">Assigned/Closed</th>
|
||||
<th class="title">#Commits</th>
|
||||
<th class="title">Branches</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{range $stats := .AuthorStats}}
|
||||
<tr>
|
||||
<td>
|
||||
<td style="width: 20%;">
|
||||
<div class="github-avatar">
|
||||
<img alt="@{{$stats.Author}}" src="{{$stats.Avatar}}" height="36" width="36">
|
||||
</div>
|
||||
{{$stats.Author}}
|
||||
</td>
|
||||
<td>{{$stats.Author}}</td>
|
||||
<td>{{$stats.OpenIssues}}</td>
|
||||
<td>{{$stats.ClosedIssues}}</td>
|
||||
<td>{{$stats.CommitCount}}</td>
|
||||
<td>
|
||||
<td style="width: 15%;">{{$stats.OpenIssues}} / {{$stats.ClosedIssues}}</td>
|
||||
<td style="width: 15%;">{{$stats.CommitCount}}</td>
|
||||
<td style="width: 50%;">
|
||||
{{range $repo := $stats.Repos}}
|
||||
{{$repo}}<br>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<table>
|
||||
{{range $commit := .BranchCommits}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if $commit.ShowRepo}}{{$commit.Repo}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowBranch}}{{$commit.Branch}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowDate}}{{$commit.Date}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowUser}}
|
||||
<img alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36"> {{$commit.Name}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td>
|
||||
<a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{end}}
|
||||
|
||||
{{if .HasCommits}}
|
||||
<h3>Commits activity since {{.Config.Since}}{{.Config.DateMessage}}</h3>
|
||||
<table>
|
||||
{{range $commit := .BranchCommits}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if $commit.ShowRepo}}{{$commit.Repo}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowBranch}}{{$commit.Branch}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowDate}}{{$commit.Date}}{{end}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $commit.ShowUser}}
|
||||
<img alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36"> {{$commit.Name}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td>
|
||||
<a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{end}}
|
||||
|
||||
</div>
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue