forked from SeleniumHQ/seleniumhq.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgh-user.html
More file actions
26 lines (24 loc) · 920 Bytes
/
gh-user.html
File metadata and controls
26 lines (24 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{{ $githubToken := (getenv "SELENIUM_CI_TOKEN") }}
{{ if $githubToken }}
{{ $url := .Get 0 }}
{{ $toReplace := printf "://%s@" $githubToken }}
{{ $tokenInUrl :=cond (eq $githubToken "") "://" $toReplace }}
{{ $url := replace $url "://" $tokenInUrl }}
{{ $userJson := resources.GetRemote $url }}
{{ $user := $userJson | transform.Unmarshal }}
<div class="card text-center bg-transparent border-0 p-2 h-100" style="max-width: 12rem;">
<img src="{{$user.avatar_url}}" class="card-img-top mx-auto" alt="{{$user.name}}" style="max-width: 122px;">
<div class="card-body pb-0 px-1">
<p class="card-text m-0">
{{$user.name}}
</p>
</div>
<div class="card-footer bg-transparent border-0 px-1">
<p>
<a href="{{$user.html_url}}">@{{$user.login}}</a>
</p>
</div>
</div>
{{ else }}
{{ partial "github-content.html" }}
{{ end }}