mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
github html and css cleanup. wip
This commit is contained in:
parent
b652bc53f1
commit
781a31fc09
5 changed files with 88 additions and 75 deletions
|
@ -18,24 +18,24 @@ const commitsTemplate = `
|
|||
|
||||
<h3>Contributors</h3>
|
||||
<p>
|
||||
There
|
||||
There
|
||||
{{if eq 1 (len .AuthorStats)}}is{{else}}are{{end}}
|
||||
{{len .AuthorStats}}
|
||||
{{if eq 1 (len .AuthorStats)}}contributor{{else}}contributors{{end}}
|
||||
across {{.RepoCount}}
|
||||
across {{.RepoCount}}
|
||||
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
|
||||
</p>
|
||||
<table class="contributor-table" style="width: 100%;">
|
||||
<table class="contributor-table" style="width:100%;">
|
||||
|
||||
<tbody class="github">
|
||||
{{range $stats := .AuthorStats}}
|
||||
<tr>
|
||||
<td style="width: 5%;">
|
||||
<img alt="@{{$stats.Author}}" src="{{$stats.Avatar}}" height="36" width="36">
|
||||
<td style="width:5%;">
|
||||
<img class="github-avatar" alt="@{{$stats.Author}}" src="{{$stats.Avatar}}" height="36" width="36">
|
||||
</td>
|
||||
|
||||
<td style="width:50%;">
|
||||
{{$stats.Author}} has been assigned {{$stats.OpenIssues}} issues, {{$stats.ClosedIssues}} are now closed, has made {{$stats.CommitCount}} commit on 6 branches.
|
||||
<td style="width:95%;">
|
||||
<h6>{{$stats.Author}}</h6> has been assigned {{$stats.OpenIssues}} issues, {{$stats.ClosedIssues}} are now closed, has made {{$stats.CommitCount}} commit on 6 branches.
|
||||
<br>
|
||||
{{range $repo := $stats.Repos}} {{$repo}}, {{end}}
|
||||
</td>
|
||||
|
@ -48,32 +48,26 @@ const commitsTemplate = `
|
|||
|
||||
{{if .HasCommits}}
|
||||
<h3>Commits</h3>
|
||||
<p>There are 24 commits by 3 contributors across 6 repositories.</p>
|
||||
|
||||
<table class="contributor-table" style="width: 100%;">
|
||||
<thead class="github">
|
||||
<tr>
|
||||
<th class="title">Contributor</th>
|
||||
<th class="title">Commits / Date</th>
|
||||
<th class="title">Repository:Branch</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="contributor-table" style="width:100%;">
|
||||
|
||||
<tbody class="github">
|
||||
{{range $commit := .BranchCommits}}
|
||||
<tr>
|
||||
<td style="width: 20%;">
|
||||
<td style="width:5%;">
|
||||
<img class="github-avatar" alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36">
|
||||
</td>
|
||||
<td style="width:20%;">
|
||||
{{if $commit.ShowUser}}
|
||||
<div class="github-avatar">
|
||||
<img alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36">
|
||||
</div>
|
||||
{{$commit.Name}}
|
||||
<h6>{{$commit.Name}}</h6>
|
||||
{{end}}
|
||||
</td>
|
||||
<td style="width: 40%;">
|
||||
<td style="width:40%;">
|
||||
<a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a><br>
|
||||
<span class="date-meta">{{if $commit.ShowDate}}{{$commit.Date}}{{end}}</span>
|
||||
</td>
|
||||
<td style="width: 30%;">{{if $commit.ShowBranch}}{{$commit.Repo}}:{{$commit.Branch}}{{end}}</td>
|
||||
<td style="width:30%;">{{if $commit.ShowBranch}}{{$commit.Repo}}:<span class="branch">{{$commit.Branch}}</span>{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
|
|
@ -31,7 +31,11 @@ const (
|
|||
{{if .HasIssues}}
|
||||
<h3>Issues</h3>
|
||||
<p>
|
||||
There are {{.ClosedIssues}} closed and {{.OpenIssues}} open across {{.RepoCount}}
|
||||
There are {{.ClosedIssues}} closed
|
||||
{{if eq 1 .ClosedIssues}}issue{{else}}issues{{end}}
|
||||
and {{.OpenIssues}} open
|
||||
{{if eq 1 .OpenIssues}}issue{{else}}issues{{end}}
|
||||
across {{.RepoCount}}
|
||||
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
|
||||
</p>
|
||||
<p>
|
||||
|
@ -52,7 +56,7 @@ const (
|
|||
<tbody class="github">
|
||||
{{range $data := .Issues}}
|
||||
<tr>
|
||||
<td style="width: 5%;">
|
||||
<td style="width:5%;">
|
||||
<div class="issue-avatar">
|
||||
{{if $data.IsOpen}}
|
||||
` + openIsvg + `
|
||||
|
@ -62,18 +66,14 @@ const (
|
|||
</div>
|
||||
</td>
|
||||
|
||||
<td style="width: 35%;">
|
||||
{{$data.Message}}</br>
|
||||
<span class="milestone">{{$data.Milestone}}</span> {{$data.Labels}}
|
||||
<td style="width:55%;">
|
||||
<h6><a class="link" href="{{$data.URL}}">{{$data.Message}} <span class="dataid">#{{$data.ID}}</span></a></h6> </br>
|
||||
<span class="milestone">{{$data.Milestone}}</span> <span class="issue-label">{{$data.Labels}}</span>
|
||||
</td>
|
||||
|
||||
<td style="width:60%;">
|
||||
<span><a class="link" href="{{$data.URL}}">{{$data.Repo}}</a></span>
|
||||
<div class="github-commit-body">
|
||||
<div class="github-commit-meta">
|
||||
#{{$data.ID}} opened on {{$data.Date}} by {{$data.Name}}
|
||||
</div>
|
||||
</div>
|
||||
<td style="width:40%;">
|
||||
<h6>{{$data.Repo}}</h6> <br>
|
||||
<span class="date-meta">opened on {{$data.Date}} by {{$data.Name}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
|
@ -34,9 +34,9 @@ const (
|
|||
<h3>Milestones</h3>
|
||||
<p>
|
||||
There are
|
||||
{{.ClosedMS}}
|
||||
{{.ClosedMS}}
|
||||
{{if eq 1 .ClosedMS}} milestone {{else}} milestones {{end}}
|
||||
closed and {{.OpenMS}}
|
||||
closed and {{.OpenMS}}
|
||||
{{if eq 1 .OpenMS}} milestone {{else}} milestones {{end}}
|
||||
open across {{.RepoCount}}
|
||||
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
|
||||
|
@ -46,7 +46,7 @@ const (
|
|||
<tbody class="github">
|
||||
{{range $data := .Milestones}}
|
||||
<tr>
|
||||
<td style="width: 5%;">
|
||||
<td style="width:5%;">
|
||||
{{if $data.IsMilestone}}
|
||||
{{if $data.IsOpen}}
|
||||
` + openMSsvg + `
|
||||
|
@ -55,14 +55,14 @@ const (
|
|||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td style="width: 35%;">
|
||||
<span class="milestone">{{$data.Name}}</span>
|
||||
<td style="width:55%;">
|
||||
<h6>{{$data.Name}}</h6>
|
||||
{{if $data.IsMilestone}}
|
||||
<span class="date-meta">{{$data.DueDate}}</span>
|
||||
{{end}}<br>
|
||||
<span><a class="link" href="{{$data.URL}}">{{$data.Repo}}</a></span>
|
||||
<span class="repo"><a class="link" href="{{$data.URL}}">{{$data.Repo}}</a></span>
|
||||
</td>
|
||||
<td style="width: 60%;">
|
||||
<td style="width:40%;">
|
||||
{{if $data.IsMilestone}}
|
||||
<progress value="{{$data.Progress}}" max="100"></progress> <br>
|
||||
{{$data.CompleteMsg}} complete {{$data.OpenIssues}} open {{$data.ClosedIssues}} closed
|
||||
|
|
|
@ -27,10 +27,10 @@ const summaryTemplate = `
|
|||
|
||||
{{if .HasSharedLabels}}
|
||||
<h3>Common Labels</h3>
|
||||
<p>There
|
||||
<p>There
|
||||
{{if eq 1 (len .SharedLabels)}} is {{else}} are {{end}}
|
||||
{{len .SharedLabels}}
|
||||
shared
|
||||
shared
|
||||
{{if eq 1 (len .SharedLabels)}} label {{else}} labels {{end}}
|
||||
across the repositories.</p>
|
||||
<table style="width:100%;">
|
||||
|
@ -38,7 +38,7 @@ const summaryTemplate = `
|
|||
{{range $slabel := .SharedLabels}}
|
||||
<tr>
|
||||
<td style="width:100%;">
|
||||
<span style="background-color:#{{$slabel.Color}}">{{$slabel.Name}} ({{$slabel.Count}})</span> in {{$slabel.Repos}}
|
||||
<span class="github-issue-label" style="background-color:#{{$slabel.Color}}">{{$slabel.Name}} ({{$slabel.Count}})</span> in {{$slabel.Repos}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue