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 }}
|
||||
<div class="flex author author-extra mt-4">
|
||||
{{ with .data.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $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 }}">
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (hasPrefix . "http://") (hasPrefix . "https://") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage := resources.GetRemote . }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user