mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
feat: add alt message for archive & related contents images (#411)
This commit is contained in:
parent
72a5e956ee
commit
497643b363
3 changed files with 9 additions and 4 deletions
7
exampleSite/.gitignore
vendored
7
exampleSite/.gitignore
vendored
|
@ -22,6 +22,9 @@ _testmain.go
|
|||
*.exe
|
||||
*.test
|
||||
|
||||
/public
|
||||
/themes
|
||||
public
|
||||
themes
|
||||
resources
|
||||
|
||||
assets/jsconfig.json
|
||||
.DS_Store
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
alt="{{ .Title }}"
|
||||
loading="lazy">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
loading="lazy"
|
||||
data-key="{{ .context.Slug }}"
|
||||
loading="lazy"
|
||||
alt="Featured image of post {{ .context.Title }}"
|
||||
{{ with .context.Slug }}data-key="{{ . }}" {{ end }}
|
||||
data-hash="{{ $imageRaw.Data.Integrity }}">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" data-key="{{ .context.Slug }}" data-hash="{{ $image.permalink }}"/>
|
||||
|
|
Loading…
Reference in a new issue