1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

Final tweaks for github smart section

This commit is contained in:
EnesAlili 2016-09-05 15:19:25 +01:00
parent 63ff537780
commit 03594a4452
6 changed files with 19 additions and 17 deletions

View file

@ -15,12 +15,12 @@ const commitsTemplate = `
<div class="section-github-render">
{{if .HasAuthorStats}}
<h3>Contributors</h3>
<p>
There
{{if eq 1 (len .AuthorStats)}}is{{else}}are{{end}}
{{len .AuthorStats}}
{{if eq 1 (len .AuthorStats)}}contributor{{else}}contributors{{end}}
{{if eq 1 .NumContributors}}is{{else}}are{{end}}
{{.NumContributors}}
{{if eq 1 .NumContributors}}contributor{{else}}contributors{{end}}
across {{.RepoCount}}
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
</p>
@ -29,11 +29,11 @@ const commitsTemplate = `
<tbody class="github">
{{range $stats := .AuthorStats}}
<tr>
<td style="width:5%;">
<td class="width-5">
<img class="github-avatar" alt="@{{$stats.Author}}" src="{{$stats.Avatar}}" height="36" width="36">
</td>
<td style="width:95%;">
<td class="width-95">
<h6>{{$stats.Author}}</h6>
{{if gt $stats.OpenIssues 0}}
has been assigned {{$stats.OpenIssues}}
@ -81,6 +81,7 @@ const commitsTemplate = `
</td>
<td style="width:55%;">
{{if $commit.ShowBranch}}{{$commit.Repo}}:<span class="branch">{{$commit.Branch}}</span>{{end}}
<br>
</td>
</tr>
{{end}}

View file

@ -50,11 +50,11 @@ const (
</p>
<div class="github-board">
<table class="issue-table" style="width: 100%;">
<table class="issue-table width-100">
<tbody class="github">
{{range $data := .Issues}}
<tr>
<td style="width:5%;">
<td class="width-5">
<div class="issue-avatar">
{{if $data.IsOpen}}
` + openIsvg + `
@ -64,12 +64,12 @@ const (
</div>
</td>
<td style="width:55%;">
<td class="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:40%;">
<td class="width-40">
<h6>{{$data.Repo}}</h6> <br>
<span class="date-meta">{{$data.Creator}} opened on {{$data.Date}}</span>
</td>

View file

@ -42,7 +42,7 @@ const (
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
</p>
<div class="github-board">
<table class="milestone-table" style="width: 100%;">
<table class="milestone-table width-100">
<tbody class="github">
{{range $data := .Milestones}}
<tr>
@ -55,14 +55,14 @@ const (
{{end}}
{{end}}
</td>
<td style="width:55%;">
<td class="width-55">
<h6>{{$data.Name}}</h6>
{{if $data.IsMilestone}}
<span class="date-meta">{{$data.DueDate}}</span>
{{end}}<br>
<span class="repo"><a class="link" href="{{$data.URL}}">{{$data.Repo}}</a></span>
</td>
<td style="width:40%;">
<td class="width-40">
{{if $data.IsMilestone}}
<progress value="{{$data.Progress}}" max="100"></progress> <br>
{{$data.CompleteMsg}} complete {{$data.OpenIssues}} open {{$data.ClosedIssues}} closed

View file

@ -33,11 +33,11 @@ const summaryTemplate = `
shared
{{if eq 1 (len .SharedLabels)}} label {{else}} labels {{end}}
across the repositories.</p>
<table style="width:100%;">
<table class="width-100">
<tbody class="github">
{{range $slabel := .SharedLabels}}
<tr>
<td style="width:100%;">
<td class="width-100">
<span class="github-issue-label" style="background-color:#{{$slabel.Color}}">{{$slabel.Name}} ({{$slabel.Count}})</span> in {{$slabel.Repos}}
</td>
</tr>