portfolios_pgp/layouts/partials/project_li_card.html

26 lines
968 B
HTML
Raw Permalink Normal View History

2021-12-31 12:44:26 +01:00
{{ $item := .item }}
{{ $widget := .widget }}
{{ $link := .link }}
{{ $target := .target }}
{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }}
{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
<div class="project-card project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
<div class="card rounded-0 shadow-sm">
{{ with $resource }}
{{ $image := .Resize (printf "550x q90 %s") }}
<a href="{{ $link }}" {{ $target | safeHTMLAttr }} class="card-image">
<img src="{{ $image.RelPermalink }}" alt="" class="img-responsive">
</a>
{{ end }}
<div class="card-body">
<h4><a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{ $item.Title | markdownify | emojify }}</a></h4>
<div class="card-desription">
{{ with $item.Params.summary }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
</div>
</div>
</div>
</div>