{{- define "main" -}} {{- $posts := where .Site.RegularPages "Section" "posts" -}} {{- $featured := where $posts "Params.featured" true -}} {{- $hero := index $featured 0 -}} {{- $latest := where $posts "Permalink" "ne" $hero.Permalink -}} {{- with $hero -}}
{{- $heroBanner := .Resources.GetMatch "banner.png" -}} {{- if not $heroBanner -}}{{- $heroBanner = .Resources.GetMatch "banner.*" -}}{{- end -}} {{- if $heroBanner -}}
{{- partial "img.html" (dict "res" $heroBanner "widths" (slice 1200 1920 2560) "sizes" "100vw" "class" "w-full h-full object-cover" "alt" "" "loading" "eager") -}}
{{- else -}} {{- $heroBannerSrc := "" -}} {{- with .Params.background }} {{ $heroBannerSrc = .src }} {{ else }} {{ with $.Params.banner }}{{ $heroBannerSrc = .src }}{{ end }} {{ end -}} {{- with $heroBannerSrc -}}
{{- end -}} {{- end -}}
Featured Drop {{- with .Params.categories -}} {{- range first 1 . -}} {{ . }} {{- end -}} {{- end -}}

{{- .Title -}}

{{- .Description -}}

View Editorial {{ partial "icon.html" "arrow-right" }} {{- with .Params.author -}} {{- $author := site.GetPage (printf "authors/%s" .) -}} {{- with $author -}}
{{- $avRes := .Resources.GetMatch "avatar.*" -}} {{- $avSrc := "" -}} {{- with $avRes }} {{ $avSrc = .RelPermalink }} {{ else }} {{ with $author.Params.avatar }}{{ $avSrc = . }}{{ end }} {{ end -}} {{- with $avSrc -}} {{ $author.Params.name | default $author.Title }} {{- end -}} By {{ .Params.name | default .Title }}
{{- end -}} {{- end -}}
{{- end -}}

LATEST DROPS

All posts {{ partial "icon.html" "arrow-right" }}
{{- range first 8 $latest -}} {{- partial "post-card.html" . -}} {{- end -}}
{{- if gt (len $latest) 8 -}}
View All {{ len $posts }} Posts {{ partial "icon.html" "arrow-right" }}
{{- end -}}
About the Magazine

{{ .Site.Params.description }}

About the magazine {{ partial "icon.html" "arrow-right" }}
{{- end -}}