{{/* Used by 1. list.html and term.html (when the cardView option is not enabled) 2. Recent articles template (when the cardView option is not enabled) 3. Shortcode list.html */}} {{ $constrainItemsWidth := .Page.Site.Params.list.constrainItemsWidth | default false }} {{ $articleClasses := "group-hover-card group flex flex-wrap md:flex-nowrap article relative" }} {{ 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 }} {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} {{ $articleInnerClasses := "" }} {{ if .Site.Params.list.showCards }} {{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }} {{ else }} {{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }} {{ end }} {{ if $constrainItemsWidth }} {{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }} {{ end }} {{ $featured := "" }} {{ $featuredURL := "" }} {{ if not .Params.hideFeatureImage }} {{ with .Params.featureimage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $featured = resources.GetRemote . }} {{ else }} {{ $featured = resources.Get . }} {{ end }} {{ end }} {{ if not $featured }} {{ $images := $.Resources.ByType "image" }} {{ range slice "*feature*" "*cover*" "*thumbnail*" }} {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} {{ end }} {{ if not $featured }} {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} {{ end }} {{ end }} {{ with $featured }} {{ $featuredURL = .RelPermalink }} {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} {{ $featuredURL = (.Resize "600x").RelPermalink }} {{ end }} {{ end }} {{ end }}
{{ with $featuredURL }}
{{ end }}
{{ with .Params.externalUrl }}
{{ $.Title | emojify }}
{{ else }}
{{ .Title | emojify }}
{{ end }} {{ if and .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" . }} {{ end }}
{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
{{ .Summary | plainify }}
{{ end }}