mirror of
https://github.com/documize/community.git
synced 2025-07-20 13:49:42 +02:00
Final tweaks to GitHub n Trello section
This commit is contained in:
parent
26a548598b
commit
25b66f77a1
11 changed files with 69 additions and 67 deletions
|
@ -35,6 +35,8 @@ html {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -46,6 +48,8 @@ a {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
|
||||||
|
|
||||||
a:hover, a:focus {
|
a:hover, a:focus {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
|
@ -24,7 +24,7 @@ $color-header: #f3f5f8;
|
||||||
$color-link: #0092d3;
|
$color-link: #0092d3;
|
||||||
$color-border: #e1e1e1;
|
$color-border: #e1e1e1;
|
||||||
|
|
||||||
$color-input: #a1a1a1;
|
$color-input: #5a5a5a;
|
||||||
$color-stroke: #e1e1e1;
|
$color-stroke: #e1e1e1;
|
||||||
|
|
||||||
$color-tooltip: #a1a1a1;
|
$color-tooltip: #a1a1a1;
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
html, html a {
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-width-font {
|
.fixed-width-font {
|
||||||
font-family: 'courier new', courier;
|
font-family: 'courier new', courier;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
.section-github-editor {
|
.section-github-editor {
|
||||||
|
.github-view label {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.github-repo {
|
.github-repo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -46,7 +50,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-table {
|
.github-table {
|
||||||
margin: 0 !important;
|
margin: 10px 0 !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
|
||||||
|
@ -76,11 +80,15 @@
|
||||||
|
|
||||||
.github-table tbody tr td {
|
.github-table tbody tr td {
|
||||||
border: none!important;
|
border: none!important;
|
||||||
padding-left: 20px!important;
|
padding: 5px 20px 5px 20px !important;
|
||||||
padding-bottom: 0!important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
span.dataid {
|
.github-table .right-column {
|
||||||
|
text-align: right;
|
||||||
|
color:#838d94;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.data {
|
||||||
color:#838d94;
|
color:#838d94;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,11 +101,18 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
progress[value] {
|
.progress-bar {
|
||||||
background-color: $color-off-white;
|
display: inline-block; border-radius: 3px;
|
||||||
border-radius: 3px;
|
width: 40%;
|
||||||
height: 15px;
|
background-color: #f1f1f1;
|
||||||
width: 150px;
|
height: 8px;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #4caf50;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span.issue-state {
|
span.issue-state {
|
||||||
|
|
|
@ -60,20 +60,12 @@
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3c3c3c!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "open_sanslight";
|
font-family: "open_sanslight";
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table.trello-single-board {
|
table.trello-single-board {
|
||||||
|
@ -96,8 +88,7 @@
|
||||||
|
|
||||||
.trello-single-board tbody tr td {
|
.trello-single-board tbody tr td {
|
||||||
border: none!important;
|
border: none!important;
|
||||||
padding-left: 20px!important;
|
padding: 5px 20px 5px 20px !important;
|
||||||
padding-bottom: 0!important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.trello-label {
|
.trello-label {
|
||||||
|
@ -106,7 +97,7 @@
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
|
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
|
||||||
margin-left: 10px;
|
margin-left: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
{{input id="branch-since" value=config.branchSince type="text" }}<br>
|
{{input id="branch-since" value=config.branchSince type="text" }}<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
|
<label>GitHub Views</label>
|
||||||
|
<div class="tip">Select the views you want to show</div>
|
||||||
|
<div class="github-view">
|
||||||
|
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}
|
||||||
<label>Show Milestones</label>
|
<label>Show Milestones</label>
|
||||||
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}<br>
|
{{input id="show-issues" checked=config.showIssues type="checkbox"}}
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Show Issues</label>
|
<label>Show Issues</label>
|
||||||
{{input id="show-issues" checked=config.showIssues type="checkbox"}}<br>
|
{{input id="show-commits" checked=config.showCommits type="checkbox" }}
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
|
||||||
<label>Show Commits</label>
|
<label>Show Commits</label>
|
||||||
{{input id="show-commits" checked=config.showCommits type="checkbox" }}<br>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -71,7 +71,7 @@ const commitsTemplate = `
|
||||||
<table class="github-table" style="width: 100%;">
|
<table class="github-table" style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">Commits <span>{{len .BranchCommits}} commits by {{.NumContributors}} contributors</span>
|
<th class="title">Commits <span>· {{len .BranchCommits}} commits by {{.NumContributors}} contributors</span>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -79,11 +79,11 @@ const commitsTemplate = `
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range $commit := .BranchCommits}}
|
{{range $commit := .BranchCommits}}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="no-width">
|
<td>
|
||||||
<a href="{{$commit.URL}}">{{$commit.Message}}</a>
|
<a href="{{$commit.URL}}">{{$commit.Message}}</a>
|
||||||
<span class="dataid"> {{$commit.Branch}}</span>
|
<span class="data"> {{$commit.Branch}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right;">
|
<td class="right-column">
|
||||||
<div class="contributor-meta">
|
<div class="contributor-meta">
|
||||||
<img class="github-avatar" alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" />
|
<img class="github-avatar" alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" />
|
||||||
{{$commit.Name}}
|
{{$commit.Name}}
|
||||||
|
|
|
@ -33,10 +33,9 @@ const (
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">
|
<th class="title">
|
||||||
Issues <span>{{.ClosedIssues}} closed {{if eq 1 .ClosedIssues}}{{else}}issues{{end}} and {{.OpenIssues}} open
|
Issues <span>· {{.ClosedIssues}} closed {{if eq 1 .ClosedIssues}}{{else}}issues{{end}} and {{.OpenIssues}} open
|
||||||
{{if eq 1 .OpenIssues}}issue{{else}}{{end}}</span>
|
{{if eq 1 .OpenIssues}}issue{{else}}{{end}}</span>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -50,10 +49,10 @@ const (
|
||||||
{{else}}
|
{{else}}
|
||||||
` + closedIsvg + `
|
` + closedIsvg + `
|
||||||
{{end}}
|
{{end}}
|
||||||
<a href="{{$data.URL}}">{{$data.Message}}</a> <span class="dataid">#{{$data.ID}}</span>
|
<a href="{{$data.URL}}">{{$data.Message}}</a> <span class="data">#{{$data.ID}}</span>
|
||||||
{{$data.Labels}}
|
{{$data.Labels}}
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right;">
|
<td class="right-column">
|
||||||
<div class="milestone-meta">
|
<div class="milestone-meta">
|
||||||
<span class="meta-milestone">{{$data.Milestone}}</span> ·
|
<span class="meta-milestone">{{$data.Milestone}}</span> ·
|
||||||
<span class="meta-creator">{{$data.Creator}}</span> · <span class="meta-date">{{$data.Date}}</span>
|
<span class="meta-creator">{{$data.Creator}}</span> · <span class="meta-date">{{$data.Date}}</span>
|
||||||
|
|
|
@ -119,7 +119,7 @@ func getMilestones(client *gogithub.Client, config *githubConfig) ([]githubMiles
|
||||||
dd := "no due date"
|
dd := "no due date"
|
||||||
if v.DueOn != nil {
|
if v.DueOn != nil {
|
||||||
// TODO refactor to add message in red if the milestone is overdue
|
// TODO refactor to add message in red if the milestone is overdue
|
||||||
dd = "due on " + (*v.DueOn).Format(milestonesTimeFormat) + ""
|
dd = "due " + (*v.DueOn).Format(milestonesTimeFormat) + ""
|
||||||
}
|
}
|
||||||
up := ""
|
up := ""
|
||||||
if v.UpdatedAt != nil {
|
if v.UpdatedAt != nil {
|
||||||
|
@ -210,10 +210,10 @@ func renderMilestones(payload *githubRender, c *githubConfig) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if issuesClosed+issuesOpen > 0 {
|
if issuesClosed+issuesOpen > 0 {
|
||||||
payload.Milestones = append(payload.Milestones, githubMilestone{
|
//payload.Milestones = append(payload.Milestones, githubMilestone{
|
||||||
Repo: orb.Repo, Private: orb.Private, Name: noMilestone, IsOpen: true,
|
// Repo: orb.Repo, Private: orb.Private, Name: noMilestone, IsOpen: true,
|
||||||
OpenIssues: issuesOpen, ClosedIssues: issuesClosed, URL: template.URL(orb.URL),
|
// OpenIssues: issuesOpen, ClosedIssues: issuesClosed, URL: template.URL(orb.URL),
|
||||||
})
|
//})
|
||||||
}
|
}
|
||||||
|
|
||||||
hadRepo[rName] = true
|
hadRepo[rName] = true
|
||||||
|
|
|
@ -14,15 +14,15 @@ package github
|
||||||
const (
|
const (
|
||||||
rawMSsvg = `<path d="M8 2H6V0h2v2zm4 5H2c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h10l2 2-2 2zM8 4H6v2h2V4zM6 16h2V8H6v8z"></path>`
|
rawMSsvg = `<path d="M8 2H6V0h2v2zm4 5H2c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h10l2 2-2 2zM8 4H6v2h2V4zM6 16h2V8H6v8z"></path>`
|
||||||
openMSsvg = `
|
openMSsvg = `
|
||||||
<span title="Open milestone">
|
<span class="issue-state" title="Open Milestone">
|
||||||
<svg height="16" width="14" version="1.1" viewBox="0 0 14 16">
|
<svg height="16" width="14" version="1.1" viewBox="0 0 14 16">
|
||||||
` + rawMSsvg + `
|
` + rawMSsvg + `
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
`
|
`
|
||||||
closedMSsvg = `
|
closedMSsvg = `
|
||||||
<span title="Closed milestone">
|
<span class="issue-state" title="Closed Milestone">
|
||||||
<svg aria-hidden="true" class="octicon octicon-check" height="16" version="1.1" viewBox="0 0 12 16" width="12">
|
<svg aria-hidden="true" class="octicon octicon-check" height="16" height="14" version="1.1" viewBox="0 0 12 16">
|
||||||
<path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
|
<path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
|
@ -33,7 +33,7 @@ const (
|
||||||
<table class="github-table" style="width: 100%;">
|
<table class="github-table" style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">Milestones <span> {{.ClosedMS}} closed and {{.OpenMS}} open</span>
|
<th class="title">Milestones <span>· {{.ClosedMS}} closed and {{.OpenMS}} open</span>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -50,21 +50,20 @@ const (
|
||||||
` + closedMSsvg + `
|
` + closedMSsvg + `
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
<a class="link" href="{{$data.URL}}">{{$data.Name}}</a>
|
||||||
|
<span class="data"> · {{if $data.IsMilestone}} {{$data.DueDate}}{{end}} </span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="right-column">
|
||||||
<div class="milestone-name"><a class="link" href="{{$data.URL}}">{{$data.Name}}</a></div>
|
|
||||||
<span class="milestone-meta">{{$data.Repo}}</span>
|
|
||||||
{{if $data.IsMilestone}}
|
{{if $data.IsMilestone}}
|
||||||
<span class="milestone-meta"> · {{$data.DueDate}}</span>
|
<span class="bold color-off-black">{{$data.CompleteMsg}}</span> complete
|
||||||
{{end}}
|
<span class="bold color-off-black">{{$data.OpenIssues}}</span> open
|
||||||
</td>
|
<span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed
|
||||||
<td class="no-width">
|
|
||||||
{{if $data.IsMilestone}}
|
|
||||||
<progress value="{{$data.Progress}}" max="100"></progress>
|
|
||||||
<div class="progress-meta"><span class="bold color-off-black">{{$data.CompleteMsg}}</span> complete <span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="progress-meta"><span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed</div>
|
<span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed
|
||||||
{{end}}
|
{{end}}
|
||||||
|
<div class="progress-bar">
|
||||||
|
<div class="progress" style="width:{{$data.Progress}}%;"></div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -15,8 +15,7 @@ const tradTemplate = `
|
||||||
<div class="section-trello-render">
|
<div class="section-trello-render">
|
||||||
{{if ne .Detail.Board.ID ""}}
|
{{if ne .Detail.Board.ID ""}}
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<h3><a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}} Board</a></h3>
|
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists on <a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}} Board</a></p>
|
||||||
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="non-printable-message">Non-printable</p>
|
<p class="non-printable-message">Non-printable</p>
|
||||||
|
@ -26,7 +25,7 @@ const tradTemplate = `
|
||||||
{{range $data := .Detail.Data}}
|
{{range $data := .Detail.Data}}
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">{{ $data.List.Name }} <span>{{len $data.Cards}} cards</span></th>
|
<th class="title">{{ $data.List.Name }} <span>· {{len $data.Cards}} cards</span></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue