Files
hugoDocs/layouts/partials/components/author-github-data.html
T
Bjørn Erik Pedersen 9301947b25 Squashed 'themes/gohugoioTheme/' content from commit 7dd8a302
git-subtree-dir: themes/gohugoioTheme
git-subtree-split: 7dd8a302409a20362e4c610798cc19661b336363
2017-08-10 14:29:32 +02:00

22 lines
700 B
HTML

{{ $author := .context.Params.author }}
{{ if $author }}
<aside class="mw5 br3 mv3 nested-links">
{{ $urlPre := "https://api.github.com" }}
{{ $user_json := getJSON $urlPre "/users/" $author }}
{{ if $user_json.name }}
<h3 class="f4 dib">
{{ $user_json.name | htmlEscape }}
</h3>
{{ end }}
{{ if $user_json.bio }}
<p class="lh-copy measure center mt0 f6 black-60">
{{ $user_json.bio | htmlEscape }}
</p>
{{ end }}
<a href="{{ $user_json.html_url }}" class="link dim v-mid dib">
{{ partial "svg/github-squared.svg" (dict "fill" "gray" "width" "16" "height" "18") }}
</a>
</aside>
{{ end }}