1
Fork 0
theorangeone.net-legacy/layouts/partials/list_item.html
Jake Howard 4540196dee
Use relative links where possible
So the dead link checker can check internal links
2018-02-04 13:08:48 +00:00

22 lines
794 B
HTML

<div class="media list-page-item mb-3">
{{ if .Params.image }}
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
<a href="{{ .RelPermalink }}">
{{ .Scratch.Set "image" .Params.image }}
{{ if hasPrefix .Params.image "resource:" }}
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
{{ .Scratch.Set "image" ($resource.Resize "300x").RelPermalink }}
{{ end }}
<div class="image" data-image='{{ .Scratch.Get "image" }}'></div>
</a>
</div>
{{ end }}
<div class="media-body">
<a href="{{ .RelPermalink }}">
<h5 class="my-0">{{ .Title }}</h5>
</a>
<small>{{ partial "content-details.html" . }}</small>
<p>{{ partial "summary.html" . }}</p>
</div>
</div>