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

github html and css cleanup. wip

This commit is contained in:
EnesAlili 2016-09-05 12:57:45 +01:00
parent b652bc53f1
commit 781a31fc09
5 changed files with 88 additions and 75 deletions

View file

@ -45,8 +45,18 @@
margin-bottom: 0px; margin-bottom: 0px;
} }
h6 {
font-size: 18px;
margin: 0;
display: inline;
}
h6 a {
color: inherit;
}
p { p {
margin: 0px; margin-top: 5px;
} }
.github-board { .github-board {
@ -68,7 +78,7 @@
tbody.github td { tbody.github td {
border: none !important; border: none !important;
padding: 15px 30px !important; padding: 8px 30px !important;
} }
span.label-private { span.label-private {
@ -88,12 +98,49 @@
} }
table.milestone-table { table.milestone-table {
progress[value] {
background-color: #eeeeee;
border-radius: 3px;
height: 10px;
width: 50%;
}
} }
.github-issue-label {
font-size: 11px;
color: white;
padding: 0px 4px;
margin-right: 5px;
border-radius: 2px;
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
display: inline-block;
line-height: 22px;
}
.date-meta {
color: #767676;
font-size: 13px;
}
.dataid {
color: #767676;
font-size: 13px;
}
.repo {
font-size: 16px;
}
.branch {
font-family: "open_sanssemibold";
}
.milestone {
font-size: 15px;
}
.github-avatar {
border-radius: 4px;
}
} }
@ -122,39 +169,11 @@
margin-right: 10px; margin-right: 10px;
} }
progress[value] {
background-color: #eeeeee;
border-radius: 3px;
height: 10px;
width: 50%;
}
table.contributor-table { table.contributor-table {
margin-top: 30px !important; margin-top: 30px !important;
} }
.github-avatar {
float: left;
margin-right: 20px;
}
.github-avatar img {
border-radius: 4px;
}
.github-issue-label {
font-size: 11px;
color: white;
padding: 0px 4px;
margin-right: 5px;
border-radius: 2px;
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
display: inline-block;
line-height: 22px;
}
table.issue-table td a.link { table.issue-table td a.link {
font-size: 18px; font-size: 18px;
} }

View file

@ -18,24 +18,24 @@ const commitsTemplate = `
<h3>Contributors</h3> <h3>Contributors</h3>
<p> <p>
There There
{{if eq 1 (len .AuthorStats)}}is{{else}}are{{end}} {{if eq 1 (len .AuthorStats)}}is{{else}}are{{end}}
{{len .AuthorStats}} {{len .AuthorStats}}
{{if eq 1 (len .AuthorStats)}}contributor{{else}}contributors{{end}} {{if eq 1 (len .AuthorStats)}}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>
<table class="contributor-table" style="width: 100%;"> <table class="contributor-table" style="width:100%;">
<tbody class="github"> <tbody class="github">
{{range $stats := .AuthorStats}} {{range $stats := .AuthorStats}}
<tr> <tr>
<td style="width: 5%;"> <td style="width:5%;">
<img 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:50%;"> <td style="width:95%;">
{{$stats.Author}} has been assigned {{$stats.OpenIssues}} issues, {{$stats.ClosedIssues}} are now closed, has made {{$stats.CommitCount}} commit on 6 branches. <h6>{{$stats.Author}}</h6> has been assigned {{$stats.OpenIssues}} issues, {{$stats.ClosedIssues}} are now closed, has made {{$stats.CommitCount}} commit on 6 branches.
<br> <br>
{{range $repo := $stats.Repos}} {{$repo}}, {{end}} {{range $repo := $stats.Repos}} {{$repo}}, {{end}}
</td> </td>
@ -48,32 +48,26 @@ const commitsTemplate = `
{{if .HasCommits}} {{if .HasCommits}}
<h3>Commits</h3> <h3>Commits</h3>
<p>There are 24 commits by 3 contributors across 6 repositories.</p>
<table class="contributor-table" style="width: 100%;"> <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>
<tbody class="github"> <tbody class="github">
{{range $commit := .BranchCommits}} {{range $commit := .BranchCommits}}
<tr> <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}} {{if $commit.ShowUser}}
<div class="github-avatar"> <h6>{{$commit.Name}}</h6>
<img alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36">
</div>
{{$commit.Name}}
{{end}} {{end}}
</td> </td>
<td style="width: 40%;"> <td style="width:40%;">
<a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a><br> <a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a><br>
<span class="date-meta">{{if $commit.ShowDate}}{{$commit.Date}}{{end}}</span> <span class="date-meta">{{if $commit.ShowDate}}{{$commit.Date}}{{end}}</span>
</td> </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> </tr>
{{end}} {{end}}
</tbody> </tbody>

