| 1 | {{ define "repo-about-sidebar" -}} |
| 2 | <aside class="shithub-repo-about" aria-label="Repository information"> |
| 3 | <div class="shithub-border-grid"> |
| 4 | <section class="shithub-border-grid-row"> |
| 5 | <div class="shithub-repo-about-heading"> |
| 6 | <h2>About</h2> |
| 7 | {{ if .CanSettings }}<a href="/{{ .Owner }}/{{ .Repo.Name }}/settings/general" aria-label="Edit repository about">{{ octicon "gear" }}</a>{{ end }} |
| 8 | </div> |
| 9 | {{ if .Repo.Description }} |
| 10 | <p class="shithub-repo-about-desc">{{ .Repo.Description }}</p> |
| 11 | {{ else }} |
| 12 | <p class="shithub-muted">No description, website, or topics provided.</p> |
| 13 | {{ end }} |
| 14 | {{ if .RepoTopics }} |
| 15 | <div class="shithub-repo-topics"> |
| 16 | {{ range .RepoTopics }}<a href="/search?q=topic%3A{{ . }}" class="shithub-topic">{{ . }}</a>{{ end }} |
| 17 | </div> |
| 18 | {{ end }} |
| 19 | {{ if .RepoAbout.Resources }} |
| 20 | <ul class="shithub-repo-about-list"> |
| 21 | {{ range .RepoAbout.Resources }} |
| 22 | <li> |
| 23 | {{ octicon .Icon }} |
| 24 | {{ if .Href }}<a href="{{ .Href }}">{{ .Label }}</a>{{ else }}<span>{{ .Label }}</span>{{ end }} |
| 25 | </li> |
| 26 | {{ end }} |
| 27 | </ul> |
| 28 | {{ end }} |
| 29 | <ul class="shithub-repo-about-stats"> |
| 30 | <li><a href="/{{ .Owner }}/{{ .Repo.Name }}/stargazers">{{ octicon "star" }} <strong>{{ .Repo.StarCount }}</strong> star{{ if ne .Repo.StarCount 1 }}s{{ end }}</a></li> |
| 31 | <li><a href="/{{ .Owner }}/{{ .Repo.Name }}/watchers">{{ octicon "eye" }} <strong>{{ .Repo.WatcherCount }}</strong> watching</a></li> |
| 32 | <li><a href="/{{ .Owner }}/{{ .Repo.Name }}/forks">{{ octicon "repo-forked" }} <strong>{{ .Repo.ForkCount }}</strong> fork{{ if ne .Repo.ForkCount 1 }}s{{ end }}</a></li> |
| 33 | </ul> |
| 34 | <a class="shithub-repo-report" href="/{{ .Owner }}/{{ .Repo.Name }}/report">Report repository</a> |
| 35 | </section> |
| 36 | |
| 37 | <section class="shithub-border-grid-row"> |
| 38 | <h2 class="shithub-repo-about-section-heading">Releases</h2> |
| 39 | <p class="shithub-muted">No releases published</p> |
| 40 | {{ if .CanSettings }}<a href="/{{ .Owner }}/{{ .Repo.Name }}/releases/new">Create a new release</a>{{ end }} |
| 41 | </section> |
| 42 | |
| 43 | <section class="shithub-border-grid-row"> |
| 44 | <h2 class="shithub-repo-about-section-heading">Packages</h2> |
| 45 | <p class="shithub-muted">No packages published</p> |
| 46 | {{ if .CanSettings }}<a href="/{{ .Owner }}/{{ .Repo.Name }}/packages/new">Publish your first package</a>{{ end }} |
| 47 | </section> |
| 48 | |
| 49 | <section class="shithub-border-grid-row"> |
| 50 | <h2 class="shithub-repo-about-section-heading"> |
| 51 | <span>Contributors</span> |
| 52 | {{ if .RepoAbout.Contributors }}<span class="shithub-repo-section-count">{{ len .RepoAbout.Contributors }}</span>{{ end }} |
| 53 | </h2> |
| 54 | {{ if .RepoAbout.Contributors }} |
| 55 | <div class="shithub-repo-contributors"> |
| 56 | {{ range .RepoAbout.Contributors }} |
| 57 | {{ if .User }} |
| 58 | <a href="/{{ .Username }}" class="shithub-repo-contributor"> |
| 59 | <img src="{{ .AvatarURL }}" alt="" width="32" height="32"> |
| 60 | <span>{{ .Label }}</span> |
| 61 | </a> |
| 62 | {{ else }} |
| 63 | <span class="shithub-repo-contributor"> |
| 64 | <span class="shithub-repo-contributor-identicon shithub-identicon" data-seed="{{ .IdenticonSeed }}" aria-hidden="true"></span> |
| 65 | <span>{{ .Label }}</span> |
| 66 | </span> |
| 67 | {{ end }} |
| 68 | {{ end }} |
| 69 | </div> |
| 70 | {{ else }} |
| 71 | <p class="shithub-muted">No contributors yet.</p> |
| 72 | {{ end }} |
| 73 | </section> |
| 74 | |
| 75 | <section class="shithub-border-grid-row"> |
| 76 | <h2 class="shithub-repo-about-section-heading">Languages</h2> |
| 77 | {{ if .RepoAbout.Languages }} |
| 78 | <div class="shithub-language-bar" aria-hidden="true"> |
| 79 | {{ range .RepoAbout.Languages }}<span style="background-color: {{ .Color }}; width: {{ .Width }};"></span>{{ end }} |
| 80 | </div> |
| 81 | <ul class="shithub-language-list"> |
| 82 | {{ range .RepoAbout.Languages }} |
| 83 | <li> |
| 84 | <span class="shithub-language-dot" style="background-color: {{ .Color }};"></span> |
| 85 | <span>{{ .Name }}</span> |
| 86 | <span>{{ .Percent }}</span> |
| 87 | </li> |
| 88 | {{ end }} |
| 89 | </ul> |
| 90 | {{ else }} |
| 91 | <p class="shithub-muted">No languages detected.</p> |
| 92 | {{ end }} |
| 93 | </section> |
| 94 | </div> |
| 95 | </aside> |
| 96 | {{- end }} |