| 1 | {{ define "page" -}} |
| 2 | <section class="shithub-org-profile"> |
| 3 | <header class="shithub-org-hero"> |
| 4 | <div class="shithub-org-hero-inner"> |
| 5 | <img class="shithub-org-avatar" src="{{ .AvatarURL }}" alt="" width="96" height="96"> |
| 6 | <div class="shithub-org-identity"> |
| 7 | <h1>{{ if .Org.DisplayName }}{{ .Org.DisplayName }}{{ else }}{{ .Org.Slug }}{{ end }}</h1> |
| 8 | <p class="shithub-org-handle">@{{ .Org.Slug }}</p> |
| 9 | {{ if .Org.Description }}<p class="shithub-org-bio">{{ .Org.Description }}</p>{{ end }} |
| 10 | <ul class="shithub-org-meta" aria-label="Organization metadata"> |
| 11 | {{ if .Org.Location }}<li>{{ octicon "location" }} <span>{{ .Org.Location }}</span></li>{{ end }} |
| 12 | {{ if .WebsiteSafe }}<li>{{ octicon "link" }} <a href="{{ .WebsiteSafe }}" rel="nofollow noopener">{{ .Org.Website }}</a></li>{{ end }} |
| 13 | </ul> |
| 14 | </div> |
| 15 | <div class="shithub-org-hero-actions"> |
| 16 | {{ if .IsOwner }}<a href="/organizations/{{ .Org.Slug }}/settings/profile" class="shithub-button">Settings</a>{{ else }}<button type="button" class="shithub-button" disabled>Follow</button>{{ end }} |
| 17 | </div> |
| 18 | </div> |
| 19 | </header> |
| 20 | |
| 21 | {{ if .Org.SuspendedAt.Valid }} |
| 22 | <p class="shithub-flash shithub-flash-error" role="alert">This organization is suspended. Pushes are blocked; reads continue.</p> |
| 23 | {{ end }} |
| 24 | |
| 25 | <div class="shithub-org-layout"> |
| 26 | <main class="shithub-org-main"> |
| 27 | {{ if or .PinnedRepos .CanCustomizePins }} |
| 28 | <section class="shithub-org-pinned" id="pinned" aria-labelledby="org-pinned-heading"> |
| 29 | <div class="shithub-org-section-head"> |
| 30 | <h2 id="org-pinned-heading">Pinned</h2> |
| 31 | {{ if .CanCustomizePins }}<button type="button" class="shithub-link-button" data-pins-open>Customize pins</button>{{ end }} |
| 32 | </div> |
| 33 | {{ if .PinnedRepos }} |
| 34 | <ol class="shithub-org-pinned-grid"> |
| 35 | {{ range .PinnedRepos }} |
| 36 | <li class="shithub-org-pin-card"> |
| 37 | <div class="shithub-org-pin-title"> |
| 38 | <span class="shithub-org-pin-icon">{{ octicon "repo" }}</span> |
| 39 | <a href="/{{ $.Org.Slug }}/{{ .Name }}">{{ .Name }}</a> |
| 40 | {{ if eq .Visibility "private" }}<span class="shithub-pill shithub-pill-private">Private</span>{{ else }}<span class="shithub-pill">Public</span>{{ end }} |
| 41 | </div> |
| 42 | {{ if .Description }}<p>{{ .Description }}</p>{{ else }}<p class="shithub-muted">No description provided.</p>{{ end }} |
| 43 | <div class="shithub-org-repo-meta"> |
| 44 | {{ if .PrimaryLanguage }}<span><span class="shithub-language-dot" style="background-color: {{ .PrimaryLanguageColor }};"></span>{{ .PrimaryLanguage }}</span>{{ end }} |
| 45 | <span>{{ octicon "star" }} {{ .StarCount }}</span> |
| 46 | <span>{{ octicon "repo-forked" }} {{ .ForkCount }}</span> |
| 47 | </div> |
| 48 | </li> |
| 49 | {{ end }} |
| 50 | </ol> |
| 51 | {{ else }} |
| 52 | <p class="shithub-empty">Nothing pinned yet.</p> |
| 53 | {{ end }} |
| 54 | </section> |
| 55 | {{ end }} |
| 56 | |
| 57 | <section class="shithub-org-repos" id="org-repositories" aria-labelledby="org-repositories-heading"> |
| 58 | <div class="shithub-org-repo-head"> |
| 59 | <h2 id="org-repositories-heading">{{ octicon "repo" }} Repositories</h2> |
| 60 | <form action="/search" method="get" role="search" class="shithub-org-repo-search"> |
| 61 | <input type="search" name="q" placeholder="Find a repository..." aria-label="Find a repository"> |
| 62 | <input type="hidden" name="type" value="repos"> |
| 63 | </form> |
| 64 | <div class="shithub-org-repo-actions"> |
| 65 | <details class="shithub-filter-menu"> |
| 66 | <summary>Type {{ octicon "triangle-down" }}</summary> |
| 67 | <div><a href="#org-repositories">All</a><a href="#org-repositories">Public</a><a href="#org-repositories">Private</a></div> |
| 68 | </details> |
| 69 | <details class="shithub-filter-menu"> |
| 70 | <summary>Language {{ octicon "triangle-down" }}</summary> |
| 71 | <div><a href="#org-repositories">All</a>{{ range .TopLanguages }}<a href="#org-repositories">{{ .Name }}</a>{{ end }}</div> |
| 72 | </details> |
| 73 | <details class="shithub-filter-menu"> |
| 74 | <summary>Sort {{ octicon "triangle-down" }}</summary> |
| 75 | <div><a href="#org-repositories">Last updated</a><a href="#org-repositories">Name</a><a href="#org-repositories">Stars</a></div> |
| 76 | </details> |
| 77 | {{ if .CanCreateRepo }}<a href="/new?owner={{ .Org.Slug }}" class="shithub-button shithub-button-primary">{{ octicon "repo" }} New</a>{{ end }} |
| 78 | </div> |
| 79 | </div> |
| 80 | |
| 81 | {{ if .Repos }} |
| 82 | <ul class="shithub-org-repo-list"> |
| 83 | {{ range .Repos }} |
| 84 | <li class="shithub-org-repo-row"> |
| 85 | <div class="shithub-org-repo-row-main"> |
| 86 | <h3> |
| 87 | <a href="/{{ $.Org.Slug }}/{{ .Name }}">{{ .Name }}</a> |
| 88 | {{ if eq .Visibility "private" }}<span class="shithub-pill shithub-pill-private">Private</span>{{ else }}<span class="shithub-pill">Public</span>{{ end }} |
| 89 | {{ if .IsArchived }}<span class="shithub-pill shithub-pill-archived">Archived</span>{{ end }} |
| 90 | </h3> |
| 91 | {{ if .Description }}<p>{{ .Description }}</p>{{ end }} |
| 92 | {{ if .Topics }} |
| 93 | <div class="shithub-org-row-topics"> |
| 94 | {{ range .Topics }}<a href="/search?q=topic:{{ . }}&type=repos" class="shithub-topic">{{ . }}</a>{{ end }} |
| 95 | </div> |
| 96 | {{ end }} |
| 97 | <div class="shithub-org-repo-meta"> |
| 98 | {{ if .PrimaryLanguage }}<span><span class="shithub-language-dot" style="background-color: {{ .PrimaryLanguageColor }};"></span>{{ .PrimaryLanguage }}</span>{{ end }} |
| 99 | {{ if .LicenseKey }}<span>{{ octicon "law" }} {{ .LicenseKey }}</span>{{ end }} |
| 100 | <span>{{ octicon "star" }} {{ .StarCount }}</span> |
| 101 | <span>{{ octicon "repo-forked" }} {{ .ForkCount }}</span> |
| 102 | <time datetime="{{ .UpdatedAt.Format "2006-01-02T15:04:05Z" }}">Updated {{ relativeTime .UpdatedAt }}</time> |
| 103 | </div> |
| 104 | </div> |
| 105 | {{ .ActivitySparkline }} |
| 106 | </li> |
| 107 | {{ end }} |
| 108 | </ul> |
| 109 | {{ else }} |
| 110 | <div class="shithub-org-empty"> |
| 111 | <h3>No repositories yet.</h3> |
| 112 | {{ if .CanCreateRepo }}<a href="/new?owner={{ .Org.Slug }}" class="shithub-button shithub-button-primary">Create a repository</a>{{ end }} |
| 113 | </div> |
| 114 | {{ end }} |
| 115 | </section> |
| 116 | </main> |
| 117 | |
| 118 | <aside class="shithub-org-sidebar" aria-label="Organization sidebar"> |
| 119 | <section class="shithub-org-sidebox"> |
| 120 | <span class="shithub-button shithub-org-viewas" aria-label="View mode">{{ octicon "eye" }} View as: {{ .ViewAs }}</span> |
| 121 | <p>You are viewing the public profile, README, and visible repositories for this organization.</p> |
| 122 | </section> |
| 123 | |
| 124 | <section class="shithub-org-sidebox"> |
| 125 | <h2>Discussions</h2> |
| 126 | <p>Set up discussions to engage with your community.</p> |
| 127 | </section> |
| 128 | |
| 129 | <section class="shithub-org-sidebox"> |
| 130 | <h2>People</h2> |
| 131 | {{ if .People }} |
| 132 | <div class="shithub-org-people-strip"> |
| 133 | {{ range .People }}<a href="/{{ .Username }}" title="{{ if .DisplayName }}{{ .DisplayName }}{{ else }}{{ .Username }}{{ end }}"><img src="{{ .AvatarURL }}" alt="" width="32" height="32"></a>{{ end }} |
| 134 | </div> |
| 135 | {{ else }} |
| 136 | <p class="shithub-muted">This organization has no public members.</p> |
| 137 | {{ end }} |
| 138 | <p><strong>{{ .MemberCount }}</strong> member{{ if ne .MemberCount 1 }}s{{ end }}</p> |
| 139 | </section> |
| 140 | |
| 141 | <section class="shithub-org-sidebox"> |
| 142 | <h2>Top languages</h2> |
| 143 | {{ if .TopLanguages }} |
| 144 | <ul class="shithub-org-language-list"> |
| 145 | {{ range .TopLanguages }} |
| 146 | <li><span><span class="shithub-language-dot" style="background-color: {{ .Color }};"></span>{{ .Name }}</span><span>{{ .Percent }}%</span></li> |
| 147 | {{ end }} |
| 148 | </ul> |
| 149 | {{ else }} |
| 150 | <p class="shithub-muted">No languages detected.</p> |
| 151 | {{ end }} |
| 152 | </section> |
| 153 | |
| 154 | <section class="shithub-org-sidebox"> |
| 155 | <h2>Most used topics</h2> |
| 156 | {{ if .TopTopics }} |
| 157 | <div class="shithub-org-topic-list"> |
| 158 | {{ range .TopTopics }}<a href="/search?q=topic:{{ .Name }}&type=repos" class="shithub-topic">{{ .Name }}</a>{{ end }} |
| 159 | </div> |
| 160 | {{ else }} |
| 161 | <p class="shithub-muted">No topics yet.</p> |
| 162 | {{ end }} |
| 163 | </section> |
| 164 | </aside> |
| 165 | </div> |
| 166 | </section> |
| 167 | {{ template "pins-modal" . }} |
| 168 | {{- end }} |