Browse Source

use native tags in article header partials

master
Alexander Avery 9 months ago
parent
commit
9adf47f6f9
  1. 8
      layouts/partials/article-meta.html
  2. 2
      layouts/partials/header-image.html

8
layouts/partials/article-meta.html

@ -1,12 +1,12 @@
<div class="article-meta"> <section class="article-header">
<h1 class="center-text">{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
{{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }} {{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }}
{{ $primaryAuthor := index $authors 0 }} {{ $primaryAuthor := index $authors 0 }}
{{ with $primaryAuthor }} {{ with $primaryAuthor }}
<a class="center-text" href={{ printf "/%s/%s" "authors" (urlize .) }}> <a class="center-text" href={{ printf "/%s/%s" "authors" (urlize .) }}>
<h2 class="center-text">{{ . }}</h2> <h2>{{ . }}</h2>
</a> </a>
{{ end }} {{ end }}
@ -18,4 +18,4 @@
{{ partial "header-image.html" (dict "image" (.Resources.GetMatch .Params.featured.url) "alt" .Params.featured.alt) }} {{ partial "header-image.html" (dict "image" (.Resources.GetMatch .Params.featured.url) "alt" .Params.featured.alt) }}
</div> </section>

2
layouts/partials/header-image.html

@ -1,4 +1,4 @@
<img class="shadow large-image" <img class="shadow featured"
{{ with .image }} {{ with .image }}
srcset=" srcset="
{{ (.Resize "320x q30").RelPermalink }} 500w, {{ (.Resize "320x q30").RelPermalink }} 500w,

Loading…
Cancel
Save