mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
fix: show full size author image when zooming
This commit is contained in:
@@ -8,14 +8,16 @@
|
|||||||
{{ $authorImage = resources.Get . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
{{ $final = $authorImage.Fill "192x192" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
||||||
width="96"
|
width="96"
|
||||||
height="96"
|
height="96"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $final.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="place-self-center">
|
<div class="place-self-center">
|
||||||
|
|||||||
@@ -8,26 +8,30 @@
|
|||||||
{{ $authorImage = resources.Get . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
{{ $final = $authorImage.Fill "192x192" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
||||||
width="96"
|
width="96"
|
||||||
height="96"
|
height="96"
|
||||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $final.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $authorImage := resources.GetRemote . }}
|
{{ $authorImage := resources.GetRemote . }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
{{ $final = $authorImage.Fill "192x192" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
class="!mt-0 !mb-0 h-24 w-24 rounded-full me-4"
|
||||||
width="96"
|
width="96"
|
||||||
height="96"
|
height="96"
|
||||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $authorImage.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="place-self-center">
|
<div class="place-self-center">
|
||||||
|
|||||||
@@ -41,15 +41,17 @@
|
|||||||
{{ $authorImage = resources.Get . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
{{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="mb-2 h-36 w-36 rounded-full"
|
class="mb-2 h-36 w-36 rounded-full"
|
||||||
width="144"
|
width="144"
|
||||||
height="144"
|
height="144"
|
||||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
alt="{{ $.Site.Params.Author.name | default `Author` }}"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $final.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
<h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200">
|
||||||
|
|||||||
@@ -42,15 +42,17 @@
|
|||||||
{{ $authorImage = resources.Get . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
{{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="mb-2 rounded-full h-36 w-36"
|
class="mb-2 h-36 w-36 rounded-full"
|
||||||
width="144"
|
width="144"
|
||||||
height="144"
|
height="144"
|
||||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
alt="{{ $.Site.Params.Author.name | default `Author` }}"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $final.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if not $disableHeroImageFilter }}
|
{{ if not $disableHeroImageFilter }}
|
||||||
|
|||||||
@@ -12,15 +12,17 @@
|
|||||||
{{ $authorImage = resources.Get . }}
|
{{ $authorImage = resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $authorImage }}
|
{{ if $authorImage }}
|
||||||
|
{{ $final := $authorImage }}
|
||||||
{{ if not $disableImageOptimization }}
|
{{ if not $disableImageOptimization }}
|
||||||
{{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
{{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
class="mb-2 rounded-full h-36 w-36"
|
class="mb-2 h-36 w-36 rounded-full"
|
||||||
width="144"
|
width="144"
|
||||||
height="144"
|
height="144"
|
||||||
alt="{{ $.Site.Params.Author.name | default " Author" }}"
|
alt="{{ $.Site.Params.Author.name | default `Author` }}"
|
||||||
src="{{ $authorImage.RelPermalink }}">
|
src="{{ $final.RelPermalink }}"
|
||||||
|
data-zoom-src="{{ $authorImage.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<h1 class="text-4xl font-extrabold">
|
<h1 class="text-4xl font-extrabold">
|
||||||
|
|||||||
Reference in New Issue
Block a user