mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-09-27 20:46:25 +00:00
Add width and height to image to prevent layout shifts
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
<main role="main" style="">
|
<main role="main" style="">
|
||||||
<div>
|
<div>
|
||||||
{{- if .Site.Params.Portrait.Path }}
|
{{- if .Site.Params.Portrait.Path }}
|
||||||
|
{{- $img := imageConfig (printf "static/%s" .Site.Params.Portrait.Path) }}
|
||||||
<img src="{{ .Site.Params.Portrait.Path }}" class="circle" alt="{{ .Site.Params.Portrait.Alt }}"
|
<img src="{{ .Site.Params.Portrait.Path }}" class="circle" alt="{{ .Site.Params.Portrait.Alt }}"
|
||||||
style="max-width:{{ .Site.Params.Portrait.Size }}" />
|
width="{{ $img.Width }}" height="{{ $img.Height }}" style="max-width:{{ .Site.Params.Portrait.Size }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<h1>{{ .Site.Title }}</h1>
|
<h1>{{ .Site.Title }}</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user