123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- {{ $item := .item }}
- {{ $widget := .widget }}
- {{ $do_link := true }}
- {{ if $item.Params.external_link | or $item.Content }}
- {{ $do_link = true }}
- {{ else }}
- {{ $do_link = false }}
- {{ end }}
- {{ $link := .link }}
- {{ $target := .target }}
- {{/* Get summary. */}}
- {{ $summary := "" }}
- {{ if $item.Params.summary }}
- {{ $summary = $item.Params.summary | markdownify | emojify }}
- {{ else if .Params.abstract }}
- {{ $summary = .Params.abstract | markdownify | emojify }}
- {{ else if $item.Summary }}
- {{ $summary = $item.Summary }}
- {{ end }}
- {{ $order := "" }}
- {{ if and ($widget.Params.design.flip_alt_rows | default true) (not (modBool .index 2)) }}
- {{ $order = "order-md-2" }}
- {{ end }}
- {{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
- <div class="col-lg-12 project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
- <div class="row align-items-center">
- <div class="col-12 col-md-6">
- <h3 class="article-title mb-0 mt-0">
- {{- if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{end -}}
- {{ $item.Title | markdownify | emojify }}
- {{- if $do_link}}</a>{{end -}}
- </h3>
- {{ with $summary }}
- <div class="article-style">
- {{ . }}
- </div>
- {{ end }}
- <div class="btn-links">
- {{ partial "page_links" (dict "page" $item "is_list" 0) }}
- </div>
- </div>
- <div class="col-12 col-md-6 order-first {{$order}}">
- {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }}
- {{ with $resource }}
- {{ $filters := slice (images.GaussianBlur 21) (images.Pixelate 8) }}
- {{ $image := .Resize "540x" }}
- {{ $image_lq := (.Resize "540x q1").Filter $filters }}
- {{if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{end}}
- <img src="{{ $image_lq.RelPermalink }}" data-src="{{ $image.RelPermalink }}" alt="{{ $item.Title }}" class="lazyload">
- {{if $do_link}}</a>{{end}}
- {{end}}
- </div>
- </div>
- </div>
|