| 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" }} in the last year</h2> |
| 104 | <details class="shithub-profile-contrib-settings"> |
| 105 | <summary>Contribution settings {{ octicon "triangle-down" }}</summary> |
| 106 | <div> |
| 107 | <strong>Private contributions</strong> |
| 108 | <p>Private contribution counts are shown only when those repositories are visible to you.</p> |
| 109 | <strong>Activity overview</strong> |
| 110 | <p>Activity is summarized from visible repositories on this shithub instance.</p> |
| 111 | </div> |
| 112 | </details> |
| 113 | </div> |
| 114 | |
| 115 | <div class="shithub-profile-contrib-layout"> |
| 116 | <div class="shithub-profile-calendar" role="img" aria-label="{{ .Contributions.Total }} contributions in the last year"> |
| 117 | <div class="shithub-contrib-months" aria-hidden="true"> |
| 118 | {{ range .Contributions.Weeks }}<span>{{ .MonthLabel }}</span>{{ end }} |
| 119 | </div> |
| 120 | <div class="shithub-contrib-grid-wrap"> |
| 121 | <div class="shithub-contrib-weekdays" aria-hidden="true"> |
| 122 | <span></span><span>Mon</span><span></span><span>Wed</span><span></span><span>Fri</span><span></span> |
| 123 | </div> |
| 124 | <div class="shithub-contrib-weeks"> |
| 125 | {{ range .Contributions.Weeks }} |
| 126 | <div class="shithub-contrib-week"> |
| 127 | {{ range .Days }} |
| 128 | <span class="shithub-contrib-day level-{{ .Level }}{{ if .IsFuture }} is-future{{ end }}{{ if not .IsInWindow }} is-outside{{ end }}" title="{{ .Title }}" aria-label="{{ .Title }}"></span> |
| 129 | {{ end }} |
| 130 | </div> |
| 131 | {{ end }} |
| 132 | </div> |
| 133 | </div> |
| 134 | <div class="shithub-profile-calendar-foot"> |
| 135 | <a href="/docs">Learn how we count contributions</a> |
| 136 | <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> |
| 137 | </div> |
| 138 | </div> |
| 139 | <ol class="shithub-profile-years" aria-label="Contribution years"> |
| 140 | {{ range .Contributions.Years }} |
| 141 | <li><span class="{{ if eq . $.Contributions.CurrentYear }}is-active{{ end }}">{{ . }}</span></li> |
| 142 | {{ end }} |
| 143 | </ol> |
| 144 | </div> |
| 145 | </section> |
| 146 | |
| 147 | <section class="shithub-profile-activity" aria-labelledby="activity-h"> |
| 148 | <h2 id="activity-h">Contribution activity</h2> |
| 149 | <div class="shithub-profile-activity-row"> |
| 150 | <div class="shithub-profile-activity-month">{{ .Contributions.MonthLabel }}</div> |
| 151 | <div class="shithub-profile-activity-item"> |
| 152 | <span class="shithub-profile-activity-icon">{{ octicon "repo" }}</span> |
| 153 | {{ if .Contributions.MonthCommitCount }} |
| 154 | <strong>Created {{ .Contributions.MonthCommitCount }} commit{{ pluralize .Contributions.MonthCommitCount "" "s" }} in {{ .Contributions.MonthRepoCount }} repositor{{ pluralize .Contributions.MonthRepoCount "y" "ies" }}</strong> |
| 155 | {{ else }} |
| 156 | <strong>No public activity yet this month</strong> |
| 157 | {{ end }} |
| 158 | </div> |
| 159 | </div> |
| 160 | <button type="button" class="shithub-button shithub-button-block" disabled>Show more activity</button> |
| 161 | </section> |
| 162 | </main> |
| 163 | </div> |
| 164 | </section> |
| 165 | {{ template "pins-modal" . }} |
| 166 | {{- end }} |