mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
Merge pull request #2336 from ZhenShuo2021/fix/windows-author-image
🐛 Fix: author image does not support external URL 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