Skip to content

Commit 0b92db9

Browse files
committed
remove transparent bg on zoom
1 parent fd9657d commit 0b92db9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

layouts/_default/_markup/render-image.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
{{ $height := $params.Get "h" }}
1515
{{ $border := $params.Has "border" }}
1616

17+
1718
<figure
1819
x-data="{ zoom: false }"
1920
@click="zoom = ! zoom"
@@ -23,9 +24,11 @@
2324
loading="lazy"
2425
src="{{ $src }}"
2526
alt="{{ .Text }}"
26-
{{ with $width }} width="{{ . }}" {{ end }}
27-
{{ with $height }} height="{{ . }}" {{ end }}
28-
class="rounded mx-auto{{ with $border }} border border-divider-light dark:border-divider-dark{{end}}"
27+
{{ with $width }}width="{{ . }}"{{ end }}
28+
{{ with $height }}height="{{ . }}"{{ end }}
29+
class="mx-auto{{ with $border }}
30+
border border-divider-light dark:border-divider-dark
31+
{{ end }} rounded"
2932
/>
3033
{{ with .Title }}
3134
<figcaption class="text-gray-light dark:text-gray-dark">{{ . }}</figcaption>
@@ -35,16 +38,14 @@
3538
x-show="zoom"
3639
@click="zoom = false"
3740
x-transition.opacity.duration.250ms
38-
class="fixed z-20 inset-0 flex items-center justify-center bg-black/70 p-6"
41+
class="fixed inset-0 z-20 flex items-center justify-center bg-black/100 p-6"
3942
>
40-
<button
41-
class="text-white fixed z-30 top-6 right-8 icon-svg"
42-
>
43+
<button class="icon-svg fixed right-8 top-6 z-30 text-white">
4344
{{ partialCached "icon" "close" "close" }}
4445
</button>
4546
<img
4647
loading="lazy"
47-
class="rounded max-w-full max-h-full"
48+
class="max-h-full max-w-full rounded"
4849
src="{{ $src }}"
4950
alt="{{ .Text }}"
5051
/>

0 commit comments

Comments
 (0)