Browse Source

fix w3 validation

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

1
layouts/partials/article-card.html

@ -2,6 +2,7 @@
<div class="article-image"> <div class="article-image">
<a href=" {{ .Permalink }}"> <a href=" {{ .Permalink }}">
{{ partial "responsive-image.html" (dict "context" .)}} {{ partial "responsive-image.html" (dict "context" .)}}
</a>
</div> </div>
<div class="article-info-container"> <div class="article-info-container">
<div class="article-info"> <div class="article-info">

10
layouts/partials/responsive-image.html

@ -4,7 +4,10 @@
srcset=" srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w, {{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w, {{ (.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 }}" src="{{ .RelPermalink }}"
{{ end }} {{ end }}
alt="{{ .context.Params.featured.alt }}" alt="{{ .context.Params.featured.alt }}"
@ -15,7 +18,10 @@
srcset=" srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w, {{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w, {{ (.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 }}" src="{{ .RelPermalink }}"
alt="{{ .Params.alt }}" alt="{{ .Params.alt }}"
{{ end }} {{ end }}

Loading…
Cancel
Save