mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix: support external image for author image on windows
This commit is contained in:
@@ -1,18 +1,13 @@
|
|||||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||||
<div class="flex author author-extra mt-4">
|
<div class="flex author author-extra mt-4">
|
||||||
{{ with .data.image }}
|
{{ with .data.image }}
|
||||||
{{ $authorImage := resources.Get . }}
|
{{ $authorImage := "" }}
|
||||||
{{ if $authorImage }}
|
{{ if or (hasPrefix . "http://") (hasPrefix . "https://") }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ $authorImage = resources.GetRemote . }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
|
||||||
{{ end }}
|
|
||||||
<img
|
|
||||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4"
|
|
||||||
width="96"
|
|
||||||
height="96"
|
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $authorImage := resources.GetRemote . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user