{{ $target := .target }} {{ $shortcodeShowSummary := .showSummary }} {{ $constrainItemsWidth := site.Params.list.constrainItemsWidth | default false }} {{ $disableImageOptimization := site.Params.disableImageOptimization | default false }} {{ $articleClasses := "flex flex-wrap md:flex-nowrap article" }} {{ if site.Params.list.showCards }} {{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} {{ else }} {{ $articleClasses = delimit (slice $articleClasses "") " " }} {{ end }} {{ $articleImageClasses := "w-full md:w-auto h-full thumbnail nozoom" }} {{ if site.Params.list.showCards }} {{ $articleImageClasses = delimit (slice $articleImageClasses "") " " }} {{ else }} {{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }} {{ end }} {{ $articleInnerClasses := "" }} {{ if site.Params.list.showCards }} {{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-2.5 pl-4 pb-0") " " }} {{ else }} {{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }} {{ end }} {{ if $constrainItemsWidth }} {{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }} {{ end }} {{- with $target.Params.images -}} {{- range first 6 . }} {{ end -}} {{- else -}} {{- $images := $target.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{ if and $target.Params.featureimage (not $featured) }} {{- $url:= $target.Params.featureimage -}} {{ $featured = resources.GetRemote $url }} {{ end }} {{- if not $featured }} {{ with site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} {{ end -}} {{ if $target.Params.hideFeatureImage }}{{ $featured = false }}{{ end }} {{- with $featured -}} {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} {{ with . }}
{{ end }} {{ else }} {{ with .Resize "600x" }}
{{ end }} {{ end }} {{- else -}} {{- with site.Params.images }} {{ end -}} {{- end -}} {{- end -}}
{{ with $target.Params.externalUrl }}
{{ $target.Title | emojify }}
{{ else }}
{{ $target.Title | emojify }}
{{ end }} {{ if and $target.Draft site.Params.article.showDraftLabel }}
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
{{ end }} {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" $target }} {{ end }}
{{ partial "article-meta/basic.html" $target }}
{{ $showSummary := false }} {{ if ne $shortcodeShowSummary nil }} {{ $showSummary = $shortcodeShowSummary }} {{ else }} {{ $showSummary = $target.Params.showSummary | default (site.Params.list.showSummary | default false) }} {{ end }} {{ if $showSummary }}
{{ $target.Summary | plainify }}
{{ end }}