gitlin/views/user.html

82 行
2.6 KiB
HTML
Raw 通常表示 履歴

{{ template "header" .}}
<main>
{{ if .user }}
{{ range $key, $value := .user}}
<div class="buttonParent">
<a href="https://github.com/{{.Login}}" class="button">View on GitHub</a>
</div>
<div class="userProfile">
<img src="{{ .AvatarUrl }}" alt="{{.Login}}'s avatar" class="avatar" width="150" height="150">
{{ if .Name }}
<h1 class="user-profile-h1">{{.Name}}</h1>
{{ end }}
<h2>{{.Login}}</h2>
{{ if eq .Type "http://schema.org/Person" }}
<p><b>{{.Followers}}</b> followers - <b>{{.Following}}</b> following</p>
{{ else }}
<p><b>{{.Followers}}</b> followers</p>
{{ end }}
{{ if .StatusEmoji}}
<p>{{.StatusEmoji}} {{.Status}}</p>
{{ end }}
{{ if .Location }}
<p>🌍 {{.Location}}</p>
{{ end }}
2023-02-08 22:27:45 +09:00
{{ if .Timezone }}
<p>🕑️ {{.Timezone}}</p>
2023-02-08 22:55:03 +09:00
{{ end }}
{{ if .Link }}
2023-02-08 23:17:30 +09:00
<p>🌐 <a href="https://{{.Link}}" target="_blank">{{.Link}}</a></p>
{{ end }}
2023-02-13 22:59:44 +09:00
{{ if .Email }}
<p>✉️ {{.Email}}</p>
{{ end }}
2023-02-10 01:41:53 +09:00
{{ if .Social }}
<div class="sociallinks">
2023-02-10 01:41:53 +09:00
{{range .Social}}
<p>🔗 <a href="{{.}}" target="_blank">{{.}}</a></p>
{{ end }}
</div>
2023-02-10 01:41:53 +09:00
{{ end }}
2023-02-13 22:59:44 +09:00
{{ if .Organizations }}
2023-02-11 22:07:47 +09:00
<p>Organizations:
2023-02-13 22:59:44 +09:00
{{range .Organizations}}
2023-02-11 22:07:47 +09:00
<a href="/{{.}}" target="_blank">{{.}}</a>
{{ end }}
</p>
{{ end }}
{{ if .OrgMembers }}
<p>Members:
{{range .OrgMembers}}
<a href="/{{.}}" target="_blank">@{{.}}</a>
{{ end }}
</p>
{{ end }}
{{ if .Company }}
<p>🏢 {{.Company}}</p>
{{ end }}
2023-02-08 22:27:45 +09:00
{{ if eq .Type "http://schema.org/Person" }}
<p>✏️ {{ if .Name }} {{.Name}} {{ else }} {{.Login}} {{ end }} has made {{.Contributions}}</p>
{{ end }}
</div>
{{ if .Bio }}
<div class="userBio">
<h3>Bio</h3>
<p class="userBioText">{{.Bio}}</p>
</div>
{{ end }}
{{ if .Readme }}
<div class="userReadme">
<h3>README</h3>
<div class="userReadmeText">{{ unescape .Readme}}</div>
</div>
{{ end }}
{{ end }}
{{ else }}
<h2>User not found</h2>
<p>That user doesn't exist.</p>
{{ end }}
</main>