| 1 | {{ define "pins-modal" -}} |
| 2 | {{ if .CanCustomizePins }} |
| 3 | <div class="shithub-pins-overlay" data-pins-modal hidden> |
| 4 | <div class="shithub-pins-dialog" role="dialog" aria-modal="true" aria-labelledby="pins-modal-title"> |
| 5 | <div class="shithub-pins-head"> |
| 6 | <h2 id="pins-modal-title">Edit pinned repositories</h2> |
| 7 | <button type="button" class="shithub-icon-button shithub-pins-close" data-pins-close aria-label="Close">{{ octicon "x" }}</button> |
| 8 | </div> |
| 9 | <p class="shithub-pins-help">Select up to six public repositories you'd like to show to anyone.</p> |
| 10 | <form method="post" action="{{ .PinsAction }}" data-pins-form> |
| 11 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 12 | <label class="shithub-pins-filter"> |
| 13 | {{ octicon "search" }} |
| 14 | <input type="search" data-pins-filter placeholder="Filter repositories" aria-label="Filter repositories" autocomplete="off"> |
| 15 | </label> |
| 16 | <p class="shithub-pins-count"><span data-pins-remaining>{{ .PinsRemaining }}</span> remaining</p> |
| 17 | <div class="shithub-pins-list" data-pins-list> |
| 18 | {{ if .PinCandidates }} |
| 19 | {{ range .PinCandidates }} |
| 20 | <label class="shithub-pins-row" data-pins-row data-pins-search="{{ .OwnerSlug }} {{ .Name }} {{ .Description }} {{ .PrimaryLanguage }}"> |
| 21 | <input type="checkbox" name="repo_id" value="{{ .ID }}" data-pins-checkbox{{ if .IsPinned }} checked{{ end }}> |
| 22 | <span class="shithub-pins-row-icon">{{ octicon "repo" }}</span> |
| 23 | <span class="shithub-pins-row-main"> |
| 24 | <span class="shithub-pins-row-name">{{ .OwnerSlug }}/{{ .Name }}</span> |
| 25 | {{ if .Description }}<span class="shithub-pins-row-desc">{{ .Description }}</span>{{ end }} |
| 26 | </span> |
| 27 | <span class="shithub-pins-row-stars">{{ .StarCount }} {{ octicon "star" }}</span> |
| 28 | </label> |
| 29 | {{ end }} |
| 30 | {{ else }} |
| 31 | <p class="shithub-pins-empty">No public repositories available.</p> |
| 32 | {{ end }} |
| 33 | </div> |
| 34 | <div class="shithub-pins-actions"> |
| 35 | <button type="submit" class="shithub-button shithub-button-primary" data-pins-submit>Save pins</button> |
| 36 | </div> |
| 37 | </form> |
| 38 | </div> |
| 39 | </div> |
| 40 | {{ end }} |
| 41 | {{- end }} |