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;
}
h6 {
font-size: 18px;
margin: 0;
display: inline;
}
h6 a {
color: inherit;
}
p {
margin: 0px;
margin-top: 5px;
}
.github-board {
@ -68,7 +78,7 @@
tbody.github td {
border: none !important;
padding: 15px 30px !important;
padding: 8px 30px !important;
}
span.label-private {
@ -88,12 +98,49 @@
}
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;
}
progress[value] {
background-color: #eeeeee;
border-radius: 3px;
height: 10px;
width: 50%;
}
table.contributor-table {
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 {
font-size: 18px;
}

View file

@ -31,11 +31,11 @@ const commitsTemplate = `
{{range $stats := .AuthorStats}}
<tr>
<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 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>
<tbody class="github">
{{range $commit := .BranchCommits}}
<tr>
<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%;">
<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>

View file

@ -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>
@ -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}}

View file

@ -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

View file

@ -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}}