2017-04-20 20:18:53 -07:00
|
|
|
{{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }}
|
|
|
|
{{ if .IsNamedParams }}
|
|
|
|
<div class="box box--avatar">
|
|
|
|
{{ with .Get "url" }}<a href="{{.}}">{{ end }}
|
|
|
|
<img class="avatar" src="{{ $path }}{{ .Get "img" }}"/>
|
|
|
|
{{ with .Get "url" }}</a>{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
{{ $avatar := ( .Get 0 | default "avatar.jpg" ) }}
|
2017-03-29 19:58:42 -07:00
|
|
|
<div class="box box--avatar">
|
2017-04-07 17:02:17 -07:00
|
|
|
<img class="avatar" src="{{ $path }}{{ $avatar }}"/>
|
2017-03-29 19:58:42 -07:00
|
|
|
</div>
|
2017-04-20 20:18:53 -07:00
|
|
|
{{ end }}
|