<div class="blog-card">
  <a class="text-dark" href="{{.Permalink}}">
    {{ if isset .Params "images" }}
    {{ with (index (slice .Params.images) 0) }}{{ with index . 0}}
    <div class="project-preview-img lazyload" data-style="background-image: url('/blog/{{ .imgname }}')"></div>
    {{end}}{{end}}
    {{ else if isset .Params "topic"}}
    <div class="project-preview-img lazyload" data-style="background-image: url('/blog/header_images/{{ .Params.topic }}.png')"></div>
    {{ else }}
    <div class="pro