View file

@ -31,7 +31,11 @@ const (
{{if .HasIssues}} {{if .HasIssues}}
<h3>Issues</h3> <h3>Issues</h3>
<p> <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}} {{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
</p> </p>
<p> <p>
@ -52,7 +56,7 @@ const (
<tbody class="github"> <tbody class="github">
{{range $data := .Issues}} {{range $data := .Issues}}
<tr> <tr>
<td style="width: 5%;"> <td style="width:5%;">
<div class="issue-avatar"> <div class="issue-avatar">
{{if $data.IsOpen}} {{if $data.IsOpen}}
` + openIsvg + ` ` + openIsvg + `
@ -62,18 +66,14 @@ const (
</div> </div>
</td> </td>
<td style="width: 35%;"> <td style="width:55%;">
{{$data.Message}}</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> {{$data.Labels}} <span class="milestone">{{$data.Milestone}}</span> <span class="issue-label">{{$data.Labels}}</span>
</td> </td>
<td style="width:60%;"> <td style="width:40%;">
<span><a class="link" href="{{$data.URL}}">{{$data.Repo}}</a></span> <h6>{{$data.Repo}}</h6> <br>
<div class="github-commit-body"> <span class="date-meta">opened on {{$data.Date}} by {{$data.Name}}</span>
<div class="github-commit-meta">
#{{$data.ID}} opened on {{$data.Date}} by {{$data.Name}}
</div>
</div>
</td> </td>
</tr> </tr>
{{end}} {{end}}

View file

@ -34,9 +34,9 @@ const (
<h3>Milestones</h3> <h3>Milestones</h3>
<p> <p>
There are There are
{{.ClosedMS}} {{.ClosedMS}}
{{if eq 1 .ClosedMS}} milestone {{else}} milestones {{end}} {{if eq 1 .ClosedMS}} milestone {{else}} milestones {{end}}
closed and {{.OpenMS}} closed and {{.OpenMS}}
{{if eq 1 .OpenMS}} milestone {{else}} milestones {{end}} {{if eq 1 .OpenMS}} milestone {{else}} milestones {{end}}
open across {{.RepoCount}} open across {{.RepoCount}}
{{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}} {{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}
@ -46,7 +46,7 @@ const (
<tbody class="github"> <tbody class="github">
{{range $data := .Milestones}} {{range $data := .Milestones}}
<tr> <tr>
<td style="width: 5%;"> <td style="width:5%;">
{{if $data.IsMilestone}} {{if $data.IsMilestone}}
{{if $data.IsOpen}} {{if $data.IsOpen}}
` + openMSsvg + ` ` + openMSsvg + `
@ -55,14 +55,14 @@ const (
{{end}} {{end}}
{{end}} {{end}}
</td> </td>
<td style="width: 35%;"> <td style="width:55%;">
<span class="milestone">{{$data.Name}}</span> <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><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: 60%;"> <td style="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

@ -27,10 +27,10 @@ const summaryTemplate = `
{{if .HasSharedLabels}} {{if .HasSharedLabels}}
<h3>Common Labels</h3> <h3>Common Labels</h3>
<p>There <p>There
{{if eq 1 (len .SharedLabels)}} is {{else}} are {{end}} {{if eq 1 (len .SharedLabels)}} is {{else}} are {{end}}
{{len .SharedLabels}} {{len .SharedLabels}}
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 style="width:100%;">
@ -38,7 +38,7 @@ const summaryTemplate = `
{{range $slabel := .SharedLabels}} {{range $slabel := .SharedLabels}}
<tr> <tr>
<td style="width:100%;"> <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> </td>
</tr> </tr>
{{end}} {{end}}