mirror of
https://github.com/gohugoio/hugo.git
synced 2024-06-02 06:02:30 +00:00
37 lines
969 B
HTML
37 lines
969 B
HTML
{{ $author := .context.Params.author }}
|
|
{{ if $author }}
|
|
<aside class="mw5 br3 mv3 nested-links">
|
|
|
|
{{ $data := "" }}
|
|
{{ $url := urls.JoinPath "https://api.github.com/users" $author }}
|
|
{{ with resources.GetRemote $url }}
|
|
{{ with .Err }}
|
|
{{ errorf "%s" . }}
|
|
{{ else }}
|
|
{{ $data = . | transform.Unmarshal }}
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ errorf "Unable to get remote resource %q" $url }}
|
|
{{ end }}
|
|
|
|
{{ with $data }}
|
|
{{ with .name }}
|
|
<h3 class="f4 dib">
|
|
{{ . | htmlEscape }}
|
|
</h3>
|
|
{{ end }}
|
|
{{ with .bio }}
|
|
<p class="lh-copy measure center mt0 f6 black-60">
|
|
{{ . | htmlEscape }}
|
|
</p>
|
|
{{ end }}
|
|
{{ with .html_url }}
|
|
<a href="{{ . }}" class="link dim v-mid dib">
|
|
{{ partial "svg/github-squared.svg" (dict "fill" "gray" "width" "16" "height" "18") }}
|
|
</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
</aside>
|
|
{{ end }}
|