mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
Add remote image support to author image
This commit is contained in:
parent
10bf07a7b7
commit
3b0393d553
1 changed files with 7 additions and 2 deletions
|
@ -1,7 +1,12 @@
|
||||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||||
<div class="flex author">
|
<div class="flex author">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
{{ $authorImage := resources.Get . }}
|
{{ $authorImage := "" }}
|
||||||
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
|
{{ $authorImage = resources.GetRemote . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $authorImage = resources.Get . }}
|
||||||
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||||
|
@ -31,4 +36,4 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
|
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue