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

@ -79,6 +79,7 @@
tbody.github td { tbody.github td {
border: none !important; border: none !important;
padding: 8px 30px !important; padding: 8px 30px !important;
vertical-align: top;
} }
span.label-private { span.label-private {

View file

@ -26,8 +26,8 @@ type ProdInfo struct {
// Product returns product edition details // Product returns product edition details
func Product() (p ProdInfo) { func Product() (p ProdInfo) {
p.Major = "0" p.Major = "0"
p.Minor = "16" p.Minor = "17"
p.Patch = "1" p.Patch = "0"
p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch) p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch)
p.Edition = "Community" p.Edition = "Community"
p.Title = fmt.Sprintf("%s Edition", p.Edition) p.Title = fmt.Sprintf("%s Edition", p.Edition)

View file

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

View file

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

View file

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

View file

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