Browse Source

fix w3 validation

master
Alexander Avery 2 years ago
parent
commit
91d81a2505
  1. 3
      layouts/partials/article-card.html
  2. 10
      layouts/partials/responsive-image.html

3
layouts/partials/article-card.html

@ -1,7 +1,8 @@
<article class="shadow float-on-hover card">
<div class="article-image">
<a href=" {{ .Permalink }}">
{{ partial "responsive-image.html" (dict "context" .)}}
{{ partial "responsive-image.html" (dict "context" .)}}
</a>
</div>
<div class="article-info-container">
<div class="article-info">

10
layouts/partials/responsive-image.html

@ -4,7 +4,10 @@
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "1200x q65").RelPermalink }} 2x"
{{ (.Resize "1200x q65").RelPermalink }} 1200w"
sizes="(max-width: 400px) 320vw,
(max-width: 1000px) 600vw,
1200vw"
src="{{ .RelPermalink }}"
{{ end }}
alt="{{ .context.Params.featured.alt }}"
@ -15,7 +18,10 @@
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "1200x q65").RelPermalink }} 2x"
{{ (.Resize "1200x q65").RelPermalink }} 1200w"
sizes="(max-width: 400px) 320vw,
(max-width: 1000px) 600vw,
1200vw"
src="{{ .RelPermalink }}"
alt="{{ .Params.alt }}"
{{ end }}

Loading…
Cancel
Save