2017-04-07 17:02:17 -07:00
|
|
|
{{ $numOfParams := ( len .Params ) }}
|
|
|
|
{{ $avatar := "avatar.jpg" }}
|
|
|
|
{{ if eq $numOfParams 1 }}{{ $avatar := .Get 1 }}{{ end }}
|
2017-03-29 19:58:42 -07:00
|
|
|
<div class="box box--avatar">
|
2017-04-07 17:02:17 -07:00
|
|
|
{{ if eq $numOfParams 2 }}<a href="{{.Get 1 }}">{{ end }}
|
|
|
|
{{ $path := "/images/" }} {{ with $.Site.Params.imagespath }} {{ $path := ( . ) }}{{ end }}
|
|
|
|
<img class="avatar" src="{{ $path }}{{ $avatar }}"/>
|
|
|
|
{{ if eq $numOfParams 2 }}</a>{{ end }}
|
2017-03-29 19:58:42 -07:00
|
|
|
</div>
|