1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-09 07:25:23 +02:00

add issues icon

This commit is contained in:
Elliott Stoneham 2016-06-29 17:15:49 +01:00
parent 8e342d0c2a
commit f5c1f9ecbf
2 changed files with 9 additions and 5 deletions

View file

@ -426,10 +426,11 @@ func (*Provider) getIssues(client *gogithub.Client, config githubConfig) ([]gith
ret = append(ret, githubIssue{ ret = append(ret, githubIssue{
Name: n, Name: n,
Message: *v.Title, Message: *v.Title,
Date: v.UpdatedAt.Format("January 2 2006, 15:04"), Date: v.CreatedAt.Format("January 2 2006, 15:04"),
Avatar: a, Avatar: a,
URL: template.URL(*v.HTMLURL), URL: template.URL(*v.HTMLURL),
Labels: template.HTML(l), Labels: template.HTML(l),
ID: *v.Number,
}) })
} }

View file

@ -86,12 +86,14 @@ var renderTemplates = map[string]string{
<li class="github-commit-item"> <li class="github-commit-item">
<a class="link" href="{{$data.URL}}"> <a class="link" href="{{$data.URL}}">
<div class="github-avatar"> <div class="github-avatar">
<img alt="@{{$data.Name}}" src="{{$data.Avatar}}" height="36" width="36"> <span class="tooltipped tooltipped-n" aria-label="Open issue">
<svg aria-hidden="true" class="octicon octicon-issue-opened open" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
</span>
</div> </div>
<div class="github-commit-body"> <div class="github-commit-body">
<div class="github-commit-title">{{$data.Message}}</div> <div class="github-commit-title">{{$data.Message}} {{$data.Labels}}</div>
<div class="github-commit-meta"> <div class="github-commit-meta">
{{$data.Name}} committed on {{$data.Date}} {{$data.Labels}} #{{$data.ID}} opened on {{$data.Date}} by {{$data.Name}}
</div> </div>
</div> </div>
</a> </a>
@ -173,6 +175,7 @@ type githubCommit struct {
} }
type githubIssue struct { type githubIssue struct {
ID int `json:"id"`
Date string `json:"date"` Date string `json:"date"`
Message string `json:"message"` Message string `json:"message"`
URL template.URL `json:"url"` URL template.URL `json:"url"`