mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 11:07:32 -05:00
Revert "Set height and width specifically on img tag"
This reverts commit be12afb50d
.
It causes issues with aspect ratio when the raw width of the image is
wider than the width in CSS pixels allowed by the body max-width.
Not reverting the refactor that removes {{ $img = . }} because I don't
know why that was there and will see if it works fine with it still
removed.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
{{ with index . "src" }}
|
{{ with index . "src" }}
|
||||||
{{ if eq .MediaType.MainType "image" }}
|
{{ if eq .MediaType.MainType "image" }}
|
||||||
<img src="{{ .Permalink }}" alt="{{ .Title }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy" />
|
<img src="{{ .Permalink }}" alt="{{ .Title }}" loading="lazy" />
|
||||||
{{ else if eq .MediaType.MainType "video" }}
|
{{ else if eq .MediaType.MainType "video" }}
|
||||||
<video controls preload="metadata">
|
<video controls preload="metadata">
|
||||||
<source src="{{ .Permalink }}" alt="{{ .Title }}">
|
<source src="{{ .Permalink }}" alt="{{ .Title }}">
|
||||||
|
Reference in New Issue
Block a user