HTML · 10090 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-user-profile">
3 <div class="shithub-profile-tabs-shell">
4 {{ template "profile-tabs" . }}
5 </div>
6
7 <div class="shithub-user-profile-container">
8 <aside class="shithub-user-profile-sidebar" aria-label="{{ .User.Username }} profile">
9 <a class="shithub-profile-avatar-link" href="{{ .AvatarURL }}">
10 <img class="shithub-profile-avatar" src="{{ .AvatarURL }}" alt="@{{ .User.Username }}" width="296" height="296">
11 </a>
12 <div class="shithub-profile-names">
13 <h1>
14 <span class="shithub-profile-name">{{ .DisplayName }}</span>
15 <span class="shithub-profile-handle">{{ .User.Username }}</span>
16 </h1>
17 {{ if .User.Pronouns }}<span class="shithub-profile-pronouns">{{ .User.Pronouns }}</span>{{ end }}
18 </div>
19
20 {{ if .User.Bio }}<div class="shithub-profile-bio">{{ .User.Bio }}</div>{{ end }}
21
22 {{ if .IsSelf }}
23 <a href="/settings/profile" class="shithub-button shithub-button-block">Edit profile</a>
24 {{ else }}
25 <button type="button" class="shithub-button shithub-button-block" disabled>Follow</button>
26 {{ end }}
27
28 <p class="shithub-profile-follow-counts">
29 {{ octicon "people" }}
30 <span><strong>0</strong> followers</span>
31 <span class="shithub-profile-dot" aria-hidden="true">·</span>
32 <span><strong>0</strong> following</span>
33 </p>
34
35 <ul class="shithub-profile-vcard">
36 {{ if .User.Company }}<li>{{ octicon "organization" }} <span>{{ .User.Company }}</span></li>{{ end }}
37 {{ if .User.Location }}<li>{{ octicon "location" }} <span>{{ .User.Location }}</span></li>{{ end }}
38 {{ if .WebsiteSafe }}<li>{{ octicon "link" }} <a href="{{ .WebsiteSafe }}" rel="nofollow noopener">{{ .User.Website }}</a></li>{{ end }}
39 <li>{{ octicon "calendar" }} <span>Joined {{ .JoinedFormatted }}</span></li>
40 </ul>
41
42 {{ if .Orgs }}
43 <section class="shithub-profile-sidebar-section" aria-labelledby="profile-orgs-heading">
44 <h2 id="profile-orgs-heading">Organizations</h2>
45 <div class="shithub-profile-orgs">
46 {{ range .Orgs }}
47 <a href="/{{ .Slug }}" aria-label="{{ .DisplayName }}">
48 <img src="{{ .AvatarURL }}" alt="" width="32" height="32">
49 </a>
50 {{ end }}
51 </div>
52 </section>
53 {{ end }}
54 </aside>
55
56 <main class="shithub-user-profile-main">
57 {{ if .HasProfileReadme }}
58 <section class="shithub-profile-readme-card markdown-body" aria-label="Profile README">
59 <header>
60 <div class="shithub-profile-readme-title">
61 <a href="/{{ .ProfileReadme.Owner }}/{{ .ProfileReadme.Repo }}">{{ .ProfileReadme.Owner }}</a>
62 <span>/</span>
63 <strong>{{ .ProfileReadme.Path }}</strong>
64 </div>
65 {{ if .IsSelf }}
66 <a class="shithub-icon-link" href="/{{ .ProfileReadme.Owner }}/{{ .ProfileReadme.Repo }}/edit/{{ .ProfileReadme.Ref }}/{{ .ProfileReadme.Path }}" aria-label="Edit profile README">{{ octicon "pencil" }}</a>
67 {{ end }}
68 </header>
69 <article>{{ .ProfileReadme.HTML }}</article>
70 </section>
71 {{ end }}
72
73 <section class="shithub-profile-pinned" id="pinned" aria-labelledby="pinned-h">
74 <div class="shithub-profile-section-head">
75 <h2 id="pinned-h">Pinned</h2>
76 {{ if .CanCustomizePins }}<button type="button" class="shithub-link-button" data-pins-open>Customize your pins</button>{{ end }}
77 </div>
78 {{ if .PinnedRepos }}
79 <ol class="shithub-profile-pinned-grid">
80 {{ range .PinnedRepos }}
81 <li class="shithub-org-pin-card">
82 <div class="shithub-org-pin-title">
83 <span class="shithub-org-pin-icon">{{ octicon "repo" }}</span>
84 <a href="/{{ .OwnerSlug }}/{{ .Name }}">{{ if ne .OwnerSlug $.User.Username }}{{ .OwnerSlug }}/{{ end }}{{ .Name }}</a>
85 {{ if eq .Visibility "private" }}<span class="shithub-pill shithub-pill-private">Private</span>{{ else }}<span class="shithub-pill">Public</span>{{ end }}
86 </div>
87 {{ if .Description }}<p>{{ .Description }}</p>{{ else }}<p class="shithub-muted">No description provided.</p>{{ end }}
88 <div class="shithub-org-repo-meta">
89 {{ if .PrimaryLanguage }}<span><span class="shithub-language-dot" style="background-color: {{ .PrimaryLanguageColor }};"></span>{{ .PrimaryLanguage }}</span>{{ end }}
90 {{ if .StarCount }}<span>{{ octicon "star" }} {{ .StarCount }}</span>{{ end }}
91 {{ if .ForkCount }}<span>{{ octicon "repo-forked" }} {{ .ForkCount }}</span>{{ end }}
92 </div>
93 </li>
94 {{ end }}
95 </ol>
96 {{ else }}
97 <p class="shithub-empty">Nothing pinned yet.</p>
98 {{ end }}
99 </section>
100
101 <section class="shithub-profile-contributions" aria-labelledby="contrib-h">
102 <div class="shithub-profile-contrib-head">
103 <h2 id="contrib-h">{{ .Contributions.Total }} contribution{{ pluralize .Contributions.Total "" "s" }} {{ .Contributions.Period }}</h2>
104 {{ if .IsSelf }}
105 <details class="shithub-profile-contrib-settings">
106 <summary>Contribution settings {{ octicon "triangle-down" }}</summary>
107 <div class="shithub-contrib-settings-menu">
108 <form method="post" action="{{ .ContributionSettingsAction }}">
109 <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
110 <input type="hidden" name="return_to" value="{{ .ContributionSettingsReturn }}">
111 <input type="hidden" name="include_private_contributions" value="{{ if .Contributions.IncludePrivateContributions }}0{{ else }}1{{ end }}">
112 <button type="submit" class="shithub-contrib-setting-item" aria-pressed="{{ .Contributions.IncludePrivateContributions }}">
113 <span class="shithub-contrib-setting-check" aria-hidden="true">{{ if .Contributions.IncludePrivateContributions }}{{ octicon "check" }}{{ end }}</span>
114 <span>
115 <strong>Private contributions</strong>
116 <span>{{ if .Contributions.IncludePrivateContributions }}Turning off private contributions will show only public activity on your profile.{{ else }}Turning on private contributions will show private activity counts on your profile.{{ end }}</span>
117 </span>
118 </button>
119 </form>
120 <div class="shithub-contrib-setting-item is-static">
121 <span class="shithub-contrib-setting-check" aria-hidden="true"></span>
122 <span>
123 <strong>Activity overview</strong>
124 <span>Turning on the activity overview will show an overview of your activity across organizations and repositories.</span>
125 </span>
126 </div>
127 </div>
128 </details>
129 {{ end }}
130 </div>
131
132 <div class="shithub-profile-contrib-layout">
133 <div class="shithub-profile-calendar" role="img" aria-label="{{ .Contributions.Total }} contributions {{ .Contributions.Period }}">
134 <div class="shithub-contrib-months" aria-hidden="true">
135 {{ range .Contributions.Weeks }}<span>{{ .MonthLabel }}</span>{{ end }}
136 </div>
137 <div class="shithub-contrib-grid-wrap">
138 <div class="shithub-contrib-weekdays" aria-hidden="true">
139 <span></span><span>Mon</span><span></span><span>Wed</span><span></span><span>Fri</span><span></span>
140 </div>
141 <div class="shithub-contrib-weeks">
142 {{ range .Contributions.Weeks }}
143 <div class="shithub-contrib-week">
144 {{ range .Days }}
145 <span class="shithub-contrib-day level-{{ .Level }}{{ if .IsFuture }} is-future{{ end }}{{ if not .IsInWindow }} is-outside{{ end }}" data-title="{{ .Title }}" data-date="{{ .Date }}" data-count="{{ .Count }}" aria-label="{{ .Title }}" tabindex="0"></span>
146 {{ end }}
147 </div>
148 {{ end }}
149 </div>
150 </div>
151 <div class="shithub-profile-calendar-foot">
152 <a href="/docs">Learn how we count contributions</a>
153 <span class="shithub-contrib-legend">Less <i class="level-0"></i><i class="level-1"></i><i class="level-2"></i><i class="level-3"></i><i class="level-4"></i> More</span>
154 </div>
155 </div>
156 <ol class="shithub-profile-years" aria-label="Contribution years">
157 {{ range .Contributions.Years }}
158 <li>
159 {{ if .Active }}
160 <span class="is-active" aria-current="page">{{ .Year }}</span>
161 {{ else }}
162 <a href="{{ .Href }}">{{ .Year }}</a>
163 {{ end }}
164 </li>
165 {{ end }}
166 </ol>
167 </div>
168 </section>
169
170 <section class="shithub-profile-activity" aria-labelledby="activity-h">
171 <h2 id="activity-h">Contribution activity</h2>
172 <div class="shithub-profile-activity-row">
173 <div class="shithub-profile-activity-month">{{ .Contributions.MonthLabel }}</div>
174 <div class="shithub-profile-activity-item">
175 <span class="shithub-profile-activity-icon">{{ octicon "repo" }}</span>
176 {{ if .Contributions.MonthCommitCount }}
177 <strong>Created {{ .Contributions.MonthCommitCount }} commit{{ pluralize .Contributions.MonthCommitCount "" "s" }} in {{ .Contributions.MonthRepoCount }} repositor{{ pluralize .Contributions.MonthRepoCount "y" "ies" }}</strong>
178 {{ else }}
179 <strong>No activity in {{ .Contributions.MonthLabel }}</strong>
180 {{ end }}
181 </div>
182 </div>
183 <button type="button" class="shithub-button shithub-button-block" disabled>Show more activity</button>
184 </section>
185 </main>
186 </div>
187 </section>
188 {{ template "pins-modal" . }}
189 {{- end }}