author-github-data-card.html (954B)
1 {{ $author := .context.Params.author }} 2 {{ if $author }} 3 <aside class="mw5 center bg-white br3 pa3 pa4-ns mv3 ba b--black-10 nested-links"> 4 {{ $urlPre := "https://api.github.com" }} 5 {{ $user_json := getJSON $urlPre "/users/" $author }} 6 7 <div class="tc"> 8 9 {{ if $user_json.avatar_url }} 10 <a href="{{ $user_json.html_url }}" class="link hover-bg-light-gray pa1 br-100"> 11 <img src="{{ $user_json.avatar_url }}&size={{ .size }}" alt="" class="br-100 ba b--light-gray"> 12 </a> 13 {{ end }} 14 15 {{ if $user_json.name }} 16 <h3 class="f4"> 17 <a href="{{ $user_json.html_url }}" class="link dim"> 18 {{ $user_json.name }} 19 </a> 20 </h3> 21 <hr class="mw3 bb bw1 b--black-10"> 22 {{ end }} 23 24 {{ if $user_json.bio }} 25 <p class="lh-copy measure center f6 black-70"> 26 {{ $user_json.bio }} 27 </p> 28 {{ end }} 29 30 </div> 31 32 </aside> 33 {{ end }}