showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
pulls.html
1.2 KB · 28 lines
1{{define "content" -}}2{{template "repohead" .}}3{{- if .Pulls}}4<section class="box">5 <h2 class="box-head">{{template "icon" "pull"}}{{len .Pulls}} pull request{{if ne (len .Pulls) 1}}s{{end}}</h2>6 <ol class="rows">7 {{- range .Pulls}}{{$state := .State}}{{if .Merged}}{{$state = "merged"}}{{end}}8 <li class="pull" id="pr-{{.Number}}">9 <details>10 <summary class="row">11 <span class="pr-icon pr--{{$state}}">{{template "icon" "pull"}}</span>12 <div class="row-main">13 <span class="row-title">{{.Title}}</span>14 <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Comments}} · {{.}} comment{{if ne . 1}}s{{end}}{{end}}</span>15 </div>16 <span class="badge badge--{{$state}}">{{$state}}</span>17 </summary>18 <div class="pull-body markdown">{{if .Body}}{{.Body}}{{else}}<p class="muted">No description.</p>{{end}}</div>19 {{- template "thread" .}}20 </details>21 </li>22 {{- end}}23 </ol>24</section>25{{- else}}26{{template "emptystate" (dict "Icon" "pull" "Title" "No pull requests." "Hint" "This mirror is read-only. Clone the repository to work on it.")}}27{{- end}}28{{- end}}